next up previous contents
Next: Variable capture Up: The (untyped) lambda calculus Previous: Life without types   Contents

The rule $\beta $

The basic rule for computing with the lambda calculus is called $\beta $ and is given by:


\begin{displaymath}
(\lambda x.M) M' \rightarrow _\beta M\{x \leftarrow M'\}
\end{displaymath}

where $M\{x \leftarrow M'\}$ represents the effect of substituting all free occurrences of $x$ in $M$ uniformly by $M'$. (We shall formally define what we mean by a free occurrence of $x$ shortly.) The $\beta $ rule is one that we use unconciously all the time: If $f(x) = 2x^2 + 3x + 4$, then $f(7) = 2 \cdot 7^2 + 3 \cdot 7 + 4$ which is just $2x^2 + 3x + 4\{x \leftarrow 7\}$.

From the $\beta $ rule it is clear that an application $M M'$ is meaningful only if $M$ is of the form $\lambda x.M''$. Thus, though we can write terms like $x x$, we cannot do much with them.

Effectively, the $\beta $ rule is the only rule we need to set up the lambda calculus. For the moment, think of it as a rewriting rule for expressions that can be applied to any subterm in a lambda expression. We will formalize this later.



Madhavan Mukund 2004-04-29