Normal Forms
A term in normal form has no redexes. Head and weak head normal form.
We have been reducing terms by finding redexes and applying beta reduction. But how do we know when to stop? Normal form gives us the answer: a term is fully reduced when it contains no redexes at all. This is the endpoint of computation in lambda calculus.
What Is Normal Form?
A term is in normal form if it contains no redexes — no
subterm of the form (λx.M) N.
Examples of terms in normal form:
x— a variable, no redex possibleλx.x— an abstraction, but not applied to anythingx y— an application, butxis a variable, not an abstractionλx.y z— an abstraction whose body is in normal form
Examples of terms not in normal form:
(λx.x) a— contains a redexλy.(λx.x) y— the body contains a redex
A term in normal form cannot be reduced further. It is the final result of the computation.
Recognizing Normal Form
To check whether a term is in normal form, scan it for redexes. A
redex is any subterm of the form (λx.M) N — an abstraction applied
to an argument.
In normal form (no redex anywhere):
a— variableλx.x— abstraction with no redex in the bodya b— application, butais a variableλx.a (b c)— abstraction whose body has no redex
Not in normal form (contains a redex):
(λx.x) a— redex at the top levela ((λx.x) b)— redex nested inside an argumentλy.(λx.x) y— redex inside the body of an abstraction
Not in Normal Form
A term is not in normal form if it contains at least one redex
— a subterm of the form (λx.M) N. The redex does not have to be
at the top level. It can be:
- At the top:
(λx.x) a - Inside a body:
λy.(λx.x) y - Inside an argument:
a ((λx.x) b)
Anywhere a redex hides, the term is not yet fully reduced.
Head Normal Form
Head normal form (HNF) is a weaker condition than normal form. A term is in HNF if, after peeling off any leading lambdas, the head (leftmost position) is a variable — not a redex.
The head of a term is found by:
- Strip outer abstractions:
λx₁.λx₂. ... M— look atM - Follow left-associative applications:
M N₁ N₂ ...—Mis the head
If the head is a variable, the term is in HNF — even if redexes lurk inside arguments or the body.
In HNF:
x— head isxλx.x— stripλx, head isxx ((λy.y) a)— head isx(the redex is in an argument, not at the head)
Not in HNF:
(λx.x) a— head position is an abstraction applied to an argument(λx.x x)(λy.y)— head is a redex
Weak Head Normal Form
Weak head normal form (WHNF) is even weaker than head normal form. A term is in WHNF if:
- It is an abstraction
λx.M(regardless of what is in the body), OR - It is a variable applied to zero or more arguments:
x N₁ N₂ ...
The key difference from HNF: WHNF does not look inside the body of an abstraction. An abstraction is automatically in WHNF, even if its body contains redexes.
In WHNF:
λx.(λy.y) x— an abstraction (body has a redex, but WHNF does not check)x a b— variable at headλx.x— an abstraction
Not in WHNF:
(λx.x) a— the outermost form is a redex, not an abstraction or variable-headed application
The hierarchy: Normal form (strictest) $\subset$ HNF $\subset$ WHNF (weakest). Every term in normal form is also in HNF and WHNF. But not every term in WHNF is in normal form.
Classify the Form
A term is in normal form if it contains no redexes — no subterm
of the form (λx.M) N. To check, scan every part of the term:
- Variables are always in normal form.
- An abstraction
λx.Mis in normal form if its bodyMis. - An application
M Nis in normal form ifMis not an abstraction (otherwiseM Nwould be a redex) and bothMandNare in normal form.
Is This Normal?
To determine whether a term is in normal form, look for the pattern
(λx.M) N anywhere in the term. If you find it, the term is not in
normal form — it still has a reduction step available.
Remember: a redex requires an abstraction directly applied to an
argument. An abstraction by itself (λx.M) is not a redex. A
variable applied to something (x y) is not a redex. Only the
combination (λx.M) N creates a redex.
Why Normal Forms Matter
In lambda calculus, computation is reduction. You start with a term, find redexes, and reduce them. But what are you reducing toward?
The answer is a normal form — a term with no redexes left. This is the final answer, the result of the computation. Without the concept of normal form, there would be no way to say "this computation is done."
Not every term has a normal form. Some terms, when reduced, produce new redexes endlessly — they never settle. We will study these divergent terms soon. But when a normal form exists, it represents the unique final result (up to alpha equivalence) of the computation.
The weaker forms — HNF and WHNF — matter for practical evaluation strategies. Sometimes you do not need to reduce every last redex. Knowing the head is enough to decide what to do next, and WHNF tells you: "the outermost structure is settled."
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 Normal Forms →