help-gnu-emacs
[Top][All Lists]

## Re: Lambda calculus and it relation to LISP

 From: William Elliot Subject: Re: Lambda calculus and it relation to LISP Date: Mon, 7 Oct 2002 07:34:00 -0700

```see@sig.below
William Elliot <mars@xx.com> wrote:

Using L for lambda with Church's old notion and -> for reduces

factorial n
> ((lambda (f) ( (lambda (Y) (f (Y Y)) ) (lambda (Y) (f (Y Y)) )))
>  (lambda (ff n) (if (< n 1) 1 (* n (ff (- n 1))))) )
! -> Ln.(Lf.(Ly.f(yy))(Ly.f(yy))) (Lfn.if(<n1)1(*n(f(-n1)))

Why not just use
Lfn.(<n1)1(*n(f-n1))
Lfn.if(<n1)1(*n(f(-n1)) ?

> What's lambda calculus expressions for -, <, if, = ?
_ '-' and '<' are a bit tricky, as is most LC arithmetic using Church
_ numerals -- see a textbook that covers LC.
It looks like <nm reduces to false or true for Church numerals n,m.
Likely -0n -> 0;  -n0 -> n;  -(+n1)1 -> n

_ 'if' is usually
_   (lambda (test ifTrue ifFalse) (test ifTrue ifFalse))
if -> Lxyz.xyz
if true -> Lyz.y -> true
if false -> Lyz.z -> false
if true NM -> N
if false NM -> M

_ where the value for TRUE is
_   (lambda (ifTrue ifFalse) ifTrue)
_ and the value for FALSE is
_   (lambda (ifTrue ifFalse) ifFalse)
True is Lxy.x
False is Lxy.y which is Church numeral 0.

Glancing with Google, yicks, the Calculi of Lambda conversion is
unreconizable mutant of Alanzo Church's original work.

----

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----

```