K
L
Prolog code for lambda-reduction is:
lambda_reduce(lambda(X, Predicate), Argument, Predicate) :- X = Argument.Applying this to an actual example:
: lambda_reduce( lambda(X, eats(e1, X, the1(p1, pizza1))), name(m1, 'Mary'), Result) ? X = name(m1, 'Mary') Result = eats(e1, name(m1, 'Mary'), the1(p1, pizza1))
"pig": N V ADJ.
"pig" is familiar as a N, but also occurs as a verb ("Jane pigged herself on pizza") and an adjective, in the phrase "pig iron", for example.
Contrast with phrasal category.
Variables in logical form language, unlike in FOPC, persist beyond the "scope" of the quantifier. E.g. A man came in. He went to the table. The first sentence introduces a new object of type man1. The He, in the second sentence refers to this object.
NL quantifiers are typically restricted in the range of objects that the variable ranges over. In Most dogs bark the variable in the most1 quantifier is restricted to dog1 objects: most1(d1 : dog1(d1), barks1(d1)).
With tenses, we use the modal operators pres, past, fut, as in:
pres(sees1)(john1, fido1))
past(sees1)(john1, fido1)
fut(sees1)(john1, fido1)