Fixed-point theorem and Y-combinator


Fixed-Point Theorem

The Fixed-Point Theorem states that for any function F in lambda calculus, there exists a value X such that applying F to X returns X itself:

FΛ,XΛ:XβFX

This means that X is a fixed point of F, meaning applying F to X does not change its value.

What is a Fixed Point? 🤔

A fixed point of a function F is a value X that does not change when you apply F to it.

In simple terms:

F(X)=X

This means X stays the same, even after applying the function F.


Real-World Example 🌍

Think of pressing an elevator button:


Another Example: Multiplication

Imagine a function that doubles a number:

F(n)=2n

🚀 A fixed point is a value that "stays put" under a function! It will help us to stop the recursion later...


Constructing a Fixed Point

To construct a fixed point, we define a special term W:

Wλx.F(xx)

Now, let’s set:

XWW

Expanding:

Xλx.F(xx)W

Now applying W:

λx.F(xx)WβF(WW)FX

Thus, we have:

XβFX

✅ We found a fixed point for F!


The Y-Combinator

The Y-Combinator is a special lambda function that finds fixed points for any function F. It is crucial in lambda calculus because it enables recursion in a system that lacks named functions.

Definition of the Y-Combinator

Yλf.(λx.f(xx))(λx.f(xx))

When applied to F, we get:

YF(λf.(λx.f(xx))(λx.f(xx)))F

Expanding:

(λf.(λx.f(xx))(λx.f(xx)))Fβ(λx.F(xx))(λx.F(xx))

Now, look at this magic:

YF(λx.F(xx))(λx.F(xx))(λx.F(xx))MβF(MM)F((λx.F(xx))(λx.F(xx)))F(YF)

Thus, YF satisfies:

YFβF(YF)

YF is a fixed point of F, meaning Y finds fixed points for any function F!


Why is the Y-Combinator Important?