Multi-Agent Proof Collaboration: A Time Ledger for Formal Verification
This article breaks down a four-role multi-agent pipeline for producing and verifying long mathematical proofs: a human problem setter, a main proving agent, heterogeneous review agents, and a formalization agent. It covers the three common failure modes of direct proof generation, a reusable prompt skeleton with an explicit uncertainty list, a five-part structured review checklist, the engineering value of proof assistants, observability and cost metrics, and a failure-to-fix mapping. The same pattern applies to everyday development workflows through separated generation and review sessions plus automated gates.
1. A Problem That Keeps Getting Stuck, and a New Contender That Took 103 Minutes
At the intersection of mathematics and statistical physics sits a class of problems that has long defeated automated systems: the statement is not complicated, but the proof chain is extremely long, and a single bad estimate anywhere in the middle breaks everything. A representative target looks like this:
If $an = O(n^{-1/2})$ and $\sum{k\le n} a_k = o(1)$, then $a_n = o(n^{-1/2})$. $\tag{$\ast$}$
Ask a model to “just prove it” and you will usually see one of three failure modes:
- Circular reasoning: a weakened form of the conclusion is used as a premise.
- Skipped steps: the text says “clearly” or “by standard estimates,” while the constants and the order of convergence are never actually verified.
- Quantifier swapping: “there exists $N$ such that for all $n>N$” is rewritten as “for any $n$ there exists $N$.”
These three errors are nearly invisible in natural language, but a formal system exposes them immediately. That is the fundamental reason for splitting generation and verification into two separate roles.
2. The Role Breakdown: Four Positions, One Pipeline
The most reusable part of the original practice is not who won, but the division-of-labor table. Abstracted out, a workable four-role structure looks like this:
| Role | Responsibility | Input | Output | Acceptance criteria |
|---|---|---|---|---|
| Problem setter (human) | Define the claim, boundaries, acceptable risk | Research notes, failure records | Task specification | Unambiguous claim, complete quantifiers |
| Main proving agent | Produce the full derivation | Task spec + summary of past failures | Structured proof draft | Every step annotated with its justification |
| Review agents (≥2, heterogeneous) | Find gaps, counterexamples, circular reasoning | Proof draft | Defect list with locations | Every defect is reproducible |
| Formalization agent | Translate into machine-checkable code | Revised proof | Compilable formal file | Zero compile errors, no extra assumptions |
The key point: the review role must be heterogeneous from the generation role. The same model reviewing its own output tends to accept it smoothly, because it has a preference for the local likelihood of the text. Only a model trained on a different distribution becomes sensitive to skipped steps.
3. Prompts Are Engineering, Not Inspiration: Context as a Reusable Asset
One easily overlooked detail in the original write-up: the main prompt was not handwritten. Another agent first organized the background, the sticking points, and the history of failures, then handed that off to the main proving agent. This is standard context engineering.
A reusable prompt skeleton:
[Background] Object of study, known results, goal of this task[Formalization target] Target claim (with all quantifiers and premises)[Known obstacles] List 3 historical failure modes with concrete locations[Output contract]1. First give the proof skeleton (lemma numbers + dependency graph)2. Then expand each lemma, annotating the justification type per step:definition unfolding / known theorem / direct estimate / assumption to be verified3. Finally, a separate "uncertainty list" — it must not be left empty[Forbidden] Using "clearly", "obvious", or "standard result" without a citation
The “uncertainty list” is the most valuable design here: it drags the model’s hallucinations out of the dark and into the open, so a human only has to review one page instead of three hundred.
4. How to Make Review Actually Work: An Executable Checklist
The value of two or more review agents depends on whether the review is structured. Fix it to five categories of checks:
- Dependency closure: does every lemma’s premise appear earlier in the text, and is there any circular dependency;
- Quantifiers and order of limits: are $\forall\exists$ and $\exists\forall$ swapped, and can limits and sums be interchanged;
- Constants and order of convergence: are the constants in big $O$ and little $o$ silently dropped;
- Counterexample stress testing: for each necessity claim, try to construct extreme sequences (oscillating, sparsely supported, piecewise constant);
- Formalizability forecast: which steps are most likely to fail during formalization, flagged in advance.
The output must be a defect list with locations, for example “Lemma 3, line 2, uses an unproven monotonicity,” not “it feels generally unsound.” Locatable means fixable; fixable means compilable.
5. Formalization: Turning “Looks Right” into “Is Right”
The point of a formal proof language is that it compresses a mathematical argument into a set of terms that can be checked line by line. Its engineering value has three parts:
- Zero-trust verification: the compiler does not accept “clearly,” only constructible terms;
- Transparent assumptions: any unproven claim shows up as an extra hypothesis in the theorem signature, visible at a glance;
- Regression-friendly: recompiling after a proof change is equivalent to an automated regression test.
A minimal illustration (pseudocode style, structure only):
-- Goal: faster convergence of the premise ⇒ faster decay of the individual termtheorem decay_improves (a : ℕ → ℝ)(hO : ∃ C, ∀ n, |a n| ≤ C * n^(-1/2 : ℝ))(hS : ∀ ε > 0, ∃ N, ∀ n ≥ N, |∑ k in range n, a k| < ε) :∀ ε > 0, ∃ N, ∀ n ≥ N, |a n| * n^(1/2 : ℝ) < ε := bysorry -- to be completed by the formalization agent; this sorry must reach zero
There is only one engineering rule: no sorry (unproven placeholder) may remain in the deliverable. Treat it as a red CI gate, not a comment.
6. Observability and Cost Control
Multi-agent setups create new operational questions: who changed what and when, which round introduced a defect, where the total tokens and wall-clock time went. A minimal observability set:
- Round ledger: record role, input summary, output summary, and defect count per round;
- Defect convergence curve: defect count should fall across rounds; if it stays flat or rises, the prompt or role setup is wrong;
- Duration and artifact size: metrics like “103 minutes / 43 pages” are for comparing configurations horizontally, not for judging model quality;
- Gate status: whether the formalization compiles, as the single hard metric.
If you deploy the pipeline in the cloud, the common approach is: container platforms to host stateless agent runtimes, object storage to keep every round’s artifacts and versions, a message queue to decouple roles, and logging plus monitoring with alerting to track the round ledger and gate status. Any round can then be replayed and any problem attributed.
7. Common Failure Modes and Fixes
| Symptom | Root cause | Fix |
|---|---|---|
| Proof is “smooth but hollow” | Single-role self-review | Introduce heterogeneous review, force defect localization |
| Repeatedly stuck on the same lemma | Past failures not structured | Write failures into a markdown summary and feed it into the prompt |
| Massive formalization errors | Skipped steps in natural language | Add justification-type annotations first, then translate |
| Many rounds but no convergence | Overlapping role responsibilities | Tighten the output contract, one artifact per role |
| Correct conclusion resting on stronger assumptions | Assumption transparency not checked | Review the theorem signature, not just the body |
8. Applying the Method to Everyday Development
This pipeline is isomorphic to code review. You have a coding assistant finish an implementation, then ask “any bugs?” in the same session, and what you usually get is self-confirmation that follows the context. A more reliable approach:
- Separate the generation and review sessions, so the reviewer does not share the generator’s self-persuasion context;
- Review output must be locatable (file, line, reproducing input);
- Replace subjective judgment with automated gates: compile, type check, tests, static analysis;
- Keep a failure archive, turning each round of rework into prompt assets for the next round.
generate → heterogeneous review → defect localization → revise → automated gate → merge↑ │└──────────── failure summary flows back (reusable context) ←──────────────┘
9. Closing
The experience worth reusing is not that some model won something in some hour. It is splitting problem setting, generation, review, and formalization into four replaceable positions, carrying context with structured prompts, exposing hallucinations with heterogeneous review, and producing objective conclusions with a formalization gate. Once the process is documented, the artifacts are versioned, and the gates are automated, the human role returns to where it belongs: defining the problem and making the judgment.
