Evaluating LLM Mathematical Reasoning and Generating Proof Lecture Notes: A Practical Guide
Evaluating an LLM's mathematical reasoning with a single problem plus a head-to-head comparison leads to unreliable conclusions because of small sample size, no unified difficulty scale, missing process verification, and conflated abilities. This article lays out a more rigorous methodology: layer tasks into three difficulty levels (computation, standard proofs, and open research-style proofs), select propositions that have no existing proof to avoid memory leakage, break long proofs into checkable stages using skeleton review and task cards, and verify the process with dependency-cycle detection, cross-reference checks, and multi-version consistency. It also covers cost accounting for long-chain tasks, an engineering pipeline for moving from individual practice to team collaboration, and a list of common pitfalls—helping readers evaluate model reasoning in a way that is reproducible, quantifiable, and verifiable.
1. Why a Single “Level-Jumping Comparison” Isn’t Enough
Community evaluations often rely on one task plus a head-to-head comparison: ask a model to prove a proposition that has no existing proof in some repository, compare it against a few well-known models, and conclude that “some model has approached or reached a certain level.” This kind of hands-on experience has value—it shows the model can complete long chains of mathematical derivation. But as a conclusion, it has at least four gaps:
- Sample size is too small. Single-problem performance is heavily influenced by problem structure; swap in a different problem and the ranking can flip.
- There’s no unified difficulty scale. “Advanced mathematics” is a vague term, and different people use different mental rulers.
- There’s no process verification. A local error in a long proof may not affect the final conclusion. Judging correctness by the final result alone produces both “wrong but right” and “right but wrong” misjudgments.
- It conflates two types of ability. Completing a task that requires multiple rounds of reasoning tests task completion—including reasoning, long-context retention, self-correction, and writing output. The gap between top models and research-grade reasoning doesn’t show up in such single-problem comparisons.
A more reliable approach is therefore to answer three questions: what to evaluate, how to evaluate it, and what it costs. The evaluation process itself should satisfy three requirements: reproducibility, quantifiability, and verifiability.
2. First Define Difficulty: Three Levels of Mathematical Reasoning
The first preparation step is to calibrate task difficulty. A three-tier framework works well as a reference:
| Level | Typical Tasks | Result Verification | Main Focus |
|---|---|---|---|
| L1 Computation & Derivation | Numerical computation, routine integrals, simple inequalities | Substitution checks, dimensional and limit checks | Stability of symbolic operations |
| L2 Standard Proofs | Textbook exercises, competition problems, propositions with existing proofs in the repository | Section-by-section comparison with standard proofs | Understanding and transfer of standard methods |
| L3 Open Research-Style Proofs | Propositions without proofs in the repository, new propositions that must be constructed independently | Manual section-by-section review, with formal tools if needed | Construction ability, strategy selection, long-chain consistency |
Only after layering can “solving competition problems” be distinguished from “doing research-grade reasoning.” As for ranking different models, this article presets no conclusion; it only provides an executable evaluation method.
3. Proposition Selection: The Key Variable
One detail in the original approach is worth borrowing: the chosen proposition has no existing proof in the repository. This is crucial for three reasons:
- It avoids memory leakage. A proposition with an existing proof in the repository may have entered the model’s training data. What the model reproduces may be memory, not reasoning, which systematically overestimates its ability.
- It improves discrimination. Standard proofs can be imitated; only open proofs reveal the real differences between models in strategy selection and self-correction.
- It can be manually verified. If the proposition itself is wrong or vacuous—for example, if the conclusion happens to be a trivial corollary of an existing theorem—then you can’t tell whether the model completed the reasoning or discovered the problem.
An executable workflow:
- Select from rigorous sources. For example, graduate-level algebraic geometry, representation theory, or commutative algebra. Prioritize propositions with long definition chains and proofs that typically depend on multiple intermediate results.
- Do a completeness self-check. Use general search to confirm there is genuinely no proof of the proposition in the repository or public literature.
- Do a triviality exclusion. Confirm in two ways that it isn’t a direct corollary of an existing theorem: first, by comparing logical relationships with several neighboring propositions; second, by checking whether the conditions are redundant or self-contradictory.
- Prepare supporting materials. Organize relevant definitions, notation conventions, and numbered lemmas already available, and feed them to the model as context, so it doesn’t invent its own notation or conflict with existing conventions.
4. Interaction Workflow: From Proposition to Lecture Notes
Once the proposition is fixed, a “four-stage” approach is recommended. It breaks a high-risk long task into several checkable intermediate steps:
- Premise confirmation. First have the model restate the proposition, point out the definition dependency chain and possible hidden premises—for example, whether the structure is finite, commutative, or satisfies regularity conditions—rather than jumping straight into the proof.
- Skeleton review. Ask the model to output only a proof outline, including strategy selection, key-step ordering, and the intermediate conclusions to introduce. The skeleton stage can focus on examining the model’s “mathematical judgment.”
- Branch expansion. After the skeleton is confirmed, expand lemmas one by one. When a branch is too long, have the model first output a structured proof task card, then proceed card by card.
- Consolidation. Merge the parts, unify notation and numbering, check cross-references, and organize everything into a structurally complete lecture note.
A reusable prompt template:
Task: Prove the following proposition and organize it into a structurally complete English lecture note.Proposition: <paste the original proposition here>Constraints:1. Notation and definitions must follow the attached materials and must not be changed on your own;2. First output the proof skeleton and the list of key lemmas, and wait for confirmation before expanding;3. Each lemma must be a separate section, with its position in the main proof noted at the end;4. If a step depends on an assertion not yet proven, explicitly mark [TODO]; do not paper over it with intuitive phrasing;5. List uncertainties separately under "Open Questions"; do not mix them into the main text.
In long-chain tasks, context keeps accumulating. It helps to introduce a concise “task card,” updated each time a branch is completed:
{"task_id": "proof-001","proposition": "<proposition summary>","skeleton_approved": true,"lemmas": [{"id": "L1", "status": "proved", "verified": "human", "refs": []},{"id": "L2", "status": "draft", "verified": "none", "refs": ["L1"]},{"id": "L3", "status": "pending", "verified": "none", "refs": ["L2"]}],"open_questions": ["Do the objects constructed in L2 satisfy the required properties?"]}
The task card has two benefits: first, it compresses scattered multi-turn conversations into a compressible, resumable state; second, during consolidation it lets you quickly locate parts that are unproven or unverified.
5. Process Verification: Making Conclusions “Trustworthy” Rather Than “Seemingly Trustworthy”
The most common failure mode in mathematical writing isn’t a wrong conclusion, but implicit jumps between steps. Typical failure modes include:
- Circular reasoning: while proving a lemma, secretly using a conclusion derived from it.
- Hidden premises: assuming objects satisfy finiteness, commutativity, or compactness without stating them in the proposition.
- Notation drift: the same symbol representing different objects in different places.
- Strength mismatch: citing a tool stronger than the conclusion to be proved, or citing a conclusion whose conditions are stronger than needed.
- Boundary-case omissions: ignoring degenerate cases and extreme cases such as dimension zero.
To address these, the following five checks can be applied:
- Section-by-section review. Have a reviewer model or a human check section by section, requiring each section to end with a one-sentence justification; sections that can’t provide one are flagged as suspicious.
- Dependency check. Break each section into “assumption–conclusion” pairs, and check whether the dependency graph contains cycles—which is precisely an effective way to detect circular reasoning.
- Consistency check. Check that reference numbers and definitions are consistent, and that symbols are defined at first appearance.
- Diversity sampling. Independently generate multiple versions of key lemmas. If different versions give mutually contradictory conclusions, the reasoning at that step is unstable and warrants focused scrutiny.
- Formalization spot-check. When possible, use an interactive theorem-proving environment to rewrite core steps into machine-checkable formal statements, prioritizing the most critical few derivations.
A lightweight script can automate some checks on the generated lecture note:
import redef check_proof(text: str) -> dict:# 1) Reference integrity: numbers cited in the body but not defined in the bodyrefs = set(re.findall(r"\[L(\d+)\]", text))defined = set(re.findall(r"^Lemma L(\d+)", text, re.M))missing = sorted(refs - defined, key=int)# 2) Dependency cycle detection (also identifies circular reasoning)deps = {int(m): set(map(int, re.findall(r"L(\d+)", body)))for m, body in re.findall(r"^Lemma L(\d+):([\s\S]*?)(?=^Lemma L|\Z)", text, re.M)}def has_cycle(node, seen):if node in seen:return Truereturn any(has_cycle(d, seen | {node}) for d in deps.get(node, []))cycles = [n for n in deps if has_cycle(n, set())]# 3) Leftover TODO markerstodos = re.findall(r"\[TODO\]", text)return {"missing_refs": missing, "cycles": sorted(set(cycles)), "todo_count": len(todos)}
This is only an illustrative implementation. It can be extended into structured output validation: organize each section’s content in an agreed-upon field format, then use a program to validate field completeness and dependencies. The overall principle is to combine “human reading” with “machine reading,” so no step depends on a single textual pass.
6. Cost Accounting: Turning Quota Consumption into a Manageable Budget
Another common view in community discussions is to compare model capability against usage price. But the actual cost of a long-chain math task isn’t determined solely by the unit price of a single call; it’s strongly correlated with:
- Input length: materials, definitions, and existing dialogue keep accumulating;
- Output length: the chain of thought itself is also output;
- Number of failed retries: repeated attempts when the direction is wrong;
- Number of iterations: repeated revisions after human review.
The following formula gives a rough estimate of a task’s cost:
C ≈ Σ_r (L_in,r × c_in + L_out,r × c_out + L_think,r × c_out)+ Σ_r N_r × (L_in,r × c_in + L_out,r × c_out) # failed retries
Here r denotes the r-th interaction round, N_r denotes the number of retries in that round, and c_in and c_out are the unit prices for the input and output sides respectively. For the same problem, if skeleton review is skipped and the model is asked to “write it all at once,” the cost is often multiplied, because errors accumulate in long text and rework becomes nearly inevitable.
In practice, the following strategies are recommended:
- Tiered scheduling. Route tasks by the L1–L3 difficulty from Section 3: give simple tasks to lightweight models and invoke long-reasoning mode only for L3 tasks, avoiding “using a sledgehammer to crack a nut.”
- Context governance. Periodically compress history, distilling confirmed conclusions into summaries rather than letting the raw dialogue grow without bound.
- Budget and retry caps. Set output limits and retry counts for a single task; exceeding the cap escalates to manual handling.
- Structured output. Use fixed-format intermediate products, making it easy to cache and incrementally update by segment.
- Usage monitoring. Set monitoring alerts for call volume, input/output distribution, and failure rates, so you no longer “passively face the bill” at month’s end.
7. Engineering Implementation: From Individual Skills to a Team Pipeline
If this practice is to move from individual exploration to team collaboration, the following reference implementation can be consulted:
pipeline:- select: proposition selection and triviality exclusion (manual review)- clarify: premise confirmation and material preparation- skeleton: generate proof skeleton- gate: manual review of skeleton (must be explicitly approved)- expand: expand lemma by lemma, each lemma producing [assumption, conclusion, basis]- verify: dependency cycle detection + cross-reference check + multi-version consistency comparison- formalize: formalization of key steps (optional)- format: unify notation, numbering, and layout to generate lecture notes- review: manual final review and archiving
There are two key design points in the pipeline:
- The gate step must not be omitted. The skeleton stage is the most cost-effective point for error correction, because the cost of changes here is far lower than after the main text is expanded.
- Each lemma must be traceable to its source. This includes whether the basis is an existing lemma in the repository, the model’s own derivation, or a human-supplied explanation. This directly affects the academic credibility of the lecture note.
To host such a system in the cloud, you can combine products from general cloud categories:
- Deploy stateless inference services and orchestration logic on a container platform for easy elastic scaling;
- Store lecture notes, task cards, and intermediate products in object storage, archived by version;
- Hand call logs to a logging service for structured search, making it easy to locate failed samples;
- Detect anomalies in quota and failure rates through monitoring and alerting;
- Use a message queue to asynchronously decouple long tasks, avoiding request timeouts that could interrupt the whole run.
Baidu AI Cloud offers corresponding capabilities in both general cloud products and model services; the architecture ideas above don’t depend on any specific vendor’s implementation.
8. A List of Common Pitfalls
- Only looking at the final answer. Inferring process correctness from conclusion correctness is the most common error in math task evaluation.
- Blind faith in chain-of-thought length. A longer chain of thought doesn’t mean stronger reasoning; it also means higher cost and more points of error accumulation.
- Ignoring material preparation. When a proposition is vague and definitions are unclear, the model’s output quality depends largely on input quality.
- Treating one success as stability. Without multiple samples, you can’t distinguish “ability” from “luck.”
- Only comparing unit price. The real cost of long-chain tasks is “unit price × length × retries,” not the price of a single call.
- Treating “looks like a proof” as “is a proof.” Text that is well-formatted and terminologically accurate can still contain hidden logical jumps.
9. Summary
Evaluating a model’s mathematical reasoning ability: single-point experience can only show that it “can do it,” not that it “does it well.” A more robust path is:
- Use difficulty layering to position tasks;
- Use propositions with no existing proof to avoid memory leakage;
- Use skeleton review to break long tasks into checkable nodes;
- Use dependency graphs, cross-references, and multi-version consistency to turn the process into a verifiable object;
- Use budget caps and usage monitoring to bring quota consumption under management.
When evaluation turns from “feeling” into “process,” conclusions gain reproducibility and can genuinely guide teams in making reasonable trade-offs among capability, cost, and risk.
