Church numerals in Haskell

1999-06-03 Thread Peter Hancock
"Jerzy" == Jerzy Karczmarczuk [EMAIL PROTECTED] writes: Somebody tried to suggest that lambda provides a kind of logarithm... In defense of it I can offer the following laws, which follow from the eta-rule of lambda calculus. Just regard log_x ... as alternative notation for \ x - ...

Church numerals in Haskell

1999-06-03 Thread Jerzy Karczmarczuk
Laszlo Nemeth wrote: I somehow managed to delete Hans's earlier post in which he gives the definitions for + and ^. So I wanted to fetch them from the archive...which was last updated on the 28 May. Is the archive broken or just rarely updated? Thanks, Laszlo Nemeth Somebody tried to

Re: Church numerals in Haskell

1999-06-03 Thread Peter Hancock
"Hans" == Hans Aberg [EMAIL PROTECTED] writes: In real life though, it is very difficult to translate an arbitrarily given lambda expression into a combination of the given primitive set. I cannot resist illustrating Hans's point. This is the sort of thing that comes up... (((V

Re: Church numerals in Haskell

1999-06-03 Thread Hans Aberg
At 13:39 +0100 1999/06/03, Jerzy Karczmarczuk wrote: ... I don't understand the Hans remark about making from +, * etc. the primitive basis for the set theory. What's so primitive about them? A set of lambda expressions is called primitive if all other lambda expressions can be generated from it

Re: Church numerals in Haskell

1999-06-03 Thread Hans Aberg
At 13:46 +0100 1999/06/03, Peter Hancock wrote: Just regard log_x ... as alternative notation for \ x - ... log_x (a * b) = log_x a + log_x b log_x 1 = 0 log_x x = 1 log_x (a ^ b) = (log_x a) * b , x not free in b . These are interesting relations in some sense, even though it is

Re: Church numerals in Haskell

1999-06-03 Thread Christian Sievers
Jerzy Karczmarczuk wrote: 6. Subtraction. Largo. According to some folklore Church himself thought for some time that it is not possible to define the subtraction using pure lambdas. In fact it is possible to subtract Church numerals (but never getting negative numbers, of

Re: Church numerals in Haskell

1999-06-03 Thread Hans Aberg
At 15:37 +0100 1999/06/03, Peter Hancock wrote: By the way, I'm not wild about Hans's term "constant variables". In Church's lambda-I calculus, you aren't allowed abstractions where the bound variable doesn't occur in the body. It would be better to distinguish linear (exactly once), affine (at