LeanContext: Disentangling Mathematical Resources from Local Formal Context in Lean Whole-Proof Generation
Hang Zhang, Qihao Ye, Litong Liu, Yunbei Zhang, Yugyung Lee, Yue Zhou, Bowen Liu, Emily First, Cheng Han, Qiao Zhuang
Abstract
Neural theorem proving increasingly uses retrieved premises and project context to support proof generation. Evaluating these resources requires measuring the advantage of target-selected declarations over comparable alternatives and how this advantage depends on training. We introduce LeanContext, a benchmark of 129,826 Lean whole-proof generation problems, to investigate these questions. We group selected complete preceding mathematical declarations as Mathematical Context (MC) and the remaining selected local source commands as Environment Context (EC). Four aligned input views support crossed training and inference evaluations with shared targets and original Lean verification environments. For both diffusion- and autoregressive-based models, selected declarations outperform comparable alternatives by a larger margin when training includes MC. Final-input audits identify omitted declarations referenced by the target. Prioritizing these dependencies improves Pass@32 by 1.40% and 1.70% for LLaDA and Llama, respectively, on 2,000 targets. The selection experiment operates without access to target reference proofs and holds checkpoints, EC, and inference budgets constant. The code and dataset are available at https://github.com/haaaardcvZ/LeanContext.
Create a lesson
Related papers
ProofDiff: Auditable Argument-Level Comparison of AI-Generated Mathematical Proofs
Shared title terminology · Matan Tsafrir, Esdras Medeiros, Jorge Poco et al.
Autonomous AI Agents Systematically Diverge From Human Preferences in Proof Formalization
Shared title terminology · Bálint Gyevnár, Simon DeDeo
RAGAM-AI: A Hybrid Reinforcement Learning based Agentic approach powered by Generative AI for Edge Resource Management
Shared title terminology · Shreya K. Chari, John S. Vardakas, Kostas Ramantas et al.
Scalar Tuned Lens Summaries Offer Limited Incremental Value for Mid-Generation Abstention
Shared title terminology · Khurram Khalil, Khaza Anuarul Hoque
Emotion-Aware and Context-Grounded Dialogue Agents for Personalized Video Game Interactions
Shared title terminology · Michael Adjeisah, Jin Zhang, Pierluigi Vito Amadori et al.
Improving semantic equivalence in research-level math formalization
Shared title terminology · Ayush Khaitan, Liam Fowl, Tomàs Ortega et al.