Set-theoretical models of untyped -calculus Motivation for models: Better intuition about the formal theory. Consistency results follow by soundness. Completeness transfers results in the model back to the formal theory. Independence questions can be settled by exhibiting models.
Untyped -calculus Terms: (x 2 Var) T ::= x | x. T | T T -reduction - contextual closure of: ( x. P) Q ! P[x:=Q] -equality = - transitive- reflexive closure of - reduction
Untyped -calculus Intuition: x. T is a function. -reduction - applying function to the argument.
Untyped -calculus So: I= x. x is a „function” which takes any x and returns it. K = x. y. x is another „function”. = ( x. x x) ( x. x x) as well
Set theory A function F : A ! B is a set of ordered pairs such that: (a, b) 2 F ! a 2 A Æ b 2 B 8 a 2 A 9 !b 2 B. (a, b) 2 F
Interpretation Terms can have free variables. So the interpretation of a term will depend on valuation assigning sets to variables: : Var ! ZFC The meaning of -term T: [ T ] In particular: [ x ] = (x)
Naive approach [x] = (x) [ x. T] ={ (a, b) | b=[T] [x:=a] } [P Q] = APP([P] , [Q] ) However: What’s the domain of [ x. T] ? Does it even exist?
Naive approach We would like [ x. T] to be a function which domain is „everything”, i.e.: [ x. x] = {(a, a) | a is a set } Such object doesn’t exist in ZFC.
Naive approach Even assuming some model U of ZFC, so that: [ x. x] = {(a, a) | a 2 U} Then: [ x. x] cannot be in U, so in ( x. x) the interpretation of the left I can only use elements of the right I. In ZFC this „process” must end in a finite number of steps, due to Foundation.
Naive approach - moral It’s not that easy!
Let’s go formal The applicative structure is a pair (M, ± ), where ± : M £ M ! M ± models application A valuation v on M is a function v : Var ! M The meaning of a -term: [M] v
Lambda-interpretation (M, [.]. ) is a -interpretation if: [x] v = v(x) [PQ] v = [P] v ± [Q] v 8 m 2 M. [ x. P] v ± m = [P] v[x:=m] If v FV(P) = u FV(P), then [P] v = [P] u
How to build it? Roughly, we want: (M ! M) µ M Impossible due to cardinality issues. But maybe we don’t need all functions from M to M
PP M = P( N ) Let Fin B ={A| A µ B, A finite},for B µ N Let Fin=Fin N Let f : Fin ! M monotone wrt. µ : A µ B ) f(A) µ f(B) Then f extends uniquely to f’ : M ! M f’(A) = Fin A
PP Let [M ! M] be the set of all such extensions. Then |[M ! M]| = |Fin ! M| = 0 = c = |M|
PP Let (m, n) be a pairing function, (m, n) 2 N Let e n encode n-th element of Fin in some canonical order Then we can define: graph : [ P ! P ] ! P fun : P ! [ P ! P ] s.t. 8 x. fun(graph(x)) = x
Literature Henk Barendregt “The lambda calculus: its syntax and semantics”