In linguistic semantics, a generalized quantifier is an expression that denotes a set of sets. This is the standard semantics assigned to quantified noun phrases. For example, the generalized quantifier every boy denotes the set of sets of which every boy is a member.
This treatment of quantifiers has been essential in achieving a compositional semantics for sentences containing quantifiers.
A version of type theory is often used to make the semantics of different kinds of expressions explicit. The standard construction defines the set of types recursively as follows:
Given this definition, we have the simple types e and t, but also a countable infinity of complex types, some of which include:
We can now assign types to the words in our sentence above (Every boy sleeps) as follows.
Thus, every denotes a function from a set to a function from a set to a truth value. Put differently, it denotes a function from a set to a set of sets. It is that function which for any two sets A,B, every(A)(B)= 1 if and only if .
A useful way to write complex functions is the lambda calculus. For example, one can write the meaning of sleeps as the following lambda expression, which is a function from an individual x to the proposition that x sleeps.
Such lambda terms are functions whose domain is what precedes the period, and whose range are the type of thing that follows the period. If x is a variable that ranges over elements of , then the following lambda term denotes the identity function on individuals: