Education logo

When a Computer Says “Proof”: Who Checks the Checker?

The Kepler conjecture took nearly 400 years to solve, and even a team of expert mathematicians could not fully verify its computer-assisted proof. Projects such as Flyspeck and Lean offer a different standard of mathematical certainty: every formal deduction can be checked by a small piece of software. But what exactly does that guarantee?

By JinPublished about 11 hours ago • 8 min read

In mathematics, a proof is supposed to settle an argument. Yet in 1998, when Thomas Hales and Samuel Ferguson announced a proof of the Kepler conjecture, the mathematical community faced an unusual problem: the proof was too complicated for humans to check every computational step with complete confidence.

The result concerned a question that sounded almost trivial.

Take identical oranges and stack them as tightly as possible. How much of the available space can they occupy? The familiar arrangement used by fruit sellers, with each layer sitting in the gaps of the layer below, achieves a packing density of approximately 74.05%.

Johannes Kepler proposed in 1611 that no arrangement of identical spheres in three-dimensional space could do better. Mathematicians spent almost four centuries trying to prove it.

Hales and Ferguson finally supplied the missing proof. The problem was that their argument relied heavily on computer calculations, and checking those calculations became a research project of its own.

That difficulty eventually led to Flyspeck, an ambitious attempt to make the entire proof formally verifiable. Its history helps explain why mathematicians now use proof assistants such as Lean.

The 99% problem

Hales' original proof ran to more than 250 pages across a series of papers. It also relied on extensive calculations involving global optimisation, linear programming and interval arithmetic. The associated computer files and data required more than 3GB of storage.

A team of 12 referees spent more than four years checking the work. Gábor Fejes Tóth led the review effort. The reviewers became approximately 99% confident that the proof was correct, but they could not certify every computer-assisted calculation to their satisfaction.

That remaining 1% wasn't an admission that the conjecture might be false. It described a gap in verification.

Think about what the reviewers faced. They could inspect the mathematical argument and run the supplied programs, but the programs themselves contained complicated calculations. Checking a program's output isn't the same as establishing that every operation inside the program follows the required mathematical rules.

Hales wanted a stronger form of assurance than a panel of experts saying they were almost certain.

In January 2003, he announced a project called Flyspeck, short for Formal Proof of the Kepler Conjecture. The objective was to translate the mathematical argument and its computational components into a form that a proof assistant could check mechanically.

The project took more than eleven years. It was officially completed on August 10, 2014, and its formal proof was subsequently published in Forum of Mathematics, Pi in 2017.

There is an important technical distinction here: Flyspeck used HOL Light and Isabelle, not Lean. Lean belongs to the same broader family of interactive theorem provers, but it wasn't the software behind this particular achievement.

What does a computer actually check?

The easiest way to understand a proof assistant is to stop thinking of it as a machine that reads mathematical sentences and decides whether they make sense.

It works with a formal logical system.

Mathematics begins with definitions, axioms and rules of inference. A proof establishes that a particular proposition follows from those assumptions. A proof assistant encodes these objects in a language where every logical step has a precise representation.

The theoretical connection is known as the Curry–Howard correspondence, often summarised as propositions-as-types and proofs-as-programs.

Take a simple statement:

If proposition A is true, proposition B must also be true.

In Lean, this implication can be represented by the function type A → B. A proof of that implication is a function that accepts a proof of A and produces a proof of B.

This may sound like a programming trick, but the correspondence is much deeper. Logical operations have corresponding type constructions, and a valid proof can be represented by a term belonging to the required type.

For example, to prove that A and B are both true, the system needs a proof of A and a proof of B. To prove an implication, it needs a valid way to transform the assumption into the conclusion.

The computer isn't guessing whether a mathematical sentence looks convincing. It checks whether a formal object satisfies the rules required by its type.

This changes how mathematical reasoning can be represented.

Why Lean can check mathematics

Lean was initiated by Leonardo de Moura at Microsoft Research in 2013. Its first public release, Lean 0.1, arrived on June 16, 2014. Lean 4 is a later reimplementation of the system, designed to support both theorem proving and general-purpose programming.

One example makes the underlying approach easier to understand.

Lean doesn't treat natural numbers as mysterious objects that simply exist. It defines them inductively, beginning with zero and a successor operation.

Zero is a natural number. If a number is natural, its successor is also natural.

From these definitions, the system can construct arithmetic operations and prove their properties. Addition, multiplication and other mathematical structures are built on definitions that can themselves be checked.

The same approach extends to much harder mathematics. Real numbers, groups, vector spaces and advanced algebraic structures can all be defined within the formal system.

This is where Lean's mathematical library becomes important.

Mathlib is a shared library of formalised mathematics maintained by a community of mathematicians and computer scientists. It contains definitions and previously proven results that researchers can reuse rather than rebuilding everything from the beginning.

A November 26, 2026 snapshot reported approximately 296,731 theorems and 142,208 definitions, with 772 contributors. The counts depend on the repository version and counting method, but they give an idea of the scale of the project.

A researcher working on a new theorem can therefore build on thousands of existing mathematical results.

The library is not a collection of unverified answers. Its formal proofs pass through Lean's checking process.

The most important component is surprisingly small

Lean contains parsers, elaborators, automated tactics, libraries and other software that make theorem proving practical.

Why trust all of them?

The answer is the kernel.

When someone writes a proof in Lean, they usually don't construct every low-level logical step manually. They use tactics that automate repetitive reasoning, simplify expressions and search for applicable theorems.

Those tactics generate a formal proof term. The elaborator translates the user's convenient syntax into Lean's underlying type theory.

The kernel then checks the resulting term.

The distinction is important because a tactic can contain a bug without automatically making an incorrect theorem valid. If it produces an invalid proof term, the kernel rejects it.

Lean's official reference describes the kernel as a relatively small type checker for its core theory. The system also has independent kernel implementations in Rust and Lean itself, allowing researchers to compare results across implementations.

Think of a university examination.

A student may solve a problem using a calculator, a spreadsheet or a sophisticated computer program. The examiner doesn't need to trust every button the student pressed. The examiner needs a verifiable derivation that satisfies the accepted mathematical rules.

Lean follows a similar division of responsibility.

The complicated tools help construct the proof. The kernel checks whether the final mathematical object is valid.

That is the architectural reason proof assistants can offer stronger verification than asking another mathematician to read hundreds of pages.

But who checks the kernel?

Now we reach the question that makes formal verification interesting.

A kernel is software. Software can contain bugs.

If the kernel incorrectly accepts an invalid proof, the entire verification process could fail. The solution is to keep the trusted component small, inspect its implementation and, where possible, verify results with independent checkers.

Lean also provides ways to inspect the assumptions behind a theorem.

Consider the sorry command. It allows developers to leave an incomplete proof temporarily so they can work on other parts of a project. Lean accepts this as a placeholder, but it introduces a special axiom called sorryAx.

A finished proof that depends on this placeholder isn't fully established.

Researchers can inspect a theorem's dependencies using:

#print axioms theoremName

This command identifies the axioms used directly or indirectly by the theorem. If sorryAx appears, the proof still contains an incomplete component.

Lean also has standard logical axioms, including classical choice and propositional extensionality. These are accepted foundations of its mathematical environment.

The distinction between an accepted axiom and an unfinished proof matters. A proof assistant cannot establish the truth of an arbitrary additional assumption simply by checking that it has been declared.

A false axiom can undermine the entire system. For example, if someone assumes that a contradiction is true, classical logic allows any proposition to follow from it.

The kernel can check that deduction perfectly. It cannot make a false assumption true.

The statement itself can also be wrong

There is another weakness, and it doesn't involve software bugs.

Suppose a mathematician wants to prove proposition P but accidentally formalises proposition Q. Lean may successfully verify Q, even though Q isn't the claim the mathematician intended to establish.

The kernel checks the formal statement exactly as written. It doesn't understand the original research question well enough to identify a mistranslation.

The Lean documentation explicitly separates these two issues: whether a theorem has a valid proof, and whether its formal statement means what its author intended.

Consider a simple example. A researcher accidentally defines a mathematical problem with an impossible condition. Every conclusion derived from that condition might be formally valid, but the result could say very little about the original problem.

This is why formalisation requires mathematical judgement. Researchers must verify that the definitions, assumptions and theorem statements accurately represent the intended mathematics.

The software can check the proof. It can't independently establish that the right question was asked.

Formal verification changes the work mathematicians have to do

Flyspeck took more than a decade because translating sophisticated mathematics into a machine-checkable form requires substantial effort.

The difficulty isn't simply typing equations into a programming language. Researchers must define mathematical objects precisely, connect each definition to established concepts and construct every missing logical link.

Some results that appear obvious to a human mathematician require lengthy formal derivations. Other results become short because Mathlib already contains the necessary lemmas.

That difference matters.

Formalisation shifts some of the burden from checking whether an informal proof contains a hidden mistake to checking whether the formal statement, its assumptions and its proof dependencies match the intended mathematics.

It also creates reusable mathematical infrastructure. Once a theorem has been formalised, other researchers can import it and rely on its checked proof rather than reconstructing the argument.

AI systems are beginning to make this process more accessible, particularly by translating informal mathematical ideas into Lean code and suggesting proof steps. But the final proof still needs to satisfy the kernel's rules.

The computer doesn't replace mathematical creativity. It takes responsibility for a narrower task that humans have historically performed imperfectly: checking whether a long chain of deductions follows the rules.

There is a useful distinction to keep in mind when reading a green verification mark on a theorem.

It doesn't certify that every interpretation, definition or assumption in the researcher's work is correct. It certifies that the formal proof establishes the formal proposition under the declared assumptions.

That is already an extraordinary achievement. And it is a much more precise promise than saying that twelve mathematicians are 99% certain.

collegestudentteacherdegreehow tocourses

About the Creator

Jin

Writer of reamstories

https://reamstories.com/jin

Enjoyed the story? Support the Creator.

Subscribe for free to receive all their stories in your feed. You could also become a paid subscriber or give them a one-off tip, letting them know you appreciate their work.

Subscribe For Free

Reader insights

Share your insights about this piece.

How does it work?

Add your insights

Comments

There are no comments for this story

Be the first to respond and start the conversation.

Sign in to comment
    Written by Jin