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 07:34:00 -0700	[thread overview]
Message-ID: <20021007073339.S95522-100000@agora.rdrop.com> (raw)
In-Reply-To: <see-0810020010140001@192.168.1.2>

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))
instead of
	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! =-----

  reply	other threads:[~2002-10-07 14:34 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 [this message]
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
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=20021007073339.S95522-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).