MHB Β reduce a redex - Lambda Calculus.

  • Thread starter Thread starter JamesBwoii
  • Start date Start date
  • Tags Tags
    Calculus Lambda
AI Thread Summary
The discussion centers on the process of beta reduction in lambda calculus, specifically addressing the substitution of variables in expressions. The primary example involves the expression $(\lambda x. \lambda y.yx)(\lambda x.xy)$, with the expected outcome being $\lambda z.z(\lambda x.xy)$. The challenge arises from the presence of a free variable $y$ in the substituted term $\lambda x.xy$, which complicates the substitution process. To avoid binding the free variable incorrectly, it is necessary to rename the bound variable $y$ to another identifier, such as $z$, before proceeding with the substitution. This renaming ensures that the free variable remains unaffected during the substitution process. The discussion also references the importance of understanding substitution definitions and examples, emphasizing that renaming may be required at various stages of finding the normal form in lambda calculus. Additionally, there is a note about the notation used for substitutions, suggesting the use of the backslash command in mathematical expressions.
JamesBwoii
Messages
71
Reaction score
0
As far as I understand it to reduce the formula is:

$(\lambda x.M)N -> β M[N\x]$

Where:

$β M[N\x]$ means M with every free x replaced by N.

I'm stuck on this one though.

$(\lambda x. \lambda y.yx)(\lambda x.xy)$

I know that the answer should be $\lambda z.z(\lambda x.xy)$ but I can't get it.
 
Technology news on Phys.org
The substituted term $\lambda x.\,xy$ has a free variable $y$. If it is substituted into $\lambda y.\,yx$ instead of $x$, that free $y$ would become bound, which is wrong. Therefore, the bound $y$ in $\lambda y.\,yx$ has to be renamed first, say, to $z$; then $x$ can be replaced with $\lambda x.\,xy$.

See Wikipedia for the definition of substitution and an example where renaming is necessary. Here are two other examples (renaming is required at some point in finding the normal form, not necessarily during the first reduction).

\((\lambda x.xx)(\lambda yz.yz)\)
\(\lambda xy.(\lambda z.(\lambda x.zx)(\lambda y.zy))(xy)\)

Edit: Does your course really use backslash to denote substitutions? If so, use the [m]\backslash[/m] command in math mode, e.g., $(\lambda x.\,M)N\to_{\beta} M[N\backslash x]$.
 
Evgeny.Makarov said:
The substituted term $\lambda x.\,xy$ has a free variable $y$. If it is substituted into $\lambda y.\,yx$ instead of $x$, that free $y$ would become bound, which is wrong. Therefore, the bound $y$ in $\lambda y.\,yx$ has to be renamed first, say, to $z$; then $x$ can be replaced with $\lambda x.\,xy$.

See Wikipedia for the definition of substitution and an example where renaming is necessary. Here are two other examples (renaming is required at some point in finding the normal form, not necessarily during the first reduction).

\((\lambda x.xx)(\lambda yz.yz)\)
\(\lambda xy.(\lambda z.(\lambda x.zx)(\lambda y.zy))(xy)\)

Edit: Does your course really use backslash to denote substitutions? If so, use the [m]\backslash[/m] command in math mode, e.g., $(\lambda x.\,M)N\to_{\beta} M[N\backslash x]$.

Thank you, I understand it now. :)
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Back
Top