Cost-Efficient Theorem Proving via Agent Orchestration in Program Verification
Organizations: Columbia University · The Hong Kong University of Science and Technology · Barnard College, Columbia University
Abstract
Program verification establishes software correctness through machine-checkable proofs constructed in theorem provers. It's a guarantee especially valuable for code generated by large language models (LLMs), which is fluent but carries no assurance of correctness. Almost all existing provers, however, pursue pass rates alone at whatever sampling or search budget it takes, and overlook the success-vs-cost frontier; yet real software often carries hundreds of interdependent proof obligations, so what matters at scale is not whether one theorem can be proved, but how many can be proved economically. We introduce CoCo-Prover, which formalizes cost-efficient program proving as metalevel decision-making under cost, grounded on two-level proof graphs: an AND/OR proof hypergraph within each declaration is joined to a lemma-dependency graph across declarations; and at each step, it answers two questions: which open goals to select, and which actions to purchase on these goals. Selection stays symbolic as a topological pass over the proof graphs. Action choice is agent orchestration via metalevel decision-making: an agentic router treats every bounded specialist invocation as a separately priced, best-effort computation, matching heterogeneous specialist agents together with configurations, under evolved routing rules as evidence accumulates. On five program verification benchmarks in Lean 4 including function-level CLEVER, VERINA, and AlgoVeri, and repository-level NTP4VC and Vero, we show that CoCo-Prover achieves a better success-vs-cost frontier than baselines including frontier coding agents and state-of-the-art LLM-based provers: it achieves the best solve rate on every benchmark and up to 100% on two benchmarks. It also reduces cost by up to 30.9% compared to the strongest baseline with the strongest LLM in our evaluation.
Figures & tables
| Solve-Rate Comparison Across 2 Repository-Level Benchmarks | ||||||
|---|---|---|---|---|---|---|
| GPT-5.6-Terra | Gemini-3.5-Flash | DeepSeek-V4-Flash | ||||
| Method | NTP4VC | Vero | NTP4VC | Vero | NTP4VC | Vero |
| Coding Agent | 85.3% | 2.3% | 79.7% | 7.0% | 39.0% | 0% |
| CoCo-Prover | 89.3% | 53.5% | 94.7% | 60.5% | 95.0% | 14.0% |
| Solve-Cost on CLEVER Benchmark (Total 161 Problems) | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| GPT-5.6-Terra | Gemini-3.5-Flash | DeepSeek-V4-Flash | |||||||
| Method | # Commonly Solved | Cost in USD (Baseline) | Cost in USD (CoCo-Prover) | # Commonly Solved | Cost in USD (Baseline) | Cost in USD (CoCo-Prover) | # Commonly Solved | Cost in USD (Baseline) | Cost in USD (CoCo-Prover) |
| Ax-Prover-Base | 144 | 69.9 | 63.0 | 138 | 364.6 | 140.3 | 115 | 53.7 | 14.3 |
| Humanize | 157 | 136.6 | 94.4 | 157 | 271.9 | 199.6 | 143 | 64.9 | 29.0 |
| Coding Agent | 148 | 90.4 | 72.5 | 152 | 258.7 | 176.4 | 124 | 56.9 | 24.1 |
| CoCo-Prover | 161 | – | 100.2 | 161 | – | 235.6 | 156 | – | 38.7 |
Appendix figures & tables14 assets
Supplementary material from the paper’s appendix.
Appendix
| Model | Provider | Input | Cache hits | Cache write | Output |
|---|---|---|---|---|---|
| GPT-5.6-Terra | OpenAI | 2.50 | 0.250 | 3.125 | 15.00 |
| Gemini-3.5-Flash | Google Vertex AI | 1.50 | 0.150 | – | 9.00 |
| DeepSeek-V4-Flash | DeepSeek | 0.44 | 0.014 | – | 1.32 |
| Benchmark | License | Repository |
|---|---|---|
| CLEVER [ 43 ] | MIT | github.com/trishullab/clever |
| VERINA [ 54 ] | Apache-2.0 | github.com/sunblaze-ucb/verina |
| AlgoVeri [ 57 ] | Apache-2.0 | github.com/haoyuzhao123/algoveri |
| NTP4VC [ 51 ] | Mixed ‡ | github.com/xqyww123/NTP4VC |
| Vero [ 53 ] | Apache-2.0 † | github.com/sunblaze-ucb/vero |
| Baseline | Backbone | Package / GitHub repository | Version |
|---|---|---|---|
| Codex | GPT-5.6-Terra | @openai/codex | 0.146.0 |
| Gemini CLI | Gemini-3.5-Flash | @google/gemini-cli | 0.55.1 |
| DeepSeek Harness | DeepSeek-V4-Flash | @deepseek-ai/dsh | 0.1.2-alpha.2 |
| Humanize | all three | humanfia/putnambench | 8e21ff2 |
| Ax-Prover-Base | all three | Axiomatic-AI/ax-prover-base | 06dfadc |
| Backbone | CLEVER Cost (USD) | VERINA Cost (USD) | AlgoVeri Cost (USD) |
|---|---|---|---|
| GPT-5.6-Terra | 17.85 0.80 (4.5%) | 30.32 2.54 (8.4%) | 15.47 5.29 (34.2%) |
| Gemini-3.5-Flash | 28.64 1.61 (5.6%) | 43.49 1.06 (2.4%) | 38.82 3.22 (8.3%) |
| DeepSeek-V4-Flash | 4.22 0.93 (22.0%) | 7.66 0.91 (11.9%) | 3.00 0.23 (7.7%) |
| CoCo-Prover | Codex | Humanize | Ax-Prover-Base | |
| Outcome | proved | proved | proved | failed ( sorry ) |
| Total cost (USD) | 2.36 | 8.67 ( ) | 10.74 ( ) | 5.48 |
| Wall-clock time (s) | 2,816 | 2,550 | 4,538 | 6,893 |
| Uncached input tokens | 425,737 | 408,271 | 1,000,932 | 452,135 |
| Cache-read tokens | 2,115,584 | 26,675,200 | 23,777,280 | 77,568 |
| Total prompt tokens | 2.54M | 27.08M | 24.78M | 0.53M |
| Iter. | Open goal(s) at start | New helper lemmas proposed | Closed by Proof Writer | Cost ($) |
|---|---|---|---|---|
| 1 | correctness | implementation_splitOn | both conjuncts of the spec | 0.263 |
| 2 | implementation_splitOn | round-trip (#4) + no-space (#3) | implementation_splitOn | 0.262 |
| 3 | #3, #4 | toList / splitOn bridges (#5, #6) | #4 ( calc chain); #3 | 0.453 |
| 4 | #5, #6 | private worker (#7) + predicate split (#8) | #5, #6 | 0.266 |
| 5 | #7, #8 | byte-scanner agreement (#9) | #7 (induction generalizing acc ); #8 | 0.263 |
| 6 | #9 | UTF-8 offset lemma (#10) | #9 (25 calls, $0.325: hardest step) | 0.612 |
| # | Lemma/Theorem | Proposed | Counterexample check | Lines |
|---|---|---|---|---|
| 1 | correctness | target theorem | — | 14 |
| 2 | implementation_splitOn | iter. 1 | no counterexample | 9 |
| 3 | nat_repr_toList_no_space | iter. 2 | no counterexample | 9 |
| 4 | string_splitOn_space_intercalate | iter. 2 | inconclusive (timeout) | 28 |
| 5 | string_toList_intercalate | iter. 3 | no counterexample | 9 |
| 6 | string_splitOn_singleton | iter. 3 | no counterexample | 5 |
| Round | Cost | Worker’s stated blocker (from the run log) |
|---|---|---|
| 1 | $0.83 | “ String.splitOn ’s irreducible positional scanner; the needed semantic bridge is absent” |
| 2 | $0.98 | “ String.splitOn ’s irreducible UTF-8 scanner; no applicable semantic split/intercalate lemma” |
| 3 | $2.77 | established the splitOn " " character-splitting bridge, but “the remaining obstacle is … the opaque/internal String.intercalate implementation” |
| 4 | $0.99 | “the recursive join helper is inaccessible for induction” |
| 5 | $0.79 | “the required semantic bridge … is not exported; List.splitOn_intercalate cannot be applied” |
| 6 | $0.99 | “the unresolved piece is a public recursive lemma for this Lean version’s private String.intercalate helper” |
| CoCo-Prover (GPT-5.6-Terra) | Coding-agent baseline (GPT-5.6-Terra) | |
|---|---|---|
| Targets proved | 56 / 56 | 5 / 56 |
| Full file checks in Lean | yes | no |
| Closed by Automation | Closed by an LLM script (no new lemma) | Closed using lemmas or earlier targets | |
| 56 target theorems | 8 | 2 | 46 |
| 55 helper lemmas | 12 | 20 | 23 |
| Declaration | Kind | Direct users | Targets depending on it (transitively) |
|---|---|---|---|
| prove_merge_coverage | target | 15 | 18 |
| disjointSortedNonempty_pairwise_gap | lemma | 11 | 24 |
| prove_merge_disjoint_strict | target | 11 | 18 |
| sortByLo_pairwise_lo | lemma | 7 | 31 |
| sortByLo_output_nonempty | lemma | 7 | 28 |
| prove_chop_pointwise | target | 5 | 6 |