Skip to content
ContentLora

    Tip: press / anywhere to search.

    Explainer

    Proof assistants explained: how computers check mathematical proofs

    A proof assistant is software that checks a formal proof, one in which every logical step is traced back to the axioms of mathematics.[1][2] Its trust rests on a small piece of code called the kernel, which checks everything else.[3][4] Lean, Rocq (formerly Coq) and Isabelle are among the main systems. They are used to formalise mathematics and to verify software.[5][6][7]

    Editor reviewedUpdated Explainer24 claims · 88% primaryMathematics research, Computing, Science
    Reading level: 3 passages differ; the rest is the same for everyone.

    This page is part of the mathematics crash course. Read how mathematical proof works first. Afterwards, read about Lean and mathlib and computer-assisted proofs. Each section offers a beginner and an expert version.

    What a formal proof is

    A proof in a journal skips steps that a trained reader can fill in. A formal proof skips nothing: every logical inference is checked all the way back to the basic axioms of mathematics.[1] Anything beyond a trivial argument then needs so many steps that a computer is used to check them.[2] Thomas Hales, later an author of the formal proof of the Kepler conjecture,[8] sums up the trade-off: a formal proof is less intuitive, but less likely to contain logical errors.[9]

    Jeremy Avigad, a logician, notes that mathematicians have known since the early 20th century that definitions and proofs can be written in formal systems. Proof assistants build on this to store mathematical knowledge in digital form.[10]

    A formal proof is a derivation in which every inference is checked back to the axioms of a fixed foundational system.[1] Beyond trivial cases, the number of inferences makes mechanical checking necessary.[2] Proof assistants make this practical and, in Avigad’s words, encode mathematical knowledge in digital form.[10] The overhead is measured by the de Bruijn factor, the ratio of formal to conventional proof length.[11]

    The trusted kernel

    Why trust a program to check proofs when programs have bugs? Proof assistants are designed so that only a small core has to be trusted. This core, the kernel, is the code that implements the axioms and rules of inference.[3] In the HOL Light system the kernel is under 500 lines of code, but it checks hundreds of thousands of lines of proof.[4] Nothing can become a theorem except by passing through it.[12]

    In HOL Light, the logic has three mathematical axioms (extensionality, infinity and choice) and ten inference rules.[13] Its kernel, under 500 lines, checks far larger libraries,[4] and nothing can become a theorem except through it.[12] The Rocq Prover likewise machine-checks proofs with a relatively small certification kernel.[6] Lean’s developers present its minimal trusted kernel in the same terms.[14]

    The main systems

    The idea is old. In 1968 N. G. de Bruijn designed Automath, the first program to check general mathematical proofs.[15] By 2008, Hales wrote, proof assistants had been developed for decades but had only recently become practical for major theorems, such as the four colour theorem, the prime number theorem and the Jordan curve theorem.[16]

    • Rocq Prover, formerly the Coq Proof Assistant, began in 1984 at INRIA-Rocquencourt.[17] It was used for the formal proof of the four colour theorem completed in 2005.[18]
    • Isabelle is a generic proof assistant from the University of Cambridge and TU München. Its examples and applications are collected in the Archive of Formal Proofs.[7]
    • HOL Light has a kernel of fewer than 500 lines of code.[4] It was used with Isabelle for the Flyspeck proof of the Kepler conjecture.[8]
    • Lean is an open-source programming language and proof assistant.[5] Its community library is mathlib. See lean-and-mathlib.

    What proof assistants can and can’t guarantee

    Hales argued in 2008 that the best proof assistants make errors far less often than the most prestigious journals.[19] He knew of only one proof ever retracted because of a prover bug, a false 1995 claim about the Robbins conjecture made with a system he did not rank as top-tier.[20]

    A checked proof is still not a guarantee of absolute certainty. A bug in the compiler, operating system or hardware could compromise it, and Hales calls verification a task that is never complete.[21] In September 2026 the security firm Trail of Bits reported a Lean bug that let a nonsense “proof” of Fermat’s Last Theorem pass in stable versions up to 4.33.1. The firm said it was not a kernel soundness issue: the “proof” relied on an extra axiom, native_decide, that brings the compiler into the trusted boundary. The patch is in v4.34.0-rc1, and the firm advises following Lean’s guidance for validating proofs from outside sources.[22] A machine also checks only the formal statement it is given. One 2026 AI-generated formalisation of Fermat’s Last Theorem warns readers that where a theorem’s name and its statement disagree, the statement is what was proved.[23]

    The residual risks lie in what the kernel itself runs on: a bug in the compiler, operating system or hardware could compromise a formal proof.[21] There is also the specification gap: whether the formal statement matches the informal theorem. A 2026 machine-generated FLT formalisation notes that its intermediate names are machine-generated, and that where a name and a statement disagree, the statement is what was proved.[23] For the software side of the same ideas, see formal verification.

    Proof assistants and AI

    Google DeepMind points to a key advantage of formal languages for AI: proofs in them can be checked automatically, while natural-language reasoning can contain plausible but wrong steps.[24] This is why many AI-for-mathematics systems produce Lean proofs. See AI for mathematics and the debate over whether every proof should be checked by computer.

    Next in the crash course

    More in Mathematics research

    Developing in AI & Computing

    Questions readers ask

    What is a proof assistant in simple terms?

    A program that checks a mathematical proof written in a precise formal language. A formal proof traces every logical step back to the axioms, and the program checks every one of those steps.[1][2]

    Why should anyone trust the proof assistant itself?

    Because the part that has to be trusted is small. The kernel implements the axioms and rules of inference; in HOL Light it takes fewer than 500 lines of code, yet it checks hundreds of thousands of lines of proof.[3][4]

    What are the main proof assistants?

    Examples include Lean, the Rocq Prover (formerly Coq, begun in 1984), Isabelle and HOL Light.[5][17][7][13]

    Does a computer-checked proof mean the result is certainly true?

    Not absolutely. A bug in the compiler, operating system or hardware could still compromise a formal proof, and the formal statement must say what humans mean. Hales argued in 2008 that top proof assistants still have far lower error rates than leading journals.[21][19][23]

    How much longer is a formal proof than a normal one?

    Longer, because every step is spelled out. The ratio of formal to conventional length is called the de Bruijn factor and is the standard measure of that overhead.[11]

    Sources

    · 24 claims from 10 publishers

    Each numbered claim is a statement we checked against the sources listed with it. Tap a number in the text to see its sources in place.

    1. [1]

      A formal proof is one in which every logical inference has been checked all the way back to the fundamental axioms of mathematics. confirmedas of 2008-12-01

      • Formal Proof · Notices of the American Mathematical Society (Thomas C. Hales) · Primary source · 2008-12-01 · p. 1371 (retrieved 2026-11-22)
    2. [2]

      For anything beyond a trivial proof, the number of logical inferences in a formal proof is so large that a computer is used to check the steps. confirmedas of 2008-12-01

      • Formal Proof · Notices of the American Mathematical Society (Thomas C. Hales) · Primary source · 2008-12-01 · p. 1371 (retrieved 2026-11-22)
    3. [3]

      The computer code in a proof assistant that implements the axioms and rules of inference is called the kernel of the system. confirmedas of 2008-12-01

      • Formal Proof · Notices of the American Mathematical Society (Thomas C. Hales) · Primary source · 2008-12-01 · p. 1376 (retrieved 2026-11-22)
    4. [4]

      The kernel of the HOL Light proof assistant takes fewer than 500 lines of code, yet hundreds of thousands of lines of proof are checked by it. confirmedas of 2008-12-01

      • Formal Proof · Notices of the American Mathematical Society (Thomas C. Hales) · Primary source · 2008-12-01 · p. 1376 (retrieved 2026-11-22)
      • Formal Proof · Notices of the American Mathematical Society (Thomas C. Hales) · Primary source · 2008-12-01 · p. 1376 (retrieved 2026-11-22)
    5. [5]

      Lean is an open-source programming language and proof assistant. confirmedas of 2026-11-22

    6. [6]

      The Rocq Prover lets users state mathematical theorems and software specifications, develop formal proofs interactively, and have the proofs machine-checked by a relatively small certification kernel. confirmedas of 2026-11-22

      • About the Rocq Prover · Rocq Prover · Primary source · What is the Rocq Prover? (retrieved 2026-11-22)
      • About the Rocq Prover · Rocq Prover · Primary source · What is the Rocq Prover? (retrieved 2026-11-22)
      • About the Rocq Prover · Rocq Prover · Primary source · What is the Rocq Prover? (retrieved 2026-11-22)
    7. [7]

      Isabelle is a generic proof assistant, originally developed at the University of Cambridge and the Technische Universität München, whose examples and applications are collected in the Archive of Formal Proofs. confirmedas of 2026-11-22

      • Isabelle · Technical University of Munich / University of Cambridge · Primary source · What is Isabelle? (retrieved 2026-11-22)
      • Isabelle · Technical University of Munich / University of Cambridge · Primary source · What is Isabelle? (retrieved 2026-11-22)
      • Isabelle · Technical University of Munich / University of Cambridge · Primary source · Distribution & Support (retrieved 2026-11-22)
    8. [8]

      The Flyspeck project produced a formal proof of the Kepler conjecture on dense sphere packings, using the HOL Light and Isabelle proof assistants; a 2015 paper by Hales and co-authors is the project's official published account. reportedas of 2015-01-09

    9. [9]

      Thomas Hales describes a formal proof as less intuitive than a traditional proof, and less susceptible to logical errors. confirmedas of 2008-12-01

      • Formal Proof · Notices of the American Mathematical Society (Thomas C. Hales) · Primary source · 2008-12-01 · p. 1371 (retrieved 2026-11-22)
    10. [10]

      In a 2023 survey, Jeremy Avigad writes that computational proof assistants make it possible to encode mathematical knowledge in digital form, building on the early-20th-century understanding that definitions and proofs can be represented in formal systems. reportedas of 2023-11-04

    11. [11]

      The ratio of the length of a formal proof to the corresponding conventional proof, called the de Bruijn factor, is the standard benchmark for the overhead of a formal proof. confirmedas of 2008-12-01

      • Formal Proof · Notices of the American Mathematical Society (Thomas C. Hales) · Primary source · 2008-12-01 · Box: N. G. de Bruijn (retrieved 2026-11-22)
    12. [12]

      In HOL Light, the type system of the implementation language prevents a user from creating a theorem by any means except through the small fixed kernel. confirmedas of 2008-12-01

      • Formal Proof · Notices of the American Mathematical Society (Thomas C. Hales) · Primary source · 2008-12-01 · p. 1376 (retrieved 2026-11-22)
    13. [13]

      HOL Light has three mathematical axioms (extensionality, infinity and choice) and ten rules of inference. confirmedas of 2008-12-01

      • Formal Proof · Notices of the American Mathematical Society (Thomas C. Hales) · Primary source · 2008-12-01 · p. 1374 (retrieved 2026-11-22)
      • Formal Proof · Notices of the American Mathematical Society (Thomas C. Hales) · Primary source · 2008-12-01 · p. 1374 (retrieved 2026-11-22)
    14. [14]

      Lean's developers say its minimal trusted kernel is what guarantees the correctness of proofs it checks. confirmedas of 2026-11-22

    15. [15]

      In 1968 N. G. de Bruijn designed Automath, the first computer program to check the validity of general mathematical proofs. confirmedas of 2008-12-01

      • Formal Proof · Notices of the American Mathematical Society (Thomas C. Hales) · Primary source · 2008-12-01 · Box: Early Milestones, 1968 (retrieved 2026-11-22)
    16. [16]

      Hales wrote in 2008 that proof assistants had been developed for decades but only recently had it become practical to prove major theorems formally; his table of examples includes the four colour theorem, the prime number theorem and the Jordan curve theorem. confirmedas of 2008-12-01

      • Formal Proof · Notices of the American Mathematical Society (Thomas C. Hales) · Primary source · 2008-12-01 · p. 1372 (retrieved 2026-11-22)
      • Formal Proof · Notices of the American Mathematical Society (Thomas C. Hales) · Primary source · 2008-12-01 · p. 1372, table of formal proofs (retrieved 2026-11-22)
    17. [17]

      The Rocq Prover, formerly known as the Coq Proof Assistant, began in 1984 as an implementation of the Calculus of Constructions at INRIA-Rocquencourt. confirmedas of 2026-11-22

    18. [18]

      Georges Gonthier's team, which used the Coq proof assistant, formalised the entire proof of the four colour theorem, not just its computer code, completing it in 2005. confirmedas of 2008-12-01

    19. [19]

      Hales argued in 2008 that the error rates of top-tier theorem-proving systems are orders of magnitude lower than those of the most prestigious mathematical journals. confirmedas of 2008-12-01

      • Formal Proof · Notices of the American Mathematical Society (Thomas C. Hales) · Primary source · 2008-12-01 · p. 1376 (retrieved 2026-11-22)
    20. [20]

      Hales reported that, to his knowledge, only one proof had ever been retracted because of a bug in a theorem-proving system, in a system he did not rank as top-tier, a false 1995 claim that the REVEAL prover had solved the Robbins conjecture. confirmedas of 2008-12-01

      • Formal Proof · Notices of the American Mathematical Society (Thomas C. Hales) · Primary source · 2008-12-01 · p. 1376 (retrieved 2026-11-22)
      • Formal Proof · Notices of the American Mathematical Society (Thomas C. Hales) · Primary source · 2008-12-01 · p. 1376 (retrieved 2026-11-22)
    21. [21]

      A bug in the compiler, operating system or hardware can still compromise a formal proof, and Hales describes the task of verification as never complete. confirmedas of 2008-12-01

      • Formal Proof · Notices of the American Mathematical Society (Thomas C. Hales) · Primary source · 2008-12-01 · p. 1377 (retrieved 2026-11-22)
      • Formal Proof · Notices of the American Mathematical Society (Thomas C. Hales) · Primary source · 2008-12-01 · p. 1377, footnote 3 (retrieved 2026-11-22)
    22. [22]

      In September 2026 the security firm Trail of Bits reported a Lean bug, which it said was not a kernel soundness issue, that let a nonsense "proof" of Fermat's Last Theorem relying on the extra native_decide axiom pass in stable Lean versions up to 4.33.1; the patch is in v4.34.0-rc1, and the firm advises following Lean's guidance for validating external proofs. reportedas of 2026-09-09

    23. [23]

      The repository says its Lean sources were produced by AI agents building on human-written open-source Lean, are written to be checked rather than read, that names are machine-generated, and that where a theorem's name and its statement disagree, the statement is what was proved; it describes the code as a research artifact that is not maintained. reportedas of 2026-11-22

    24. [24]

      Google DeepMind notes that proofs in formal languages can be verified for correctness, whereas natural-language approaches can produce plausible but incorrect reasoning steps. confirmedas of 2024-07-25

    Revision history (1)
    1. Page created.

    Created Nov 22, 2026. Last reviewed by an editor on Nov 22, 2026. Next scheduled review: Aug 16, 2027.

    Cite this page

    "Proof assistants explained: how computers check mathematical proofs." ContentLora, updated Nov 22, 2026. https://contentlora.com/explain/proof-assistants-explained

    Spotted an error? Suggest a correction or emailcorrections@contentlora.com.