next up previous contents
Next: Making sense of terms Up: The (untyped) lambda calculus Previous: Encoding minimalization   Contents

A fixed point combinator

Consider the recursive definition $F = \lambda x. x(F x)$. By the previous ``trick'' for unravelling recursive definitions, we can find a lambda term for $F$ as follows.


\begin{displaymath}
\begin{array}{lcl}
F & = & GG, \mbox{where~} G = \lambda fx...
...a fx. x (\lambda fx.x(f f x) \lambda fx.x(f f x) x)
\end{array}\end{displaymath}

Notice that $F X = X (F X)$ for any lambda term $X$, by the definition of $F$. For any term $Z$, a fixed point of $Z$ is a term $M$ such that $Z M = M$. Clearly, if we set $M \equiv F Z$, we obtain a fixed point for $Z$. Notice that it does not matter what $Z$ is--any lambda term $Z$ has a fixed point $F Z$ where $F$ is the function we have just constructed. This fixed point operator is due to Turing and is traditionally denoted $\Theta$.



Madhavan Mukund 2004-04-29