Manuscript Offprint

arXiv:2610.08319

SCOPE: Certified Theorem Proving with a Language Model as the Policy Planner

Hanchao Zhou, Jialei Li

Hanchao Zhou and Jialei Li

Abstract—In proof assistants such as Lean, a generated proof must pass machine compilation checks, so evaluation needs no human scoring. Direct generation fails on multi-step numeric propositions: a proof is valid only if every content integer is correct, so the pass rate is bounded by the k-th power of the per-integer accuracy. Controlled corruption across 2,617 reference proofs confirms this power law. SCOPE (State-Conditioned Operator Planning and Execution) enforces the natural division of labor: the model plans over an operator vocabulary, a symbolic engine executes the numerics, and a compiler renders the proof. On a 218-problem suite it certifies 191/218 (87.6%) with a 135M backbone; the 7B DeepSeek-Prover-V1.5-RL certifies 18/218 at 27.5 times the tokens and 37.5 times the wall-clock, and DeepSeek-Prover-V2-7B certifies zero on a bidirectional dual suite. Multi-step thinking costs 6.12 discrete decision actions per problem and produces no natural-language thinking text. Replacing the lagged engine state in the decision frame with the current one lifts the pass rate from 117/218 to 191/218, while up-weighting the chain-end loss hurts. On the public Lean-Workbook library, 2,132 of 3,536 gradeable admissible problems certify (60.29%) with zero regression on the main suite. All readings come from a version-frozen review with independent rechecks and reverse verification. Restricting free generation and keeping decision-time information visible is a more direct route than enlarging the model.

Index Terms—Automated theorem proving, formal verification, large language models, Lean, neuro-symbolic systems.

I. INTRODUCTION

Automatic generation of formal proofs has long been a hard problem at the intersection of artificial intelligence and formal verification. Proof assistants such as Lean [1] bring propositions, proofs, and the checking process into one machine-verifiable framework: a candidate proof is accepted only if the compiler confirms that every step is legal and that no unproven assumption is used. This property makes theorem proving a suitable testbed for studying the reasoning ability of language models: evaluation involves no human scoring, and surface fluency earns no credit. In recent years, language models ranging from hundreds of millions to tens of billions of parameters have made a series of advances in this direction, yet certified pass rates on propositions that require multi-step numeric derivation remain low. Failed samples show a consistent pattern: the proof is structurally conventional (it uses standard tactics such as induction, rewriting, and normalization) but breaks at concrete numeric values and ends with an unsolved goal (sorry in Lean). The pattern suggests that the bottleneck may lie not in the choice of proof steps but in generating the numeric content one item at a time. The division of labor can be stated quantitatively: the validity of a long proof is the conjunction of all its numeric content. If the model writes each content element correctly with probability p and a proof contains k elements, the pass rate of direct generation is bounded above by pkp^{k}. When k grows with problem difficulty, any fixed p below one drives the pass rate down exponentially. Our experiments support this analysis and fold the countermeasure into the same architectural frame: if the analysis holds, the rational architectural response is to narrow the model's role to policy planning free of numeric generation, hand numeric computation to a symbolic tool, and hand proof text to template compilation. In human mathematical practice, the core competence of solving lies to a large extent in perceiving and choosing tools: judging which theorem, which lemma, which transformation, or which algorithm applies to the proposition at hand. Carrying out the computation is comparatively mechanical and has always been done precisely by external procedures. We therefore test a division-of-labor hypothesis: let the language model supply the connection between problem and tool, and let a symbolic computing component execute the numerics; then examine whether this division supports long-chain, multi-step, exact reasoning. Specifically, on three families of constructively generated discrete-mathematics problems (induction, inequalities, and number theory), we build a complete system called SCOPE (State-Conditioned Operator Planning and Execution). The backbone is the 135M-parameter SmolLM2 [2], fitted with an operator-selection head and an argument-prediction head that produce a solution chain step by step inside a vocabulary of 194 operators; the numerics of each step are computed by a symbolic execution engine that returns the state; the proof text is generated by a compiler from the chain and the engine's results, and is finally reviewed by the Lean compiler. On this architecture we run a set of experiments that isolate one variable at a time, plus an external-model comparison. The main results follow. When complete proof text is generated directly, token-level accuracy and certified pass rate diverge sharply: the model's token accuracy on a held-out set from the training distribution is 0.9637, yet certified passes on the 218-problem suite number 0/218; a same-distribution control set (20 problems) yields one pass, matching the power-law prediction of about 0.031 computed from the number of content elements per proof (about 14.9). The 7B DeepSeek-Prover-V1.5-RL [3] passes 18/218 on the same suite, with 177 outputs terminating in sorry, the same pattern. Once proof text is produced by the compiler instead, the pass rate of the same model on the same suite rises from 1/218 to 117/218. The compiler reproduces the reference proofs byte for byte on all 2,399 corpus rows and certifies 218/218 when fed the reference chains of the test suite, so this stage contributes no precision.

Jialei Li (e-mail: gayly0414@163.com). Corresponding author: Hanchao Zhou (e-mail: zhouhanchao6@gmail.com).

loss. Analysis of the remaining errors further localizes the failure to the final step of the chain: all 101 first errors among the 101 errors occur at the last step. The residual class read off the final step stands in a fully determined correspondence with the engine's residual value (799/799 on the corpus and 181/181 on the test suite), but the decision frame carries a state that lags one step behind. A 2×22 \times 2 factorial experiment (state shifted or not, crossed with chain-end loss weight) shows: shifting the state raises the pass rate from 117/218 to 191/218; up-weighting the loss lowers it (117 to 110; with the state shifted, 191 to 172). In resource terms, this architecture emits 6.12 decision actions per problem on average, takes 0.53 s per problem, and peaks at 833 MiB of inference memory; the comparison model emits 168.0 generated tokens, takes 19.88 s, and peaks at 8,567 MiB. The two systems differ in interface conditions: the comparison model has no execution engine or compiler and must generate the complete proof as free text. We use this comparison as evidence on the structure of the output channel. The contributions of this paper are as follows. We give, in a controllable domain, the error-product structure of direct long-proof generation and verify it quantitatively. We propose and implement SCOPE, an architecture in which the language model serves as the policy planner, a symbolic engine serves as the computing component, and a compiler serves as the text-generation component, reaching an 87.6% certified pass rate on the test suite. The model's multi-step thinking is endogenous to the architecture and enabled by default: it happens in the latent decision space over operator chains, produces no natural-language thinking text, and costs 6.12 decision actions per problem on average. Thinking never passes through the output channel, yet the system is not a black box: per-step decision distributions and engine states can be read out directly. A factorial experiment attributes the main information bottleneck of chain decisions to state visibility at decision time rather than to loss allocation. For all readings we establish a validity pipeline of version-frozen review plus independent recheck plus reverse verification. We complete a domain-extension validation on a public problem library: the admissible domain is determined by mechanical checks and disclosed layer by layer, model-independent readings are reported separately from system readings, and an independent final audit verifies the numbers. Code, corpus, and review programs will be released.

References (34)