Papers
Topics
Authors
Recent
Search
2000 character limit reached

Pythagoras-Prover: Efficient Lean Proving

Updated 4 July 2026
  • Pythagoras-Prover is an open-source family of Lean theorem provers that uses compute-efficient autoregressive and diffusion-based models.
  • It employs a multi-stage training regime—curriculum SFT, reinforcement learning, and ALF self-distillation—to optimize proof generation with limited data.
  • Evaluated on benchmarks like MiniF2F-Test and PutnamBench, its models achieve high pass rates while demonstrating improved robustness to statement perturbations.

to=arxiv_search.search qq的天天中彩票 json {"query":"Pythagoras-Prover Advancing Efficient Formal Proving via Augmented Lean Formalisation (Leang et al., 10 Jun 2026)", "max_results": 5} to=arxiv_search.search 六和彩 json {"query":"Lean theorem prover MiniF2F formal proving Goedel-Prover DeepSeek-Prover 2025 2026", "max_results": 10} Pythagoras-Prover is an open-source family of Lean theorem provers introduced as a compute-efficient approach to formal proving under practical compute budgets. In its 2026 formulation, the family comprises two autoregressive models at 4B and 32B parameters and a first proof-of-concept diffusion-based prover at 4B, all built on the Qwen3 backbone and evaluated on Lean benchmarks including MiniF2F-Test, PutnamBench, and MiniF2F-ALF (Leang et al., 10 Jun 2026). The name also has a narrower methodological history in earlier mechanization-oriented discussions of the Pythagorean theorem, where a “Pythagoras-Prover” library or specification was proposed for elementary constructions, rotations, area-additivity, modular inference graphs, or differential-form-based proof templates (Navas, 2016). Taken together, these usages identify both a contemporary formal-proving system and a recurring design idea: using sharply structured mathematical proof objects to support automation in proof assistants.

1. Definition and historical scope

In the 2026 usage, Pythagoras-Prover denotes “a compute-efficient open-source family of Lean theorem provers built for practical compute budgets,” with the family spanning “two generation paradigms: autoregressive models at 4B and 32B parameters, and a first proof-of-concept diffusion-based prover (4B) that iteratively refines Lean proofs at inference time” (Leang et al., 10 Jun 2026). Its stated motivation is that modern Lean theorem provers achieve strong performance only with substantial training and inference compute, partly because verified proof data are scarce and formal proof search produces long reasoning traces.

Earlier documents use the term in a different but related sense. A geometric proof of Pythagoras via equilateral triangles states that such a formal proof “fits naturally into a ‘Pythagoras-Prover’ library” because it emphasizes elementary constructions, avoids extraneous similar-triangle arguments, and relies on rotations and area-additivity (Navas, 2016). A 2025 guide to noncircular trigonometric proofs similarly describes how one can “build or extend an automated ‘Pythagoras-Prover’” by encoding lemmas as rules, identities as rewrite rules, and the theorem as a goal whose proof tree is assembled by chaining those components (Kise et al., 21 May 2025). A 2022 differential-geometric treatment presents a “Pythagoras-Prover specification” in which a geometry module and an algebra module share automatic-differentiation and linear-algebra back ends (Greensite, 2022).

This suggests that the 2026 system inherits more than a name. A plausible implication is that the term “Pythagoras-Prover” had already come to signify a style of formalization centered on modularity, explicit constructions, and proof objects that decompose cleanly into machine-checkable steps.

2. Model family and proof-generation paradigms

Pythagoras-Prover consists of three models: “two autoregressive transformers (4 B and 32 B parameters) and one diffusion-based prover (4 B).” All three “share the same Qwen3 backbone but differ in how they generate proofs” (Leang et al., 10 Jun 2026).

For the autoregressive provers, the reported configuration is:

  • Base: Qwen3-4B / Qwen3-32B
  • Transformer stacks: 32 blocks for 4B and 48 blocks for 32B
  • Hidden size: 4,096 for 4B and 12,288 for 32B
  • Attention heads: 32 for 4B and 96 for 32B
  • Context window: 8,192 tokens
  • Fine-tuned with LoRA rank 64 on all linear layers
  • Decoding: standard left-to-right sampling with KV-caching (Leang et al., 10 Jun 2026)

For the diffusion-based prover, the same Qwen3-4B backbone is retained, but generation is reorganized. The proof is partitioned into fixed-size blocks, for example 32 tokens, and within each block the model applies discrete masked diffusion with “tactic-span” masking. If τk\tau_k is the kkth contiguous span of tokens belonging to a single Lean tactic, then at noise level t[0,1]t \in [0,1] the corruption process is

xtτk{[MASK]τk,w.p. t, x0τk,w.p. 1t,k=1K.x_t^{\tau_k} \sim \begin{cases} [\mathtt{MASK}]^{|\tau_k|}, & \text{w.p. } t,\ x_0^{\tau_k}, & \text{w.p. } 1-t, \end{cases} \quad k=1\ldots K.

The corresponding training loss is

L  =  EtU(0,1),x0,xt[1tk=1K1{span k is masked}iτklogpθ(x0ixt)].\mathcal{L} \;=\; -\mathbb{E}_{t\sim U(0,1),\,x_0,x_t} \Biggl[\frac1t \sum_{k=1}^K \mathbf{1}\{\text{span }k\text{ is masked}\} \sum_{i\in\tau_k}\log p_\theta(x_0^i\mid x_t)\Biggr].

The diffusion context window is “trimmed to 4 096 tokens to stabilize training” (Leang et al., 10 Jun 2026).

The family therefore juxtaposes a conventional left-to-right proof generator with a refinement-based prover that operates over tactic spans. The paper’s framing is explicitly comparative rather than doctrinal: the autoregressive models provide the highest pass rates, while the diffusion variant is presented as a first proof-of-concept with a different throughput profile.

3. Training regime and corpus construction

The training pipeline is organized into “three stages—Curriculum SFT, RL, and ALF self-distillation—each carefully budgeted to fit within an 8 192-token context” (Leang et al., 10 Jun 2026). The design target is efficient use of scarce verified Lean data while preserving informative traces.

Curriculum supervised fine-tuning begins from a seed corpus stratified into three difficulty tiers. The “Easy” tier is “mechanically synthesised via rubric-guided simplification,” the “Medium” tier is “autoformalised from general-math corpora,” and the “Hard” tier consists of “competition-level problems (IMO, AIME, AMC subsets)” (Leang et al., 10 Jun 2026). Training proceeds sequentially on Easy, then Medium, then Hard.

A central mechanism is dynamic proof-reasoning filtering under token budget K=8192K=8192. If the combined reasoning and proof fit within the budget, the full trace is kept; if the proof alone fits, the reasoning chain is dropped and the model is trained on the proof only; otherwise the instance is discarded. The paper gives the following pseudocode:

t[0,1]t \in [0,1]7

Reinforcement learning is then performed with GRPO on held-out hard problems together with on-policy rollouts from Goedel/NuminaMath. The reward is binary: “1 if the generated proof compiles in Lean, else 0.” The run uses a single epoch, 8 rollouts per problem, and keeps problems with 1–5 successes. The paper notes that the “net gain [is] modest—training corpus already very high quality,” and also states that “LoRA [is] not stable under RL,” so RL uses full-parameter updates (Leang et al., 10 Jun 2026).

The final stage is continued SFT on ALF self-distillation data. Here the corpus grows “from ~0.8 M verified examples to ~2 M unverified but statement-aligned examples,” followed by “LoRA fine-tuning for one more epoch.” The reported effect is a “consistent +5–7 pp lift in pass@32” (Leang et al., 10 Jun 2026).

4. Augmented Lean Formalisation

Augmented Lean Formalisation, or ALF, is the principal data-amplification mechanism in Pythagoras-Prover. It “expands the scarce Lean-verified data by mutating statements (not proofs) and then using the prover itself to ‘fill in’ new proofs” (Leang et al., 10 Jun 2026). The emphasis on statement mutation rather than proof mutation is important: the method is designed to preserve formal character while reducing reliance on any theorem’s surface form.

The ALF pipeline has three stages. First, for each seed theorem ss, “a small mutation model (Qwen3.6-27B) generates exactly one variant in each of five categories”: simplification, generalisation, lemma proposal, proof-step decomposition, and reformulation (Leang et al., 10 Jun 2026). Second, the post-RL prover generates a single proof for each mutated statement ss' using temperature 1.2 and top-p=0.95p=0.95. Third, the pair (s,p)(s',p') is retained “only if kk0 verbatim mentions kk1 (no Lean compile)” (Leang et al., 10 Jun 2026).

The resulting trade-off is explicit. By dropping the full Lean type-check and replacing it with a lightweight alignment test, “ALF scales the corpus ≈2.5× while still auditing a random 2 000-instance sample (≈88% compile success)” (Leang et al., 10 Jun 2026). The paper interprets this as a pragmatic compromise between strict verification and training-signal volume.

A contamination-sensitive benchmark, MiniF2F-ALF, was also released. The benchmark consists of “488 mutated theorems,” and “every evaluated model loses accuracy” on it relative to MiniF2F (Leang et al., 10 Jun 2026). Within this setting, the 32B model remains strongest and the 4B model matches the prior state of the art named in the paper. This benchmark operationalizes the claim that surface-form perturbations matter for theorem-proving models, and ALF is presented as a direct intervention on that failure mode.

5. Empirical evaluation and compute profile

Pythagoras-Prover is evaluated on MiniF2F-Test, PutnamBench, and MiniF2F-ALF (Leang et al., 10 Jun 2026). On MiniF2F-Test at pass@32, the reported results are 82.4% for DeepSeek-Prover-V2-671B, 88.1% for Goedel-Prover-V2-32B, 86.1% for Pythagoras-Prover-4B, and 89.8% for Pythagoras-Prover-32B. At pass@2048, “Pythagoras-Prover-32B reaches 93.0%, the highest open-source without self-correction” (Leang et al., 10 Jun 2026).

On PutnamBench, the 4B restart-sampling configuration solves 48 problems at pass@32, 59 at pass@64, and 93 at pass@2048. The paper contrasts this with Goedel-Prover-V2 solving 43 without self-correction and 57 with self-correction at 184 attempts, and states that at roughly matched decoding compute “P-4B solves 93/672 at pass@2048, beating Goedel’s 86 @184” (Leang et al., 10 Jun 2026).

On MiniF2F-ALF at pass@32, all models drop relative to MiniF2F: DeepSeek-Prover-V2-671B from 82.4% to 76.3%, Goedel-Prover-V2-32B from 88.1% to 83.6%, Pythagoras-Prover-4B from 86.1% to 83.2%, and Pythagoras-Prover-32B from 89.8% to 85.0% (Leang et al., 10 Jun 2026). The paper states that the “smaller drop for P-4B (–2.9 pp) indicates greater robustness to statement-level perturbations, consistent with training on ALF-augmented data.”

Benchmark outcome Reported result Model
MiniF2F-Test pass@32 86.1% Pythagoras-Prover-4B
MiniF2F-Test pass@32 89.8% Pythagoras-Prover-32B
MiniF2F-Test pass@2048 93.0% Pythagoras-Prover-32B
PutnamBench solved pass@2048 93 / 672 Pythagoras-Prover-4B
MiniF2F-ALF pass@32 83.2% Pythagoras-Prover-4B
MiniF2F-ALF pass@32 85.0% Pythagoras-Prover-32B

The compute discussion is unusually explicit. The paper defines an “Effective Token Complexity” for each attempt as

kk2

where kk3 is prompt length and kk4 is generated tokens, and then sets total ETC@N to kk5 (Leang et al., 10 Jun 2026). Under this accounting, Goedel-Prover-V2 self-correction at 184 attempts has total ETC kk6, while Pythagoras-Prover-4B restart sampling at 1024 attempts has total ETC kk7. The interpretation given is that “despite 5× more attempts, restart sampling conditions only on a short prompt each time, so its aggregate ETC is ≈5% lower” (Leang et al., 10 Jun 2026).

The paper also reports an accuracy-latency trade-off between the autoregressive and diffusion 4B models on MiniF2F-Test at pass@32. The autoregressive model reaches 86.1% at throughput “~4.1 tokens/sec per GPU,” whereas the diffusion model reaches 63.3% at “~10.6 tokens/sec per GPU (≈2.6× faster)” (Leang et al., 10 Jun 2026). Using the paper’s rough efficiency score kk8 (pass rate)kk9(tokens/sec), the autoregressive model scores approximately 3.53 and the diffusion model approximately 6.70, leading to the statement that diffusion is “>1.8× more GPU-efficient in proofs/sec, at the cost of ≈23 pp lower pass@32” (Leang et al., 10 Jun 2026).

6. Mechanization lineage and proof-theoretic interpretations

Before the 2026 Lean prover family, several works described proof patterns that were explicitly “amenable to formalization” and in some cases already framed as a Pythagoras-Prover library or specification. These antecedents illuminate the system’s name and its affinity for modular formal reasoning.

The 2016 proof “via equilateral triangles” constructs the theorem using two rigid rotations, congruence under rotation, area-additivity, and a final comparison between the area of a parallelogram and the area of the original right triangle (Navas, 2016). Its implementation outline in a prover begins by declaring points t[0,1]t \in [0,1]0, defining rotation operators, proving the coincidence point t[0,1]t \in [0,1]1, establishing equilateral triangles and congruent rotated copies of t[0,1]t \in [0,1]2, and then reducing the theorem to an area computation for the parallelogram t[0,1]t \in [0,1]3 (Navas, 2016). The paper explicitly argues that the proof is especially suitable for “Coq + GeoCoq, Isabelle/HOL with the Analytic Geometry library, or a Tarski-style geometry package.”

The 2025 work on noncircular trigonometric proofs organizes three independent proofs into a modular inference structure. It specifies “geometric construction,” “a sequence of intermediate steps, each tagged by the exact identity or theorem,” “displayed LaTeX for all key formulas,” and “a modular breakdown into lemmas and corollaries—ready to be encoded as inference rules” (Kise et al., 21 May 2025). Its conclusion states that one can encode each lemma as a rule triggered by pattern-matching geometric configurations, each identity as a symbolic rewrite rule, and the final theorem as a goal assembled by chaining those components. This is close in spirit to the 2026 system’s emphasis on training over proof traces and formal statements.

The 2022 analytic-synthetic proof based on Birkhoff’s four postulates adopts a different mechanization strategy. Rather than area decompositions or triangle congruence, it derives the “gradient equation”

t[0,1]t \in [0,1]4

solves it to obtain t[0,1]t \in [0,1]5, and then recovers the Pythagorean theorem (Greensite, 2022). The associated “Pythagoras-Prover specification” includes a geometry module, an algebra module, and utility support for line integrals of closed t[0,1]t \in [0,1]6-forms, with the same automatic-differentiation and linear-algebra back ends used in both the plane case and the algebra case (Greensite, 2022).

These earlier uses do not describe the 2026 neural prover architecture. They do, however, establish a recurring interpretation of Pythagoras-Prover as a framework in which proofs are decomposed into sharply typed transformations: rotations, congruences, area identities, angle-bisector relations, tangent identities, directional derivatives, or closed-form equations. A plausible implication is that the 2026 project extends this formalist lineage from handcrafted proof modules to learned theorem-proving systems.

7. Significance, limitations, and prospective directions

Within the reported results, Pythagoras-Prover’s significance lies in three claims. First, the 4B model “surpasses DeepSeek-Prover-V2-671B at pass@32 on MiniF2F-Test (86.1% vs 82.4%) with ~167x fewer parameters” (Leang et al., 10 Jun 2026). Second, the 32B model “sets the open-source state of the art at 93.0% on MiniF2F-Test” at pass@2048 (Leang et al., 10 Jun 2026). Third, the work introduces a diffusion-based prover that is slower in accuracy growth but faster in throughput, opening a distinct optimization axis.

The limitations are also explicit in the source material. The diffusion variant is a “first proof-of-concept” whose pass@32 remains well below the autoregressive model, and its context window is reduced to 4,096 tokens “to stabilize training” (Leang et al., 10 Jun 2026). ALF expands the corpus using statement-alignment rather than full Lean compilation, which is a deliberate relaxation; the paper compensates by auditing a random 2,000-instance sample and reporting approximately 88% compile success (Leang et al., 10 Jun 2026). More generally, MiniF2F-ALF shows that every evaluated model loses accuracy under statement mutation.

The naming of the system also risks a potential misconception. Pythagoras-Prover is not restricted to proving the Pythagorean theorem. In the 2026 paper it is a general Lean theorem prover evaluated on theorem-proving benchmarks, including competition-style problems from PutnamBench and training tiers that include IMO, AIME, and AMC subsets (Leang et al., 10 Jun 2026). The association with Pythagoras persists because earlier mechanization proposals had already used the label for proof-assistant libraries or specifications centered on structured derivations of the theorem (Navas, 2016).

The forward-looking claim made in the paper is cautious: “As diffusion context windows grow, we expect its accuracy to climb” (Leang et al., 10 Jun 2026). This suggests two natural research directions already implied by the system design: scaling diffusion-based proof refinement to longer contexts, and further exploiting statement-level mutation to reduce dependence on superficial theorem phrasing. In that sense, Pythagoras-Prover stands at the intersection of Lean-centric formal verification, data-efficient theorem-prover training, and a longer mechanization tradition in which the Pythagorean theorem serves as a compact proving ground for formal reasoning architectures (Kise et al., 21 May 2025).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Pythagoras-Prover.