From: Jim Pryor Date: Thu, 16 Sep 2010 22:09:18 +0000 (-0400) Subject: merge lists, numbers X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?a=commitdiff_plain;ds=inline;h=d2f7232f5c6124a53eb3889a690bd700ee4ce1ce;p=lambda.git merge lists, numbers Signed-off-by: Jim Pryor --- diff --git a/lists.mdwn b/lists_and_numbers.mdwn similarity index 100% rename from lists.mdwn rename to lists_and_numbers.mdwn diff --git a/numbers.mdwn b/numbers.mdwn deleted file mode 100644 index 8d554245..00000000 --- a/numbers.mdwn +++ /dev/null @@ -1,32 +0,0 @@ - -Church figured out how to encode integers and arithmetic operations -using lambda terms. Here are the basics: - -0 = \f\x.fx -1 = \f\x.f(fx) -2 = \f\x.f(f(fx)) -3 = \f\x.f(f(f(fx))) -... - -Adding two integers involves applying a special function + such that -(+ 1) 2 = 3. Here is a term that works for +: - -+ = \m\n\f\x.m(f((n f) x)) - -So (+ 0) 0 = -(((\m\n\f\x.m(f((n f) x))) ;+ - \f\x.fx) ;0 - \f\x.fx) ;0 - -~~>_beta targeting m for beta conversion - -((\n\f\x.[\f\x.fx](f((n f) x))) - \f\x.fx) - -\f\x.[\f\x.fx](f(([\f\x.fx] f) x)) - -\f\x.[\f\x.fx](f(fx)) - -\f\x.\x.[f(fx)]x - -\f\x.f(fx)