What a Formal Proposition Says
A checked theorem has five parts: a name, a proposition, a proof, the axioms it rests on, and a correspondence with the claim we meant. The kernel guarantees exactly one of them. How to read a formal statement, and where its meaning drifts from the English.
In Chapter 5 — The Wrong Theorem (Part I, Chapter 4), a proof assistant accepted a theorem called
zero_add_left whose statement was True. The kernel was right: True is
true. The software around it credited that theorem to the claim “for every
natural number n, 0 + n = n”, and that was wrong. Nothing in the logic failed.
What failed was a reading of what the kernel’s “yes” meant.
This chapter takes that “yes” apart. A checked declaration has five things to inspect, and the kernel guarantees one relation among three of them. Keeping those five things apart is what stops a kernel result from being read as more than it is.
Five things to inspect
Here is the honest file from Chapter 5 — The Wrong Theorem (Part I, Chapter 4):
theorem zero_add_left : ∀ n : Nat, 0 + n = n := by
intro n
induction n with
| zero => rfl
| succ k ih => rw [Nat.add_succ, ih]
- The name,
zero_add_left. A label chosen by whoever wrote the file. It carries no mathematical content. - The proposition,
∀ n : Nat, 0 + n = n. This is what is proved. In Lean a proposition is a type, and a proof of it is a value of that type. - The proof, everything after
:=. The tactic script (intro,induction,rw) is a program that builds a proof term. The kernel checks the term, not the script. Tactics are untrusted helpers; if one produced a wrong term, the kernel would reject it. - The axioms the proof rests on. Lean’s
#print axioms zero_add_leftreports that this one depends on none. A proof that uses classical logic typically reportspropext,Classical.choiceandQuot.sound. A proof with a gap reportssorryAx. - The correspondence between the proposition and the claim we meant, here the English sentence “for every natural number n, 0 + n = n”.
| Item | What it is | Who can check it |
|---|---|---|
| 1. Name | a label in a file | nobody; it is not a mathematical claim |
| 2. Proposition | the type being proved | the elaborator builds the type; the kernel checks the declaration against it |
| 3. Proof | the term that inhabits the type | the kernel checks it |
| 4. Axioms | what the proof depends on | the kernel reports them; policy decides what is allowed |
| 5. Correspondence | whether the proposition says what we meant | a person, and only a person |
The kernel’s guarantee is: the proof term has the type of the proposition, using only the listed axioms. That is a relation among parts 2, 3 and 4. It says nothing about part 1, and nothing about part 5.
Names are not statements
The name-only gate in Part I trusted part 1. It looked for a theorem called
zero_add_left, found one, and supplied the statement from its own registry.
A file stating True under that name passed.
The repair asks the kernel a question it can answer. Given the statement pinned in the claim contract, it checks
theorem bind : ∀ n : Nat, 0 + n = n := @zero_add_left
This type-checks exactly when zero_add_left proves that proposition. A file
that writes ∀ m : Nat, 0 + m = m passes, because renaming a bound variable
does not change the proposition. A file that proves True fails. So does a
file that proves ∀ n : Nat, n ≤ 10 → 0 + n = n, a true theorem about the right
objects that says less.
The comparison is not textual. Lean accepts the binding when the two types are definitionally equal, which means equal after unfolding definitions and renaming bound variables. Two statements can look different and be the same proposition, or look nearly identical and be different ones.
The four-case demonstration from Chapter 5 is this chapter’s anatomy in action: the old gate trusted part 1, the statement gate binds parts 2–4, and part 5 stays human judgement in both.
Parts 1–5 at work. The name-only gate checks the label (part 1) and supplies the rest from elsewhere; the statement gate asks the kernel whether the declaration proves the pinned proposition (parts 2–4). Neither gate checks part 5, the correspondence to the English claim — that is the subject of the correspondence section below and of Chapter 22.
What the symbols mean in the formal system
Part 5 is where most of the difficulty lives, because a formal statement’s symbols have the meanings the library gives them, and those are not always the meanings a reader brings.
Total functions. Chapter 11 showed that, in Lean with Mathlib, the square
root of a negative number is 0 and so is division by 0. Those are library
conventions, not facts of real analysis. For reading statements, the
consequence is that a formula written without its usual hypotheses is still a
statement, about the library’s values. 1 / Real.sqrt (1 - v^2) with no
hypothesis on v is 0 when |v| ≥ 1, and Lean raises no error.
Natural-number subtraction. On Nat, 2 - 3 = 0. Subtraction is
truncated, because there is no −1 in ℕ. A formula that is an identity over the
integers can be false over the naturals, or true for a different reason.
Integrals of non-integrable functions. Mathlib’s integral returns 0 for a
function that is not integrable. So the bare statement
∫ x in Ioi 1, π * x⁻¹ ^ 2 = π would not, on its own, say that the horn’s
volume integral converges. That is why the Gabriel file in Part I proves
volume_integrable as a separate theorem. For the same reason the area is not
stated as “the integral equals ∞”. It is stated as area_unbounded: the
integral from 1 to b tends to infinity as b does. Reading those statements
correctly needs this convention.
Vacuous hypotheses. A proposition of the form “if 0 = 1 then …” is proved in two lines and says nothing (Chapter 11). The kernel accepts it, correctly. Whether a hypothesis can be satisfied is a question the kernel does not ask.
Choices of encoding. Chapter 2 — One Number Against Fermat (Part I, Chapter 1) states the claim about F₅ in Lean over the natural numbers with Mathlib’s definition of prime, and in Rocq over the integers with Rocq’s own definition. Those are two propositions. The contract argues that they say the same thing, through three short bridges: the two definitions of prime agree, the arithmetic agrees, and divisibility agrees. Those bridges are argued, not kernel-checked.
Axioms: what “proved” rests on
“Proved” always means “proved from something”. Lean’s standard axioms are three:
propext: logically equivalent propositions are equal;Classical.choice: from a proof that something exists, choose one, which gives the law of the excluded middle;Quot.sound: quotient types behave as expected.
Most of Mathlib uses all three. They are standard, and few mathematicians would
dispute them. They are not nothing, and a constructive mathematician would
reject Classical.choice.
The axiom list is also what exposes a gap or a shortcut: sorry shows up as
sorryAx, and a home-made axiom shows up by name. Chapter 16 follows those
through a proof’s dependencies, and explains why every pipeline must also be
seen to reject a false theorem.
Correspondence: the part only a person can approve
After the kernel has checked parts 2 to 4, part 5 remains: does the proposition say what the claim means? No machine can settle this, because one side of the comparison is an English sentence, a historical text or an intention.
This is why every investigation in Part I separates what the kernel accepted from whether that proposition matches the claim:
- The kernel can accept a pinned proposition. That does not establish that the proposition says what the prose claim says.
- A person must read the proposition against the claim. That judgement is recorded separately from the kernel result.
The correspondence is a person’s judgement, recorded as such. A machine review, including one by an AI, can find problems. It does not establish the match.
A useful habit when reading any formal statement:
- Read the proposition aloud, symbol by symbol, in English.
- For each symbol, ask what the library says it means. Is the function total? What is the type?
- For each hypothesis, ask whether it can be satisfied.
- Compare with the claim. Is anything weaker, stronger or different?
One more habit, learned from an external release and worked through in Chapter 26: a catalogue may name one principal declaration per result while the machine-checked challenge names four, and which of them carries the announced bound is not settled by the name. The OpenAI Ramsey declarations are source-inspected in this book, not kernel-checked.
Evidence note
The four cases of the wrong-theorem demonstration and both gates are executed
with Lean 4.35 (Chapter 5 — The Wrong Theorem (Part I, Chapter 4)). The facts about Lean in this chapter
(2 - 3 = 0 on Nat, the axiom lists, the binding) were checked with the same
Lean version; the facts about Mathlib’s square root, division and integral are
from Mathlib’s documented definitions and the Part I files that rely on them.
The Fermat bridges are argued, not checked. Full standing: Part IV, evidence
tables.
Exercises
- Read
∀ n : Nat, n ≤ 10 → 0 + n = naloud. Why is it true, and why is it not the claim “for every natural number n, 0 + n = n”? - In Lean, is
∀ a b : Nat, a - b + b = atrue? Find a counterexample, and add the hypothesis that makes it true. - Why does Gabriel’s file need
volume_integrableas well asvolume_eq_pi? Construct a function on (1, ∞) whose Mathlib integral is 0 for this reason. - Write a Lean statement whose English reading is “√x · √x = x for every real x”. Is it true in Lean? Which hypothesis repairs it?
- A colleague says: “the kernel accepted it, so it’s proved”. Write the two-sentence reply this chapter would give.
Worked answers: Chapter 35 — Appendix A: Solutions to the Exercises (Part IV, Appendix A)#chapter-6-what-a-formal-proposition-says.
Further Reading
For deeper study; not sources for the chapter’s claims.
- Freek Wiedijk. “Formal Proof — Getting Started.” Notices of the American Mathematical Society 55(11) (2008), 1408–1414. link. Why read it: A practical introduction to formalization and to the gap between an informal statement and its formal counterpart, closely matching the chapter’s five-part analysis.
- N. G. de Bruijn. “A Survey of the Project AUTOMATH.” In Studies in Logic and the Foundations of Mathematics 133 (Elsevier, 1994), 141–161. DOI. Why read it: The original account of the small trusted checker beneath untrusted proof construction, the idea the chapter calls the de Bruijn criterion.
- Anonymous. “The QED Manifesto.” In Automated Deduction — CADE-12, Lecture Notes in Computer Science 814 (Springer, 1994), 238–251. link. Why read it: The founding vision of a large formalized mathematics library, useful for understanding the ambitions and the anonymity behind early proof-assistant projects.
Next in Part II: Chapter 16, what a proof rests on: kernels, independence and the limits of a second check.