Failed Lean proofs stop being thrown away: compiler feedback plus dual-model search lifts average pass rate 12.8 points within a pass@32 budget
In Lean 4 theorem proving that depends on project context, failed proofs used to be discarded as a final filter result, and independent sampling restarted later attempts nearly from scratch. This search framework draws one candidate each from a general-purpose reasoning model and a Lean-specialized prover, uses compiler errors in a pairwise comparison to pick the current-best proof, accepts a revision only when the comparison judges it better, and resamples when refinement stagnates. On seven real Lean 4 projects from miniCTX-v2, within the pass@32 budget it improves average pass rate by 12.8 percentage points over the two base models' average pass@32 while cutting LLM calls by 21.9%.