- The paper introduces Krympa, a fully automatic proof-minimization pipeline that converts refutational proofs into direct rewrite proofs, searches multiple lemma variants, and reassembles shorter derivations using Vampire and Twee.
- The tool reduces Tao’s 650 ⇒ 448 proof from 62 to 20 rewrite steps and produces Lean formalizations, including a detailed `calc` proof and a compact automation-based version that can be kernel-checked.
- The evaluation on 1,431 equational implications cuts average proof length from 6.6 to 4.5 steps overall, while the strongest configuration reduces proofs of at least 15 steps by 56.7%, though results remain sensitive to prover time limits and heuristic choices.
Krympa is a proof minimization tool for equational logic, developed by Kondylidou, Blanchette, and Heule in response to a challenge posed by Terence Tao within the Equational Theories Project. The project, launched in September 2024, studies implications between equational laws of magmas—sets with a single closed binary operation ⋄—with all problems falling in the unit equality fragment of first-order logic: one universally quantified equation as axiom, one as conjecture. For the problem 650⟹448, where law 650 is x=x⋄(y⋄((z⋄x)⋄y)) and law 448 is x=x⋄(y⋄(z⋄(x⋄z))), the Vampire superposition prover produced an unintelligible 62-step refutational proof. Tao publicly asked for "an alternate proof, by whatever means you wish." Krympa answers this fully automatically, reducing the proof to 20 steps, each corresponding to a rewrite.
Approach
The tool's working hypothesis is that proofs emerging from saturation are suboptimal byproducts and can be shortened by mixing and matching outputs from different provers—an idea traceable to Sutcliffe et al.'s proof-combination work, though repurposed here for length minimization rather than diversity. The pipeline has three phases.
Conversion to direct proofs. Vampire's refutational proofs are transformed into direct proofs by introducing existential quantifiers over Skolem constants, applying contrapositives to disequation inferences, and dropping equality-resolution steps that derive tautologies—saving one step per such inference.
Lemma-level proof generation. Each lemma in the direct proof becomes three problem variants submitted to both Vampire and Twee (the two leading systems in the unit equality division of CASC 2025): big-step problems prove the lemma from the axioms alone; small-step problems additionally admit earlier lemmas as axioms; abstracted problems replace selected non-nested subterms with fresh variables to seek shorter, more general derivations. The shortest proof per lemma is retained; abstracted generalizations that shorten downstream small-step proofs are propagated.
Three-segment reassembly. The final proof is built from up to six candidate arrival lemmas near the end of the baseline derivation. For each candidate, a dependency DAG is constructed, candidate departure lemmas are selected, and three segments—axioms-to-departure, departure-to-arrival, arrival-to-conjecture—are proved independently by both provers, with fallbacks to previously found shorter proofs. The segmentation bounds combinatorial explosion; six arrival candidates is a tunable trade-off between performance and flexibility.
Result on Tao's challenge
For 650⟹448, Krympa's dependency DAG contained 37 lemmas. The minimized 20-step proof pivots on two key lemmas: lemma 7, (x⋄((y⋄x)⋄x))⋄z=((x⋄((y⋄x)⋄x))⋄z)⋄(w⋄(x⋄((y⋄x)⋄w))), proved by Vampire in small-step mode; and lemma 9, x⋄((y⋄((z⋄y)⋄y))⋄x)=x, proved by Twee via an intermediate lemma 8. The final segment derives the conjecture from lemmas 5 and 9 using Twee. The output is emitted as Lean formalizations—one step-by-step calc-based version with nth_rw rewrite steps, one compact version using automation such as duper—making the result directly usable by the project's mathematicians and checkable by Lean's kernel.
The comparison with other solutions is instructive. Kinyon obtained a 24-step Prover9 proof of a weaker statement (650⟹ right-cancellation), from which the target follows by instantiation. Le Floch produced a hand-written Lean proof with only 14 rewrite steps but additional proof-term reasoning and two parallel rewrites, yielding overall length comparable to Krympa's—and it was explicitly constructed by manually interleaving Prover9 runs with intermediate results as assumptions or goals, i.e., a manual approximation of Krympa's automated method. The implication is that the mix-and-match strategy is the effective ingredient, and Krympa automates it end to end.
Empirical evaluation
Beyond the challenge problem, the authors evaluated Krympa on 1431 provable implications extracted from Lean files Proofs1–Proofs13 of the project repository, translated to TPTP. Each problem received 600 seconds overall (10 seconds per prover invocation); most minimizations complete in under a minute. Across all problems, average proof length dropped from 6.6 to 4.5 steps—a 31.5% reduction—showing gains even on already-short proofs.
For the 117 benchmarks with baseline proofs of at least 15 steps, results were stronger:
| Configuration |
Variants used |
Avg. steps after |
| Baseline |
— |
26.3 |
| BA |
big-step + abstracted |
19.2 |
| SA |
small-step + abstracted |
11.4 |
| BS / BSA |
big+small / all three |
11.8 |
SA yielded the best average, a 56.7% reduction across all problems. Notably, SA outperforms BSA despite considering fewer variants—the authors attribute this to prover nondeterminism under time limits and to variant-dependent heuristic choices in segment construction, so adding search paths is not monotone in outcome. Individual cases show dramatic reductions: 947⟹3897 from 151 to 10 steps, 2923⟹2628 from 180 to 34, 650⟹4480 from 141 to 23, and 650⟹4481 from 57 to 13.
Limitations and open questions
Several caveats bear on these results. The approach depends on external provers succeeding on generated subproblems; when they fail, the baseline proof is returned unchanged, and nondeterminism under time limits makes results non-reproducible in detail and produces the observed nonmonotonicity between SA and BSA. The three-segment structure and six arrival candidates are heuristic choices whose adequacy for harder problems is untested. Proof length is measured purely in step count, ignoring term size—a metric Le Floch has suggested—which may misrank proofs of very different complexity. Finally, the evaluation is confined to single-axiom equational implications from one corpus; generalization to full first-order or higher-order logic, richer abstraction strategies, more than three segments, and translation of Vampire proofs into Twee-style equality chains all remain open. The authors also note that default prover strategies were used throughout, leaving strategy tuning (suggested privately by Suda and Smallbone) and adaptive scheduling of prover invocations as concrete implementation questions.
Conclusion
Krympa demonstrates that saturation-generated equational proofs are routinely far from minimal and that combining independent runs of complementary provers—superposition-based Vampire and completion-based Twee—can compress them substantially while producing human-readable, Lean-checkable output. The fully automatic 62-to-20-step solution to Tao's challenge, together with a 56.7% average reduction on long proofs across 1431 benchmarks, indicates that proof minimization deserves attention comparable to proof search itself. The tool is implemented in Rust, OCaml, and Python, with source code and experimental data publicly available.