Large-Scale Formal Proofs: How to Verify Them and How to Understand Them
Formal proofs of major number-theoretic claims can now stretch to millions of lines, far beyond what any human can read line by line. This article explains a practical, tool-agnostic verification methodology built on five layers: anchoring the proposition, independent reproduction, comparison to prevent substitution, kernel and axiom auditing, and a clear division of labor between humans and machines. It covers why definitions must be frozen before proofs are checked, how to reproduce massive builds across isolated environments, how to detect weakened or altered statements, what an axiom ledger proves (and what it does not), and how teams should communicate results when machine verification and human understanding diverge. The result is a checklist for ensuring that a formal verification artifact is genuinely trustworthy rather than merely a green checkmark.
The Real Problem Is Not Whether Machines Can Compute, but Why We Should Believe Them
Turning a century-old number-theoretic conjecture into a formalized statement and having a proof assistant check it step by step sounds like moving a blackboard derivation into a compiler. The genuinely hard engineering problem is something else: proof texts can grow to millions of lines. No human can read them line by line, yet three independent questions must still be answered.
First, is the statement being proved actually the original proposition—or a weaker, narrower, or definition-swapped stand-in? Second, does the checking rely only on a small, previously agreed-upon set of axioms and a trusted kernel, without “sneaking things through” via executable scripts, extra assumptions, or type-system loopholes? Third, even if the machine reports success, can someone on the team explain why the key constructions work, so that modeling errors can be caught, rather than merely archiving a green report?
Below, I describe a workable verification approach organized in five layers: proposition anchoring, independent reproduction, comparison to prevent substitution, kernel and axiom auditing, and human–machine division of labor. The discussion concerns formal proof engineering in general and does not depend on any particular proof assistant or any special capabilities of AI programming products.
Anchor the Proposition Before Proving Anything
The first gate in formalization is not derivation technique but definition. In number theory, the same name can carry slight differences across textbooks in quantifier scope, the way analytic continuation is handled, or the exclusion conditions for “non-trivial zeros.” If the proof library references a standard proposition that the community has long since fixed and that multiple experts have reviewed, subsequent checks have a common target. If the proof authors also rewrite the definitions while giving a proof, reviewers must separate “definition changes” from “derivation correctness.”
A practical approach is to freeze the statement as a separate artifact:
- The proposition file contains only the statement, references to prerequisite definitions, and a version number—no proof scripts.
- Every patch to definitions goes through a separate change note that spells out its correspondence, item by item, with the classical statement.
- The review checklist explicitly asks whether boundary conditions—zeros, domains of series convergence, fields of nonzero characteristic, and so on—match the target proposition.
Conceptually, you can separate “what is to be proved” from “how it is proved” into distinct artifacts:
statement.lock # frozen statement and definition hashesproof/ # proofs organized by moduleexport/check.log # static export containing only kernel-checkable contentaudit/axioms.txt # the list of axioms actually used
Without a lock file, even the longest proof is just a manuscript with nothing to check it against.
Why Massive Proofs Must Be Reproduced Module by Module
A million-line proof cannot establish confidence through a single person reading it; confidence can only come from reproducible builds. A sound engineering structure typically looks like this: split the library into modules along mathematical-object boundaries; let modules communicate only through already-checked interface theorems; give each module a target that can be built locally; and export a static proof artifact for the whole library that contains no executable side channels.
Independent reproduction should meet at least these requirements:
- The build environment is described by containers or a locked toolchain—not “it passes on someone’s laptop.” Dependencies, the proof assistant kernel version, and the standard-library commit are all written into a manifest.
- Multiple people fully compile all modules in isolated environments and compare the cryptographic digests of the exported files, instead of just looking at the final “success” line.
- Build logs and artifacts are stored in object storage and retained long enough for after-the-fact audits; monitoring only alerts on build failures and digest mismatches, and does not replace mathematical review.
When reproduction fails, suspect environment drift and implicit dependencies first, rather than immediately declaring the proposition refuted. In formalization projects, a large share of “broken proofs” turn out to be cache, path, or standard-library version inconsistencies.
Preventing Substitution: Compare Propositions, Not Vibes
A machine can prove a statement that merely looks like the target. Common substitutions include narrowing “all” to “a subset of positive density,” turning an unconditional statement into one that depends on additional assumptions, or excluding an extra class of points in the definition of the zeros. What’s needed is a comparison that is independent of the proof’s provenance: using the frozen proposition lock, perform structural comparison against the final exported theorem’s name, type, and dependency closure.
At minimum, compare four things:
- Whether the target theorem’s type matches the lock file verbatim (after the agreed syntactic normalization).
- Whether the dependency closure contains any unexpected assumptions, axioms, or incomplete declarations such as “sorry” placeholders.
- Whether the exported artifact has been stripped of executable scripts, code generators, and external solver calls; the checker should consume only static proof terms.
- Whether at least two independently implemented comparison or checking paths agree, so that a defect in a single tool is not mistaken for mathematical fact.
If only a natural-language summary is available and no machine-comparable proposition type can be produced, the work should be considered not yet in a verifiable state.
What Kernels, Axioms, and “Meta-Checks” Each Prove
The trusted base of a proof assistant is small: a kernel responsible for type checking, plus a explicitly enumerated set of logical axioms. The value of a large library lies in reducing complex derivations down to this base—not in trusting a particular vendor’s brand.
When auditing, produce an axiom bill: for each final statement, which axioms it depends on, and whether those stay within the set the team agreed to allow in advance (for example, only the usual axioms of classical logic, with no ad hoc addition of an assumption equivalent to the proposition itself). Any extra entry on the bill must be explainable by a human; otherwise the logical strength of the whole proof has changed.
You can also re-check the same static export with a second checker. A second checker may itself come with an argument that “it will not accept false proofs,” but that merely moves trust from implementation A to implementation B; it does not automatically generate mathematical insight. The engineering conclusion should state clearly: passing dual-kernel review means the exported term is well-typed under the stated axioms. It does not mean the modeling captured the original problem, nor that humans understand the proof’s ideas.
Intelligent Collaboration Can Accelerate Derivation, but Cannot Sign Off on Understanding
In the final sprint, AI programming tools tend to be especially good at filling in lengthy technical lemmas along an already-chosen direction: constructing lifting chains of a specific length, unfolding estimates, and batch-rewriting definitions. Humans are better at guarding analogies, choosing the overall route, and judging whether a lemma is worth proving. The speed differential creates a dangerous experience: near the end, a person sees only a string of passing subgoals but cannot articulate why any one step is necessary.
A workable division of labor:
- Humans own the proposition’s boundaries, the key analogies, and the structural choices that are “not delegable,” written up as a short proof outline.
- Tools search for local derivations within the constraints of that outline. Every construction that goes beyond the outline must be written back as a human-readable lemma statement, not left as a machine trace.
- Review samples according to the outline, not uniformly by line number. The focus is on whether newly introduced objects change the strength of the proposition.
If the outline cannot cover a key construction in the final proof, mark the state as “machine check passed, understanding not closed,” rather than announcing to the outside world that the conjecture has been mastered. Passing the check and closing the understanding are two separate acceptance gates.
Once Conviction and Understanding Split, How Should Teams Make Decisions?
Very long proofs separate “we are justified in believing the conclusion” from “we can explain the reasoning to a colleague.” The former is supported by the kernel, the axiom bill, and independent reproduction; the latter depends on the proof outline, natural-language explanations of key lemmas, and someone who can point to where a change can be made and what would break as a result.
It is advisable to explicitly distinguish four levels in review conclusions, rather than summarizing everything as “proven”:
- Proposition anchored: the statement aligns with the classical target, and changes are traceable.
- Checking reproduced: digests match across environments, there are no incomplete declarations, and the axioms stay within scope.
- Substitution checked: the final type matches the lock file.
- Understanding handed over: there exists an outline independent of any chat log, and another person with domain background can use it to locate the key steps.
Reaching only the first three levels is suitable for internal archiving and continued review. External statements should be limited to: “Under the stated axioms and definitions, this formal artifact passed the listed checks.” Do not turn a passing check log into a final verdict on a classical conjecture. Major mathematical propositions still go through the mathematical community’s long-term review; a successful formalization is one necessary piece of evidence, not the only social consensus mechanism.
The Same Class of Risks as Critical-System Engineering
In chip and foundational-software supply chains, people likewise face situations where “there are many certificates, but the provenance and the boundaries of what they certify are unclear.” Formal proofs are the mathematical miniature of this: verifiable artifacts can compress trust, but they cannot replace understanding of the specification. If the specification is wrong, the machine will efficiently prove the wrong specification.
Therefore, cloud-based build and archival capabilities should be used only as reproducibility infrastructure: container platforms to lock the toolchain, object storage to preserve exported artifacts and axiom bills, and logging plus monitoring to detect digest drift. These capabilities do not produce mathematical correctness; they only guarantee that “what was checked then is exactly this file now.”
A Minimal Checklist for Getting Started
Before beginning a serious formalization effort, use the following checklist for self-assessment. If you cannot answer these, do not proceed to external communication.
- From which version was the standard proposition’s definition frozen, and who reviewed the definition itself?
- Can the full build be reproduced in a clean environment, and who is the second person to verify the digest?
- Is the axiom bill short enough to be read by a human?
- Does a static export exist that is decoupled from the proof scripts?
- Which parts of the derivation currently have only machine traces and no human outline?
- If the main construction in the outline is refuted, what remains of the proof?
The value of formalization and intelligent collaboration is making the checkable parts extremely fast and extremely rigorous. The human responsibility is to keep the proposition from being swapped out and to leave “why it holds” in a transferable argument. Do both, and machine verification will not become an authority that cannot be questioned.
