unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: William Elliot <mars@xx.com>
Subject: Re: Lambda calculus and it relation to LISP
Date: Mon, 7 Oct 2002 02:54:54 -0700	[thread overview]
Message-ID: <20021007025440.K57236-100000@agora.rdrop.com> (raw)
In-Reply-To: <slrnaq13ce.nmd.Gareth.McCaughan@g.local>

Gareth.McCaughan@pobox.com
Conventions:  L for lambda;  xyz for (xy)z;  (Lxy.M) for (Lx.(Ly.M))
	N(x/M) for N with every free occurrence of x replaced by M

alpha-conversion:  Lx.N -> Ly.N(x/y), provided no free occurrence of
	x in N falls within the scope of a bound occurrence of y in N.

beta-reduction:  (Lx.N)M -> N(x/M), provided no free occurrence of
	x in N falls within the scope of a bound variable of N that's
	also free in M.

 _ Alpha-conversion (rename a variable) and eta-reduction
 _ (turn \x.(f x) into f, when that's safe). The one I
 _ mentioned above is beta-reduction. Yes, the proviso
 _ you quote is correct. I was simplifying.
When's an eta-reduction safe?  Lx.Nx -> N, provided no free x in N ?
Was this actually used by Alanzo Church or did he merely mention it?

>  _ Important features of the lambda calculus
>  _ 1. In the lambda calculus, *everything* is a function.
>  _ 2. In so far as the lambda calculus has a preferred "order
>  _    of evaluation", it's "normal order", which amounts to
>  _    evaluating things as you need them.
> What's this normal order?
 _ Always reduce the leftmost thing available.
 _ In particular, when you have an application "f x", you
 _ always prefer to reduce things in f before things in f.
What about conversion rules like:
	N -> M ==> NK -> MK
	N -> M ==> KN -> KM
	N -> M ==> Lx.N -> Lx.M ?

 _ In particular, if it turns out that you don't need
 _ x then you'll never bother reducing any of its bits.
Irreducible wff's are all the same bunch of rascals.

> Other questions:
>  _ ((lambda (g n) (g g n))
>  _  (lambda (f n) (if (= 0 n) 1 (* n (f f (- n 1))))) 5)
>
> (Lgn.ggn)(Lfn.if(=0n)1 (*n(ff(-n1))))5)
>
> What's the lambda formula for
> 	= as in =0n
> 	if as in if(=0n)1
> 	- as in -n1 ?
 _ I believe you know the answers to all these questions :-).
Conclusion jumper.  Alanzo didn't define a - I know of.
His = was rather complicated as I recall, being effective to
	to work just for his numbers.  What I know not.
As for 'if', where did that come from?  Again just for Church numbers?

> and finally, let as in
>
> (let ((f (lambda (f n)
>             (if (= 0 n) 1 (* n (f f (- n 1))))))
>       (n 5))
>    (f f n))
>
>  _ Recursion without a function actually calling itself!
 _ (let ((x y)) E) === ((lambda (x) E) y).

Doesn't make sense.  Are there expressions A,B for which
	A(xy) -> x and B(xy) -> y ?
I don't see how 'let' could be a wwf of the L-calculus.

----





-----= 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! =-----

  parent reply	other threads:[~2002-10-07  9:54 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-05  3:20 Lambda calculus and it relation to LISP gnuist
2002-10-05  7:51 ` Luke A. Olbrish
2002-10-05 10:46   ` William Elliot
2002-10-12  0:28     ` Alfred Einstead
2002-10-12  4:02       ` William Elliot
2002-10-05 11:44   ` David Kastrup
2002-10-09  4:38     ` James Wong
2002-10-09  4:48       ` William Elliot
2002-10-05  7:58 ` Charles Matthews
2002-10-05  8:05 ` Gareth McCaughan
2002-10-06 12:03   ` William Elliot
2002-10-06 19:22     ` Gareth McCaughan
2002-10-07  4:58       ` gnuist
2002-10-07  7:14         ` William Elliot
2002-10-07  7:37         ` Barb Knox
2002-10-07  9:34           ` David Kastrup
2002-10-07  9:59             ` William Elliot
2002-10-07 11:10               ` Barb Knox
2002-10-07 14:34                 ` William Elliot
2002-10-07 10:44             ` Christian Lemburg
2002-10-08  1:02               ` ozan s yigit
2002-10-07 10:59             ` Barb Knox
2002-10-08  3:05               ` David Kastrup
2002-10-07 23:12         ` Gareth McCaughan
2002-10-07  9:54       ` William Elliot [this message]
2002-10-07 22:48         ` Gareth McCaughan
2002-10-08  8:42           ` William Elliot
2002-10-05 14:46 ` Fred Gilham
2002-10-05 16:15 ` Kaz Kylheku
2002-10-06 12:22 ` Thaddeus L Olczyk
2002-10-06 13:46   ` Joona I Palaste
2002-10-12  0:36 ` Alfred Einstead

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021007025440.K57236-100000@agora.rdrop.com \
    --to=mars@xx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).