LLM-Assisted Mathematical Proofs: Opportunities, Workflow, and Verification Checklist

    A mathematician recently claimed to have found proof paths for the Riemann Hypothesis and the Generalized Riemann Hypothesis with the help of a large language model. Rather than judging that unverified claim, this article explains the general methodology of using LLMs in formal theorem proving: how models work with interactive theorem provers like Lean and Coq, a reproducible four-step workflow, why compiler-passed steps do not guarantee a valid overall proof, compute and engineering considerations for proof search, and the key points readers should check when evaluating AI-assisted proofs.

    Background: An Unverified Claim

    A mathematician recently stated publicly that, with the help of a large language model, proof paths were found for the Riemann Hypothesis and the Generalized Riemann Hypothesis. According to the original report, this claim still awaits peer review, and the academic community should not accept the proof until it has been independently verified. This article does not assume the claim is true or false. It focuses on the general methodology of using large language models in formal proof, and on what readers should check when evaluating such results.

    The Riemann Hypothesis asserts that all non-trivial zeros of the Riemann zeta function lie on the line where the real part equals 1/2, a statement closely tied to the distribution of prime numbers. The Generalized Riemann Hypothesis extends this to Dirichlet L-functions. Proving either would require a large body of deep results, so any text claiming such a proof demands an extremely high standard of scrutiny.

    From Language Models to Formal Proofs

    Standard large language models generate text by predicting the next token. This makes them fluent at mathematical exposition but unable to guarantee rigorous reasoning, and they can easily produce plausible-looking yet incorrect derivations. To mitigate this, researchers typically train models on both natural-language mathematical text and formal-language data, such as proof code in Lean or Coq. The former helps the model grasp mathematical intuition; the latter teaches it to produce steps that a compiler can check.

    The interactive theorem prover (ITP) is the core of this pipeline. It requires theorems to be stated in strict type-theoretic terms and then checks every proof step one by one. The model plays two roles: translating mathematical statements into formal language, and proposing the next proof tactic.

    A Typical Workflow

    A reproducible pipeline usually involves four steps.

    1. Problem formalization. Through multiple rounds of discussion with the model, researchers settle on definitions, prerequisite lemmas, and the axiomatic foundation. The input is a natural-language statement; the output is a formalized goal. The model can complete code for basic definitions given a few examples, but every definition requires human review. A wrong definition can make the resulting proof formally correct yet mathematically meaningless.
    2. Subgoal decomposition. Large theorems are typically broken into many sub-lemmas. The model generates several candidate tactics for each subgoal. Because the number of candidates grows quickly, researchers use tree search (such as Monte Carlo tree search), combined with the model’s probability estimates, to prioritize more promising branches. The cost of such methods rises rapidly with the branching factor, and the model’s probability estimates may be systematically overconfident. Search budgets and failed samples should therefore be recorded.
    3. Compilation and feedback. Each piece of candidate code is submitted to the verifier. If it passes, the proof state is updated; if it fails, the error message is returned to the model so it can revise and retry.
    4. Human review. Even after all sub-lemmas pass, the overall structure must be examined: whether the assumptions of the lemmas are mutually consistent, whether the formalized definitions faithfully represent the original mathematical objects, and whether the proof relies on unverified axioms.

    Passing Verification Does Not Mean the Whole Proof Holds

    A single step passing compilation only means that step is correct given the stated axioms and libraries. It says nothing about whether the overall proof is complete. Common problems include:

    • The formalized statement is weaker than, or simply different from, the original claim, so what was proved is an easier version;
    • The proof uses insufficiently vetted axioms from a library, or imports irrelevant declarations by mistake;
    • Sub-lemmas have conflicting assumptions, so each is locally correct while the whole is inconsistent.

    Therefore, when auditing an AI-assisted proof, one should examine the formalized statement itself, list every axiom used, and have domain experts read the key definitions.

    Compute and Engineering Considerations

    The resource cost of search comes mainly from two sources: long contexts (the referenced mathematical libraries can be very large) and a high volume of parallel verification calls. If a critical lemma fails, the system may need to backtrack to a shallower or deeper level and search again, causing a sudden spike in computation.

    Engineering measures that help include:

    • Deploying the verifier as a horizontally scalable, stateless service, with each verification running in an isolated container to avoid shared state;
    • Setting time and step limits for each search, and logging the duration and outcome of every branch for later cost analysis;
    • Using consistent metrics across computing environments, such as average verification time and success rate per verified lemma, as the basis for cost comparison.

    Cloud platforms can provide elastic compute capacity. When selecting one, check three criteria: whether resources scale on demand, whether per-verification cost can be accounted for, and whether code and data can be stored in isolation.

    Limitations and Future Directions

    Current systems still have clear limitations. In long-range reasoning, a model may forget premises established earlier. Its generalization ability is also weak when it encounters rare mathematical structures.

    Future research may concentrate on three directions. First, specialized training for fields such as analytic number theory and algebraic geometry, to reduce the errors general-purpose models make in expert domains. Second, integrating symbolic computation systems with provers, so the model can call computational tools for steps that require numerical checking. Third, establishing reproducible proof-record formats so that third parties can rerun and verify the results.

    For readers, judging whether an AI-assisted proof is trustworthy comes down to three questions: whether the formalized statement is faithful to the original claim, whether the axioms it depends on are transparent, and whether the result can be independently reproduced and reviewed.