2009-03-21

λ version Church number (again)

Japanese version

We have already made Church numbers by boxes. It is about how can we define the numbers for a machine. I wanted to talk about computation, for that, I needed numbers. Without numbers, it is a bit hard to talk about computation. Marvin complains the story line was not natural, but the author's writing skill level was apparently not enough to make it natural.

As we have already introduced Church numbers, I will show you them again. I would like to use them later.

0 := λf x. x
1 := λf x. f x
2 := λf x. f (f x)
3 := λf x. f (f (f x))

Please remember, the number of 'f's is corresponds to each number. For example, the number 0 has two inputs, f and x, but the output is only one, x, means no f. The number 1 has output f x, which contains one f. This is like Chinese characters. The Chinese character of 1 is ``'一'', 2 is ``' 二'', 3 is ``三''. If 4, 5, 6, are in the same way, that's Church numbers. But, the ancient Chinese people had a wisdom and they decided not to use the Church number until a computer will be invented since it is not so practical without a computer. Roman numbering system is also similar to the Church number in here especially when the number is large. By the way, Chinese character's 0 is '零.' I do not know when the number 0 was recognized in China. But in Edo era in Japan, 0 is expressed as Tada, means free. When you want to buy something by free, which means 0. We can find this in classic Rakugo, ``Kohome.''

No comments: