Newsgroups: comp.lang.scheme
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!news.mathworks.com!newsfeed.internetmci.com!miwok!linex1!linex.com!donham
From: donham@linex.com (Jake Donham)
Subject: Re: Church numerals in SICP
In-Reply-To: caj@tower.stc.housing.washington.edu's message of 22 Dec 1995 05:21:16 GMT
X-Nntp-Posting-Host: linex.com
Message-ID: <DONHAM.95Dec22140158@linex.linex.com>
Sender: news@linex1.linex.com
Organization: LineX Communications (415) 455-1650
References: <4bdf8c$roq@nntp5.u.washington.edu>
Date: Fri, 22 Dec 1995 22:01:56 GMT
Lines: 28

"Craig" == Craig A Johnston <caj@tower.stc.housing.washington.edu> reflects:

    Craig> I picked up a copy of SICP from the library and have been
    Craig> reading it (this is the _intro_ CS course at MIT? sign me
    Craig> up!) ... and I'm sitting here banging my head against
    Craig> Church numerals..

Church numerals are just an illustration of one way to encode integers
and integer computation in the untyped lambda calculus. Their
existence provides an intuitive argument (though not a proof) that the
untyped lambda calculus is Turing-complete (i.e. that it has the same
computational power as a Turing machine).

They work like this: a positive integer n is represented by a function
which takes one argument (a function f) and returns a function which
is the n-fold composition of f with itself. Given that representation
there are simple functions which compute e.g. the sum, product, and
power operations.

There's a good explanation of Church numerals and these operator
functions in Roger Penrose's _The_Emperor's_New_Mind_.

They aren't good for anything so far as I know (does anyone know of
any practical applications?), but they're pretty cool because they get
you thinking about the ways various mathematical objects can be
encoded in others.

Jake
