miniCTX: Neural Theorem Proving with (Long-)Contexts
Jiewen Hu, Thomas Zhu, Sean Welleck
Abstract
We introduce miniCTX, which tests a model's ability to prove formal mathematical theorems that depend on new definitions, lemmas, or other contextual information that was not observed during training. miniCTX contains theorems sourced from real Lean projects and textbooks, each associated with a context that can span tens of thousands of tokens. Models are tasked with proving a theorem given access to code from the theorem's repository, which contains context that is helpful or needed for the proof. As a baseline for miniCTX, we introduce file-tuning, a simple recipe that trains a model to generate a proof step conditioned on the preceding file contents. File-tuning substantially outperforms the traditional neural theorem proving approach that fine-tunes on states alone. Additionally, our file-tuned model improves performance on the standard miniF2F benchmark, achieving a pass rate of 33.61%, which is a new state-of-the-art for 1.3B parameter models. Alongside miniCTX, we offer NTP-TOOLKIT for automatically extracting and annotating theorem proving data, making it easy to add new projects into miniCTX to ensure that contexts are not seen during training. miniCTX offers a challenging and realistic perspective on evaluating neural theorem provers. 1
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext a5895767-b427-4d36-ac65-c57128fcfe61Cited by top-tier papers7
- Rewarding the Unlikely: Lifting GRPO Beyond Distribution SharpeningAndre Wang He, Daniel Fried, Sean WelleckEMNLP 2025 · 56 citations
- APOLLO: Automated LLM and Lean Collaboration for Advanced Formal ReasoningAzim Ospanov, Farzan Farnia, Roozbeh MohitNeurIPS 2025 · 49 citations
- FATE: A Formal Benchmark Series for Frontier Algebra of Multiple Difficulty LevelsJiedong Jiang, Wanyi He, Yuefeng Wang, Guoxiong Gao et al.ICLR 2026 · 26 citations
- Mathematical Proof as a Litmus Test: Revealing Failure Modes of Advanced Large Reasoning ModelsDadi Guo, Jiayu Liu, Zhiyuan Fan, Zhitao He et al.ACL 2026 · 17 citations
- miniF2F-Lean Revisited: Reviewing Limitations and Charting a Path ForwardAzim Ospanov, Farzan Farnia, Roozbeh MohitNeurIPS 2025 · 14 citations
Builds on8
- Llemma: An Open Language Model for MathematicsZhangir Azerbayev, Hailey Schoelkopf, Keiran Paster, Marco Dos Santos et al.ICLR 2024 · 433 citations
- miniF2F: a cross-system benchmark for formal Olympiad-level mathematicsKunhao Zheng, Jesse Michael Han, Stanislas PoluICLR 2022 · 342 citations
- HyperTree Proof Search for Neural Theorem ProvingGuillaume Lample, Timothée Lacroix, Marie-Anne Lachaux, Aurélien Rodriguez et al.NeurIPS 2022 · 271 citations
- Proof Artifact Co-Training for Theorem Proving with Language ModelsJesse Michael Han, Jason Rute, Yuhuai Wu, Edward W. Ayers et al.ICLR 2022 · 149 citations
- Baldur: Whole-Proof Generation and Repair with Large Language ModelsEmily First, Markus N. Rabe, Talia Ringer, Yuriy BrunFSE 2023 · 89 citations
Related papers
- QDTSynth: Quality-Driven Formal Theorem Synthesis for Enhancing Proving Performance of LLMsLei Wang, Ruobing Zuo, Gaolei He, Jianlin Wang et al.ACL 2025 · 1 citation
- A Minimalist Proof Language for Neural Theorem Proving over Isabelle/HOLQiyuan Xu, Renxi Wang, Peixin Wang, Haonan Li et al.OOPSLA 2026
- Autoformalization with Large Language ModelsYuhuai Wu, Albert Qiaochu Jiang, Wenda Li, Markus N. Rabe et al.NeurIPS 2022 · 364 citations
- ProofOptimizer: Training Language Models to Simplify Proofs without Human DemonstrationsAlex Gu, Bartosz Piotrowski, Fabian Gloeckle, Kaiyu Yang et al.ICLR 2026 · 11 citations
- Lean-STaR: Learning to Interleave Thinking and ProvingHaohan Lin, Zhiqing Sun, Sean Welleck, Yiming YangICLR 2025
