LLMs for Mathematical Proofs: Capability Stratification, Verification, and Cost Control

    Large language models (LLMs) have significantly improved in mathematical reasoning, expanding the range of problems they can solve and generating well-structured derivations. For developers, the practical challenges lie in assessing model reliability across different tasks, managing computational costs, and verifying results. This article provides an engineering-oriented guide to evaluating model capabilities in mathematical proofs, implementing robust verification workflows, and optimizing resource consumption.

    The performance of large language models (LLMs) in mathematical reasoning has improved significantly. They can now handle a broader range of problems and produce structurally complete derivations. For developers, the more practical concerns are determining on which types of tasks the models are reliable, what the associated costs are, and how to verify the results. This article outlines methods for evaluating these three questions from a general engineering perspective.

    1. Distinguishing Between Two Types of “Proofs”

    Many discussions conflate two different concepts. The first is the natural language proof draft: the model generates a derivation based on a proposition and then organizes it into a LaTeX document. The second is the formal proof: the proof is written as code that can be machine-checked by proof assistants like Lean, Coq, or Isabelle, where every step must pass type checking or kernel verification.

    The output of the former is readable but cannot automatically guarantee correctness. LaTeX only handles formatting, not logic; a beautifully typeset proof can still contain errors. The latter can be programmatically determined as correct or not, but it demands much more from the model, including knowledge of the target system’s syntax.

    Therefore, if the goal of a task is to “generate a readable draft,” the evaluation should focus on derivation quality and formatting standards. If the goal is to “reach a trustworthy mathematical conclusion,” you must rely on machine verification or manual review rather than just the text output by the model.

    2. Key Dimensions for Capability Stratification

    Differences between models are primarily reflected in three areas.

    First is open-ended problems. Standardized calculus or linear algebra problems are no longer sufficient to distinguish model capabilities. True differences emerge in problems without fixed solutions that require exploring new paths. Performance gaps between models are significant on these types of problems, but there is currently a lack of unified benchmarks in publicly available information. Developers should use their own task sets to validate conclusions.

    Second is reasoning style. Two types of Chain of Thought (CoT) are often compared:

    • Concise CoT: Fewer reasoning steps, compact expression, closer to an expert’s writing habits.
    • Complex CoT: Expands on numerous intermediate steps and repeatedly self-checks.

    Both can arrive at the correct answer, but the main difference lies in cost and readability. The table below provides a qualitative comparison; exact values should be measured in your own tests.

    Dimension Concise CoT Complex CoT
    Reasoning Steps Fewer, larger jumps More, step-by-step expansion
    Token Consumption Lower Higher
    Response Latency Shorter Longer
    Explainability Compact; readers need to fill in details Complete steps, but lengthy and hard to review quickly
    Suitable Tasks Quick drafts, comparing approaches in familiar domains Complex derivations requiring step-by-step verification

    Third is long-chain stability. In algebraic transformations and abstract derivations, errors accumulate gradually. Stronger models can maintain consistent symbol definitions and non-drifting premises throughout long derivations. Weaker models might contradict themselves after a few steps yet continue writing in a fluent tone. During evaluation, you should specifically check whether the symbols and assumptions at critical intermediate steps still hold true.

    3. Compute Consumption and Cost Control

    The primary cost of high-difficulty reasoning comes from long contexts and long CoTs. The number of tokens per call increases with problem complexity, and complex CoT further amplifies this growth.

    A trade-off is required between cost and capability. High-capability models offer greater value on difficult problems, but using them for high-frequency, simple tasks often leads to waste. A viable approach is task-tiered routing: assign basic numerical calculations and simple formula transformations to lightweight models, and route only open-ended exploration or long proof drafts to models with high reasoning capabilities.

    In actual systems, the following mechanisms should also be implemented:

    • Timeout and retry: Set a maximum wait time and retry a limited number of times upon failure to prevent indefinite quota usage.
    • Caching: Reuse results for identical propositions or sub-steps.
    • Priority: Ensure that critical research tasks are executed before batch testing tasks.
    • Budget thresholds: Set daily or per-project token limits and trigger alerts when nearing the limit.
    • Fallback strategy: If a high-capacity model is unavailable or the budget is exhausted, fall back to a lightweight model and explicitly note the reduced confidence in the results.

    4. Verification Workflow: Beyond the Draft

    Proofs generated by models may contain plausible-looking errors. Verification should be conducted in three layers.

    The first layer is symbolic computation cross-verification. For critical algebraic transformations, you can use symbolic computation software to re-expand and simplify, checking if the equations hold. This step is fast and can be automated, but it only covers the parts that can be computed.

    The second layer is manual review. Domain experts check whether premises are correctly applied, whether lemmas are truly applicable, and whether edge cases have been omitted. This step has the highest cost and should be prioritized for critical, high-impact steps in the conclusion.

    The third layer is formal verification. If a conclusion is to be published as a formal result, the key parts should be translated into Lean, Coq, or Isabelle code and pass inspection. This step requires significant effort and is suitable for a small number of core theorems.

    Only content that has passed the appropriate verification can be used as a research conclusion. Unverified model output should only be considered a draft.

    5. Developer Implementation Checklist

    In engineering, the following items can be fixed as a template to confirm step-by-step before and after each task.

    1. Prompt boundaries: Clearly state the proposition to be proven, the axioms or known theorems allowed, and any forbidden derivation methods.
    2. Output format: Specify LaTeX packages, theorem environments, and proof structures to prevent the model from expanding on irrelevant content.
    3. Verification nodes: List the step numbers that require symbolic computation, manual review, or formal verification.
    4. Cost ceiling: Set the maximum number of tokens and the timeout duration for the task.
    5. Failure fallback: Specify how to handle model failures, self-contradictory outputs, or budget overruns (e.g., splitting sub-problems, switching models, or escalating to manual review).
    6. Conclusion labeling: Clearly indicate in the final document which conclusions have been verified and which remain drafts.

    6. Risk Considerations

    Mathematical proof drafts cannot be directly used for research conclusions or production decisions. Model errors often appear in rigorous formats, which can cause readers to lower their guard. When citing model conclusions, you should retain the original prompts, model versions, and verification records for post-hoc traceability.

    Additionally, cost and performance data will change with model versions and service policies, so the qualitative judgments in this article should be used in conjunction with current, real-world test results.

    Conclusion

    LLMs already provide practical auxiliary value in mathematical reasoning, particularly for generating drafts, organizing thoughts, and suggesting potential proof paths. However, clear differences remain between models regarding open-ended problems, long-chain derivations, and cost control. When using them, you should first clarify whether the task requires a draft or a final conclusion, and then select the matching model, verification method, and budget. Only in this way can model outputs be reliably integrated into research and engineering workflows.