Eta Reduction
Extensional equality. Lambda x.f x reduces to f.
Beta reduction is the engine of computation in lambda calculus. But there is a second simplification rule that captures a different idea: if a term does nothing but pass its argument along to another function, the wrapper is redundant. This is eta reduction.
What Is Eta Reduction?
Eta reduction simplifies a term of the form λx.f x to
just f, provided x does not occur free in f.
The intuition: λx.f x is a function that takes x and
immediately hands it to f. It behaves identically to f on
every input. Since the wrapper adds nothing, we can remove it.
The rule:
λx.M x →η M when x ∉ FV(M)
Example: λy.g y →η g (since y is not free
in g).
The Eta Reduction Rule
The eta reduction rule:
λx.M x →η M when x ∉ FV(M)
Three requirements must all hold:
- The body has the form
M x— some termMapplied to the bound variablex xis the last thing applied — the body is exactlyM x, notM x yorM (x x)xdoes not occur free inM— the only role ofxis being passed toM
Eta reduction captures extensional equality: two functions that produce the same output on every input are considered equal.
Apply Eta Reduction
Eta reduction: λx.M x →η M when x ∉ FV(M)
To apply the rule:
- Check the body has the form
M x— some term applied to the bound variable - Verify
xdoes not appear free inM - The result is just
M
Example: λy.g y →η g
- Body is
g y(formM xwithM = g) yis not free ing- Result:
g
When Eta-Reduction Does Not Apply
$\eta$-reduction applies only when the body has the exact form M x:
some term M applied to the bound variable x, and nothing else.
These can be $\eta$-reduced:
λx.f x$\to_\eta$f(body isfapplied tox)λx.(g h) x$\to_\eta$g h(body isg happlied tox)
These cannot be $\eta$-reduced:
λx.f x x— body isf x x, notM xwith $x \notin \text{FV}(M)$. HereMwould bef x, andxoccurs free inf x.λx.x— body is justx, notM xform at allλx.f (g x)— body isf (g x), notM xform. Thexis nested inside, not in the final application position.
The Free Variable Check
The side condition x ∉ FV(M) in the eta rule is essential.
Without it, eta reduction would change the meaning of terms.
Consider λx.(x y) x:
- The body is
(x y) x— the formM xwithM = x y - But
xoccurs free inx y - Reducing to
x ywould turnxfrom a bound parameter into a free variable — completely different meaning
Compare with λx.(f y) x:
- The body is
(f y) xwithM = f y xdoes not occur free inf y- Safe to reduce:
λx.(f y) x →η f y
The check ensures the bound variable is truly just a pass-through.
Why Eta Matters
Eta reduction embodies the principle of extensional equality: two functions are equal if they produce the same result on every input.
λx.f x and f are extensionally equal because for any
argument a:
(λx.f x) a →β f a
The wrapped version always gives the same result as applying f
directly. Eta reduction recognizes this and allows us to simplify
the wrapped form.
This matters because it gives us a formal way to say "these two
terms behave the same" even when they look different syntactically.
Without eta, λx.f x and f would be considered distinct
terms despite being indistinguishable in use.
Ready to test your understanding?
Bitwit uses spaced repetition to help you truly master concepts like this—not just read about them. Each card generates with different values, so you can't just memorize answers.
Practice Eta Reduction →