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>

  • To avoid mistakes completely preserve the expression and make it more clear where the application is.
  • Find the function app, that means find an instance of the pattern (λX. E1) e2 where X can be a valid identifier and e1 and e2 can be a valid expression.
  • The result of changing every free event of x is (λx. E1) e2 with e1 ' where < Code> e1 ' e1 with e2 .
  • Repeat until the pattern is reached. Note that this can lead to infinite loops for non-normal expression, so you should stop after 1000 iterations; -)
  • 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 ((λf. (Λx. (Fx)) a) fits our pattern and becomes ( Λx. (Ax)), which leads to:

      (λa. (Λb. ((Λf. (Λx. X)) ((λx. (Ax B)) b))  

    This time we can apply the pattern to ((λ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

    Popular posts from this blog

    c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

    Calling GetGUIThreadInfo from Outlook VBA -

    Obfuscating Python code? -