Lambda Calculus reduction -
All,
The lambda expression below which is making me difficult to reduce i.e. Not to know about this problem.
(λm λn λa λb m (nab) b) (λ f x. (Λ fx .fx)
This is what I try, but I am trapped :
Considering the above expression: (λm.E) equates to M = E = (λn λa λb m (nab) b)
m = (λf x. X) (Λ f x .fx)
=> (λn λa λb. (Λ f x. X) (λ f x) (nab) b)
the above expression Keeping in mind (λn. E) equates to E = (λa λb. (Λ f x. X) (λ f x) (nab) b)
m = ??
.. and I'm lost !!
Does anyone help me to understand that, for any lambda calculation expression, what steps should be taken to reduce it?
You can follow these steps to reduce the lambda expression:
Ol>
(λX. E1) e2
where X
can be a valid identifier and e1
and e2
can be a valid expression. x
is (λx. E1) e2
with e1 '
where < Code> e1 ' e1
with e2
. So for your example, we start with expression
(λn. (Λn. (Λ .. (Λb. (M ( (N) b)) b)))) (λf. (Λx. X)) (λf. (Λx. (Fx))
subexpression here (λm (Λn. (Λa. (Λb. (M ((b)))) b))) (λf (Λx. X))
our pattern is x = m
, Fits with e1 = (λn. (Λa. (Λb. (M ((b)) b)))
and e2 = (λf. (Λx. X) ))
. Therefore, after replacement, we get the (λn. (Λa. (Λb. ((Λf. (Λx. X)) ((n) b)) b))
, which makes our whole expression Is: / P>
(λn. (Λa. ((Λf. (Λx. X)) ((b)) b))) (λf. (Λx. (Fx)) < / Code>
We now translate the entire expression to x = n
, e1 = (λa. (Λb. ((Λf. (Λx x)) ((n) B)) B
and E2 = (λf. (Λx. (Fx)))
. Therefore, after substituting:
(λa. (Λb. ((Λf. (Λx. X)) (((λf. (Λx. (Fx))) a) b)) B))
now This time we can apply the pattern to ((λf. (Λx. (Fx)) a)
fits our pattern and becomes ( Λx. (Ax)), which leads to:
,
(λa. (Λb. ((Λf. (Λx. X)) ((λx. (Ax B)) b))
((λx. (Ax)) b)
, which < Code> (ab)
(λa. (Λb. ((Λf. (Λx. X)) (ab)) b))
Apply Now (<λx. (Λx. X)) (ab))
, which reduces the (λx. X)
And get:
(λa. (Λb. B))
We've done it now.
Comments
Post a Comment