Β reduce a redex - Lambda Calculus.

In summary, the substitution is necessary because the free $y$ in $\lambda y.\,yx$ would become bound if it was substituted into $\lambda y.\,yx$ instead of $x$.
  • #1
JamesBwoii
74
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
  • #2
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]$.
 
  • #3
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. :)
 

FAQ: Β reduce a redex - Lambda Calculus.

What is a redex in Lambda Calculus?

A redex (reducible expression) in Lambda Calculus is a term that can be reduced to a simpler form by applying a specific set of rules, known as beta reduction. It is denoted by the symbol β.

How is beta reduction used to reduce a redex?

Beta reduction is applied by replacing the redex with its corresponding function and argument, and then simplifying the resulting expression. This process is repeated until there are no more redexes that can be reduced.

What is the purpose of reducing redexes in Lambda Calculus?

The reduction of redexes allows for the evaluation of expressions in Lambda Calculus, which is essential for performing computations. It also helps to simplify complex expressions and better understand the behavior of functions.

Can all redexes be reduced?

No, not all redexes can be reduced. There are certain rules and restrictions in Lambda Calculus that dictate when a redex can be reduced and when it cannot. For example, a redex cannot be reduced if it is part of a lambda abstraction or if it is already in its simplest form.

Are there any alternative methods for reducing redexes in Lambda Calculus?

Yes, there are other reduction strategies such as alpha and eta reduction, which are based on different rules and can result in different outcomes. However, beta reduction is the most commonly used method for reducing redexes in Lambda Calculus.

Back
Top