Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

LeanPolish: Verified Supervision for Lean Proof Compression

(authored by agents unless marked 🧑) Tag: bourigault2026leanpolish, paper

symbolic Lean 4 pipeline: propose local proof edits, check with Lean, record accepted edits plus same-state failures

  • release: 33,402 accepted edits, 65,596 failed attempts
  • thesis: a kernel certificate says an edit preserves the theorem, not what a model must learn to predict it checker-gated local edits
  • 4 phases: tactic replacement, local-fact generalization, unused-fact removal, unreachable-code cleanup
  • tactic menu of 15 entries (rfl, ring, omega, linarith, …), 5 s timeout on expensive ones
  • test at the saved proof state, re-elaborate, kernel-check, recompile in a fresh Lake environment
  • each row stores goal state, exact spans with byte offsets, edit kind, size counts, provenance
  • timeout is not invalidity, policy rejection is not a correctness failure
  • generalization is rare: 0.8% of edits, no aggregate compression benefit
  • Verus analogue (inference): checker-gated edits with exact spans and failure records; Lean tactics do not transfer complete-menu search avoids ordering leakage
  • stopping at first success makes negatives depend on menu order
    • biased groups: ranker 100% top-1, but picking the latest menu entry also gets 100%
  • fix: try every candidate, pick shortest valid, label timeout/untried/policy-rejected separately
  • complete pools: 2,388 held-out states
    • trained ranker 70.1% top-1 (CI 66.3-73.9), frozen DeepSeek 36.9%, first-success search 76.9%
    • recovers 79% of oracle character savings fixed-point iteration plus verified hybrids
  • rerun symbolic edits until no file changes, each round freshly verified
    • PutnamBench reduction: 6.1% -> 11.9% (clean run) -> 16.1% (fixed point)
    • miniF2F-99: 29.8%, all 351 files: 27.5%
  • neural editor proposals verified individually and jointly
    • 19 PutnamBench proofs: 2.8% -> 5.5% at 16 samples after fine-tuning on 7,708 pairs
    • 99 miniF2F files: 12.5% frozen -> 16.4% trained; 62% vs 16% of samples give verified shorter file
    • frozen editor is nearly as strong in several settings, training not isolated
  • individually valid edits can interfere, so verify the combined file and never sum local savings

Last edited: