Lambda Calculus Fixed-Point Operator Y (lazy)

and the

   Y (lazy)
   Y (strict)

The fixed-point operator (paradoxical combinator) such that Y F = F(Y F):

let Y = lambda G. (lambda g. G(g g)) (lambda g. G(g g))

in let F = lambda f. lambda n. if n=0 then 1 else n*f(n-1)

in Y F 10

{\fB Factorial via Y \fP}

Note that
Y F = (λ g. F(g g)) (λ g. F(g g))
= (λ h. F(h h)) (λ g. F(g g))   --α conv. (name change)
= F ((λ g. F(g g)) (λ g. F(g g)))   --β redn (substitution)
= F (Y F)

And Y even applies to data structures:

let Y = lambda G. (lambda g. G(g g)) (lambda g. G(g g))

in Y (lambda L. 1::L)

{\fB 1::1::1:: ...   via Y \fP}

It is a good idea to print only a finite part of the result.

Coding Ockham's Razor, L. Allison, Springer

A Practical Introduction to Denotational Semantics, L. Allison, CUP

free op. sys.
free office suite
~ free photoshop
web browser

λ ...
:: list cons
nil the [ ] list
null  predicate
hd head (1st)
tl tail (rest)

© L. Allison   (or as otherwise indicated),
Faculty of Information Technology (Clayton), Monash University, Australia 3800 (6/'05 was School of Computer Science and Software Engineering, Fac. Info. Tech., Monash University,
was Department of Computer Science, Fac. Comp. & Info. Tech., '89 was Department of Computer Science, Fac. Sci., '68-'71 was Department of Information Science, Fac. Sci.)
Created with "vi (Linux + Solaris)",  charset=iso-8859-1,  fetched Monday, 25-Oct-2021 12:26:13 AEDT.