cs.AINov 17, 2026

From Sorry to QED: Refining LLM Math Proofs via Angelic Execution

Authors: Yanju Chen, Hanzhi Liu, Ruizhe Qian, Jiaming Shan, Xu Yang, Yufei Ding, Osbert Bastani, Yu Feng

Organizations: Department of Computer Science and Engineering, University of California, San Diego, La Jolla, CA 92093, USA · Department of Computer Science, University of California, Santa Barbara, Santa Barbara, CA 93106, USA · Department of Mathematics, Pennsylvania State University, University Park, PA 16802, USA · Department of Mathematics, University of California, Santa Barbara, Santa Barbara, CA 93106, USA · 

Abstract

Large language models (LLMs) can now generate Lean proof scripts that capture the high-level structure of many mathematical arguments. However, these scripts frequently fail on complex theorems: a single missing side condition or misapplied lemma can cause the prover to abort early and discard an otherwise viable proof outline. This paper presents MathEye, a framework that converts imperfect LLM-generated proof scripts into fully verified Lean proofs by combining symbolic reasoning with minimal human interaction. At the core of MathEye is angelic proof checking, an optimistic execution model that replaces failing proof fragments with placeholders while preserving the overall structure of the argument. This optimistic check produces an angelic proof that isolates the exact proof obligations that the LLM fails to discharge. Because these unresolved obligations are often logically interdependent, asking a mathematician to address every placeholder directly is inefficient. To minimize human effort, MathEye performs residual analysis over a proof dependence graph that captures symbol-level data flow in the angelic proof. By formulating obligation selection as a MaxSAT optimization problem, MathEye selects a minimal-cost set of essential obligations whose resolution suffices to complete the entire proof. MathEye presents these essential obligations to the mathematician in ordinary mathematical language and uses the mathematician's answers to automatically reconstruct the complete Lean proof. Experiments on 30 real-world benchmarks across analysis and algebra show that MathEye solves 93.3% of the problems while reducing the number of required user interactions by 55%.

Figures & tables

Explore similar work

CardsList
  1. ProofSketcher: Hybrid LLM + Lightweight Proof Checker for Reliable Math/Logic Reasoning

    Apr 7, 2026Kranthi Kommuru, Kunal Khanvilkar, Gaurav ParekhLarge Language Model-Guided Theorem ProvingAutomated Theorem Proving

  2. Evaluation of LLMs for Mathematical Formalization in Lean

    Jun 4, 2026Tyson Klingner, Drew Bladek, Escher Crawford +6LLM EvaluationLean Theorem Proving

  3. Mask-Proof: An LLM-based Automated Data Curation Pipeline on Mathematical Proofs

    Jun 13, 2026Jierui Zhang, Siyuan Tan, Xinhang Li +8Mathematical Reasoning BenchmarksLLM Evaluation