function - Lambda calculus and church numerals confusion -
I am trying to understand the basics of Lambda calculus and church numbers. I am studying and practicing a lot, but I continue to keep stuck trying to see how some functions work.
The example I am caught on is as follows: Perhaps someone can explain to me where I went wrong.
1 Church number can be displayed as:
λf λx. The exponentation function can be given in chunk numbers (M ^ N) in the form of: x
λm λn Nm
What I have to do is show that after applying the exponentation function 1 and 1, I get back 1 after 1 1 1 = 1. I am doing this so I think better how these functions work. My job is as follows and every time I get stuck:
// exp (1) (λm. Λn Nm) (λf1. Λx1.f1x1) (λf2. Λx2.f2x2) // option for m (λn. N (λf1. Λx1.f1x1)) (λf2. Λx2.f2x2) // space For option (λf2. Λx2.f2x2) (λf1. Λx1.f1x1) / / option for F2 (λx2. (Λf1. Λx1.f1x1) x2) // option for f1 λx2. (Λx1.x2x1)
And I got stuck there. I've lost both 'F', left with X and I have not got back 1. Where am i going
Where am I wrong?
Nowhere! done. Remember, variable names are not important; This structure is important Name f
or x2
are not meaningful; it only matters how they are used. Church number for 1
λf λx. F x
and you have
λx2. (Λx1.x2x1)
x2
to f
and x1
to x
and voice! You have
λf (Λx. F x) = λf λx. FX
Comments
Post a Comment