LLM-Assisted Formal Proof: How to Verify a Claim

    Reports of a mathematician using mainstream large language models to prove the Riemann Hypothesis and the Generalized Riemann Hypothesis have drawn attention, but the proof and its associated formal code remain unverified. This article explains how to evaluate such claims: separate known facts from assertions, understand the human–LLM division of labor, examine what formal proof assistants can and cannot guarantee, recognize LLM capability boundaries, and apply a verification workflow suitable for extremely large formal proof codebases.

    1. First Separate Known Facts from Claims Under Verification

    According to reports, a mathematician at an AI company has claimed to have found a proof of the Riemann Hypothesis and the Generalized Riemann Hypothesis with the help of mainstream large language models. The reported artifacts include more than 17 million lines of formal code, 14 compressed files, and roughly 250,000 pages of written proof. At this stage, these numbers and the proof itself are claims. They have not been independently reviewed by mathematicians, published in a peer-reviewed journal, or accepted through peer review.

    The Riemann Hypothesis is one of the Millennium Prize Problems, and no accepted proof or counterexample exists. When evaluating such a claim, start with three questions:

    • Is the proof publicly available?
    • Can third parties independently compile the code?
    • Have the key conclusions been reviewed by experts?

    Until these conditions are met, “proved” should be understood as “claimed.”

    2. Common Division of Labor in Human–LLM Proof Work

    The reported work used a layered approach: humans set the architecture, and LLMs fill in details. The mathematician determined the overall proof strategy, the core method, and the logical connections across key gaps. The LLM derived intermediate lemmas, filled in local arguments, and translated natural-language mathematical arguments into formal code.

    This division is reasonable. LLMs can drift in long-range reasoning and global planning, so humans need to set the direction. LLMs are stronger at local pattern matching and syntax transformation, which can absorb a large amount of repetitive work. A useful analogy is software development: an architect defines the system design, and an AI coding assistant implements specific modules.

    A reusable workflow looks like this:

    1. Human defines the proof skeleton.
    2. LLM generates candidate lemmas.
    3. Candidate lemmas are written as formal code.
    4. A proof assistant compiles and checks the code.
    5. Human reviewers verify key steps.
    6. The work goes through peer review.

    Every step should be recorded for traceability.

    3. What Formal Code Can and Cannot Guarantee

    Formal proof systems such as Lean, Coq (now Rocq), and Isabelle require every reasoning step to satisfy strict type rules and inference rules. The proof assistant checks code line by line, eliminating jumps and vague expressions that are common in natural-language mathematics. This is the main value of formalization.

    However, a successful compile does not mean the proof is mathematically correct. Three common risks need attention.

    First, misformalization. The code may prove a different statement from the one intended. For example, a condition may be omitted, or a definition may be too weak. A successful compile only shows that the code is internally consistent, not that it corresponds to the target proposition.

    Second, hidden assumptions. The code may rely on extra axioms or placeholders such as sorry in Lean or admit in Coq to skip proof obligations. A verifier should list the axioms actually used by the code and search for unfinished placeholders.

    Third, version dependency. Different versions of proof assistants and mathematical libraries may interpret the same code differently. Without pinned versions and dependencies, third parties may not be able to reproduce the result.

    Engineering practices can reduce these risks, but cannot eliminate them. Compilation is therefore the starting point of verification, not the endpoint.

    4. LLM Capability Boundaries

    In this kind of work, LLMs are well suited to:

    • Drafting candidate lemmas.
    • Converting known proof ideas into code syntax.
    • Searching large codebases for existing usable theorems.
    • Explaining local derivations.

    LLMs should not be relied on alone for:

    • Guaranteeing global logical correctness.
    • Determining whether a proof covers every case of the original statement.
    • Declaring a derivation reliable without human review.

    The report says that near the end, the LLM produced derivations that went beyond the mathematician’s immediate understanding. This should be treated carefully. The model may have found a valid path, or it may have produced plausible-looking steps with subtle errors. Either way, human understanding of the derivation cannot be skipped. Asking the model to generate readable explanations can help with review, but those explanations themselves must be checked.

    5. Verification Workflow for Very Large Codebases

    A codebase of 17 million lines is far beyond line-by-line human reading. Verification has to be systematic. The following checklist is useful:

    1. Integrity check. Compute SHA-256 hashes for each compressed archive and source file, publish the hash values, and ensure downloaded files match the release.
    2. Environment pinning. Record the exact proof assistant version, the mathematical library versions and commit IDs, and provide a reproducible build script.
    3. Batch compilation. Split code by module or file. Parts with clear dependency relationships can be checked in parallel, limiting the impact of any single failure.
    4. Failure localization. Save complete build logs and record the file, line number, and lemma name for each failure.
    5. Axiom audit. Run axiom checks on the main theorems, list the actual axioms used, and confirm that there are no undeclared additional assumptions.
    6. Placeholder search. Scan all code for unfinished markers such as sorry or admit, count them, and explain how each occurrence is handled.
    7. Human sampling. Review a pre-announced fixed proportion of lemmas manually, focusing on whether definitions match the original statement and whether key transitions are valid.
    8. Independent reproduction. Invite different teams to compile the code in independent environments and compare the results.

    This workflow is independent of any particular vendor or cloud platform. No matter where the code is hosted, the same standards apply.

    6. Conclusion

    LLMs can already perform valuable local work in formal proof: generating lemma drafts, translating syntax, and retrieving theorems. That has practical value for researchers. But the phrase “proof completed with LLM assistance” currently needs to be supported by public code, independent compilation, axiom audit, human review, and peer review.

    For developers and researchers, learning to verify a claim is more useful than trying to decide the truth of a headline. The advantage of formal proof is that it can be machine-checked. If the verification workflow is complete, confidence can be built step by step. Before those steps are complete, any major proof claim should be treated with caution.