An In-Context Learning Agent for Formal Theorem-Proving
On the map: LLM agents and tool use → Educational agents and math problem solving
Abstract (arXiv)
We present an in-context learning agent for formal theorem-proving in environments like Lean and Coq. Current state-of-the-art models for the problem are finetuned on environment-specific proof data. By contrast, our approach, called COPRA, repeatedly asks a high-capacity, general-purpose large language model (GPT-4) to propose tactic applications from within a stateful backtracking search. Proposed tactics are executed in the underlying proof environment. Feedback from the execution is used to build the prompt for the next model query, along with selected information from the search history and lemmas retrieved from an external database. We evaluate our implementation of COPRA on the miniF2F benchmark for Lean and a set of Coq tasks from the CompCert project. On these benchmarks, COPRA significantly outperforms few-shot invocations of GPT-4. It also compares favorably against finetuning-based approaches, outperforming ReProver, a state-of-the-art finetuned approach for Lean, in terms of the pass@1 metric. Our code and data are available at https://github.com/trishullab/copra.
Key facts. Cited by 78 papers in the map (data through 7 Oct 2026). Placed in Educational agents and math problem solving, one of 16 directions in LLM agents and tool use. Builds on 26 of its 38 references that are in the map. First posted on arXiv 6 Oct 2023.
Builds on
26 of 38 references.
References · 26
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,203
- 2021Zero-Shot Text-to-Image Generationcited by 4,276
- 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,072
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,155
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2023Voyager: An Open-Ended Embodied Agent with Large Language Modelscited by 2,081
- 2023LeanDojo: Theorem Proving with Retrieval-Augmented Language Modelscited by 414
14 more
- 2021MiniF2F: a cross-system benchmark for formal Olympiad-level mathematicscited by 380
- 2020Generative Language Modeling for Automated Theorem Provingcited by 379
- 2022Draft, Sketch, and Prove: Guiding Formal Theorem Provers with Informal Proofscited by 278
- 2022HyperTree Proof Search for Neural Theorem Provingcited by 192
- 2022Formal Mathematics Statement Curriculum Learningcited by 141
- 2021Proof Artifact Co-training for Theorem Proving with Language Modelscited by 130
- 2019The Lean mathematical librarycited by 127
- 2023LEGO-Prover: Neural Theorem Proving with Growing Librariescited by 108
- 2019Learning to Prove Theorems via Interacting with Proof Assistantscited by 107
- 2022Thor: Wielding Hammers to Integrate Language Models and Automated Theorem Proverscited by 97
- 2018GamePad: A Learning Environment for Theorem Provingcited by 48
- 2023Decomposing the Enigma: Subgoal-based Demonstration Learning for Formal Theorem Provingcited by 37
- 2019Generating Correctness Proofs with Neural Networkscited by 36
- 2023Lyra: Orchestrating Dual Correction in Automated Theorem Provingcited by 24
Built on by
Citing papers per year: 2023: 1; 2024: 15; 2025: 26; 2026: 36.
78 papers.
Sort:
By area:
- 2025AlphaEvolve: A coding agent for scientific and algorithmic discoverycited by 763
- 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repaircited by 225
- 2024PutnamBench: Evaluating Neural Theorem-Provers on the Putnam Mathematical Competitioncited by 153
- 2024Formal Mathematical Reasoning: A New Frontier in AIcited by 80
- 2024Lean-STaR: Learning to Interleave Thinking and Provingcited by 64
- 2024A Survey on Deep Learning for Theorem Provingcited by 55
- 2024A Survey of Mathematical Reasoning in the Era of Multimodal Large Language Model: Benchmark, Method & Challengescited by 55
- 2024The Limits of Inference Scaling Through Resamplingcited by 51
- 2025Aristotle: IMO-level Automated Theorem Provingcited by 47
- 2024You Name It, I Run It: An LLM Agent to Execute Tests of Arbitrary Projectscited by 45
- 2025Solving Formal Math Problems by Decomposition and Iterative Reflectioncited by 35
- 2024LeanAgent: Lifelong Learning for Formal Theorem Provingcited by 34
38 more
- 2023LLMSTEP: LLM proofstep suggestions in Leancited by 32
- 2025VERINA: Benchmarking Verifiable Code Generationcited by 30
- 2025Prover Agent: An Agent-Based Framework for Formal Mathematical Proofscited by 28
- 2025CLEVER: A Curated Benchmark for Formally Verified Code Generationcited by 27
- 2024Proving Theorems Recursivelycited by 25
- 2026Large Language Model Reasoning Failurescited by 20
- 2025Aria: An Agent For Retrieval and Iterative Auto-Formalization via Dependency Graphcited by 18
- 2025Proving Olympiad Inequalities by Synergizing LLMs and Symbolic Reasoningcited by 17
- 2025ProofBridge: Auto-Formalization of Natural Language Proofs in Lean via Joint Embeddingscited by 16
- 2024Hierarchical Context Pruning: Optimizing Real-World Code Completion with Repository-Level Pretrained Code LLMscited by 13
- 2025MATP-BENCH: Can MLLM Be a Good Automated Theorem Prover for Multimodal Problems?cited by 13
- 2026A Minimal Agent for Automated Theorem Provingcited by 13
- 2026AlgoVeri: An Aligned Benchmark for Verified Code Generation on Classical Algorithmscited by 11
- 2025ProofAug: Efficient Neural Theorem Proving via Fine-grained Proof Structure Analysiscited by 10
- 2025LeanProgress: Guiding Search for Neural Theorem Proving via Proof Progress Predictioncited by 9
- 2025Grammars of Formal Uncertainty: When to Trust LLMs in Automated Reasoning Taskscited by 9
- 2024Cobblestone: A Divide-and-Conquer Approach for Automating Formal Verificationcited by 8
- 2025From Hypothesis to Publication: A Comprehensive Survey of AI-Driven Research Support Systemscited by 8
- 2025Faithful and Robust LLM-Driven Theorem Proving for NLI Explanationscited by 8
- 2025DRIFT: Decompose, Retrieve, Illustrate, then Formalize Theoremscited by 8
- 20243D-Prover: Diversity Driven Theorem Proving With Determinantal Point Processescited by 6
- 2025GenoMAS: A Multi-Agent Framework for Scientific Discovery via Code-Driven Gene Expression Analysiscited by 6
- 2026VeriSoftBench: Repository-Scale Formal Verification Benchmarks for Leancited by 6
- 2026RMA: an Agentic System for Research-Level Mathematical Problemscited by 6
- 2025MiniF2F in Rocq: Automatic Translation Between Proof Assistants -- A Case Studycited by 5
- 2025Agentic Verification of Software Systemscited by 5
- 2026AXLE: A Cloud Infrastructure for Lean 4 Theorem Proving Utilitiescited by 4
- 2024QEDCartographer: Automating Formal Verification Using Reward-Free Reinforcement Learningcited by 3
- 2025A Llama walks into the 'Bar': Efficient Supervised Fine-Tuning for Legal Reasoning in the Multi-state Bar Examcited by 3
- 2025LeanTutor: Towards a Verified AI Mathematical Proof Tutorcited by 3
- 2025ProofCompass: Enhancing Specialized Provers with LLM Guidancecited by 3
- 2026Inductive Deductive Synthesis: Enabling AI to Generate Formally Verified Systemscited by 3
- 2026Agentic Proving for Program Verificationcited by 3
- 2026Theory-Scale Auto-Formalization of Logics for Computer Sciencecited by 3
- 2025Discovering New Theorems via LLMs with In-Context Proof Learning in Leancited by 2
- 2025Learning Interestingness in Automated Mathematical Theory Formationcited by 2
- 2025MINIF2F-DAFNY: LLM-Guided Mathematical Theorem Proving via Auto-Active Verificationcited by 2
- 2026Automated Lemma Discovery in Agentic Program Verificationcited by 2
50 most cited of 78 All 78 (JSON)
- 2026Cost-Efficient Theorem Proving via Agent Orchestration in Program Verification7 Oct 2026
- 2026SkillEvoLean: Mutation-enhanced skill evolution for Lean provers1 Oct 2026
- 2026FORALL-LEAN-AGENT for Auditable Reasoning in Formal Mathematics and Software Verification1 Oct 2026
- 2026Fyan: A Human--AI Harness with Semantic Auditing for Document-Level Formalization30 Sep 2026
- 2026TCSAlgBench: Benchmarking Automated Proving for Research-Level Theoretical Computer Science28 Sep 2026
- 2026When Does Structured Knowledge Help Neural Theorem Proving?28 Sep 2026
- 2026Schwarz: Solver-Aware Agentic Program Verification31 Aug 2026
- 2026SkillForge: Compositional Skill Synthesis with Verification-in-the-Loop for Generating Formally Verified Dafny Programs30 Aug 2026
- 2026ProofEvolve: Neuro-Symbolic Evolution for Formal Automated Theorem Proving26 Aug 2026
- 2026CAPRI: Contract-Aware Proof Repair for Isabelle13 Aug 2026
- 2026VALG: An Agentic System for ML Theory Research13 Aug 2026
- 2026Reward-Oracle MCTS for Formal Theorem Proving: Sample-Efficient Search and the Need for Kernel-Level Proof Auditing11 Aug 2026
38 more
- 2026P3: Joint Program-and-Proof Planning for Verified Code Generation10 Aug 2026
- 2026PPDL: LLM-Based Flows as Probabilistic Programs5 Aug 2026
- 2026AoA: Theorem Proving Agent over Abstract Syntax Tree of Redesigned Language17 Jul 2026
- 2026MathCoPilot: An Interactive System for Human-AI Symbiotic Paradigm of Mathematical Research16 Jul 2026
- 2026From Solvers to Research: Large Language Model-Driven Formal Mathematics at the Research Frontier8 Jul 2026
- 2026Harnessing Code Agents for Automatic Software Verification7 Jul 2026
- 2026Theory-Scale Auto-Formalization of Logics for Computer Science25 Jun 2026
- 2026AXLE: A Cloud Infrastructure for Lean 4 Theorem Proving Utilities24 Jun 2026
- 2026VERITAS: Verifier-Guided Proof Search for Zero-Shot Formal Theorem Proving17 Jun 2026
- 2026TheoremBench: Evaluating LLMs on Theorem Proving in Formal Mathematics8 Jun 2026
- 2026Automating Formal Verification with Agent-Guided Tree Search26 May 2026
- 2026Agentic Proving for Program Verification22 May 2026
- 2026Inductive Deductive Synthesis: Enabling AI to Generate Formally Verified Systems22 May 2026
- 2026RMA: an Agentic System for Research-Level Mathematical Problems20 May 2026
- 2026Rollout Cards: A Reproducibility Standard for Agent Research12 May 2026
- 2026Benchmarking Testing in Automated Theorem Proving26 Apr 2026
- 2026Discover and Prove: An Open-source Agentic Framework for Hard Mode Automated Theorem Proving in Lean 417 Apr 2026
- 2026Automated Lemma Discovery in Agentic Program Verification23 Mar 2026
- 2026A Survey of Multimodal Mathematical Reasoning: From Perception, Alignment to Reasoning9 Mar 2026
- 2026A Minimal Agent for Automated Theorem Proving27 Feb 2026
- 2026VeriSoftBench: Repository-Scale Formal Verification Benchmarks for Lean20 Feb 2026
- 2026AlgoVeri: An Aligned Benchmark for Verified Code Generation on Classical Algorithms10 Feb 2026
- 2026Large Language Model Reasoning Failures5 Feb 2026
- 2026LeanTutor: Towards a Verified AI Mathematical Proof Tutor24 Jan 2026
- 2025MINIF2F-DAFNY: LLM-Guided Mathematical Theorem Proving via Auto-Active Verification11 Dec 2025
- 2025Agentic Verification of Software Systems21 Nov 2025
- 2025Learning Interestingness in Automated Mathematical Theory Formation5 Nov 2025
- 2025ProofBridge: Auto-Formalization of Natural Language Proofs in Lean via Joint Embeddings17 Oct 2025
- 2025DRIFT: Decompose, Retrieve, Illustrate, then Formalize Theorems12 Oct 2025
- 2025Aria: An Agent For Retrieval and Iterative Auto-Formalization via Dependency Graph6 Oct 2025
- 2025Aristotle: IMO-level Automated Theorem Proving1 Oct 2025
- 2025Discovering New Theorems via LLMs with In-Context Proof Learning in Lean16 Sep 2025
- 2025GenoMAS: A Multi-Agent Framework for Scientific Discovery via Code-Driven Gene Expression Analysis28 Jul 2025
- 2025Solving Formal Math Problems by Decomposition and Iterative Reflection21 Jul 2025
- 2025ProofCompass: Enhancing Specialized Provers with LLM Guidance18 Jul 2025
- 2025Prover Agent: An Agent-Based Framework for Formal Mathematical Proofs24 Jun 2025
- 2025AlphaEvolve: A coding agent for scientific and algorithmic discovery16 Jun 2025
- 2025LeanTutor: Towards a Verified AI Mathematical Proof Tutor10 Jun 2025
50 newest of 78 All 78 (JSON)
- 2025AlphaEvolve: A coding agent for scientific and algorithmic discoverycited by 763
- 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repaircited by 225
- 2024You Name It, I Run It: An LLM Agent to Execute Tests of Arbitrary Projectscited by 45
- 2025Prover Agent: An Agent-Based Framework for Formal Mathematical Proofscited by 28
- 2025Aria: An Agent For Retrieval and Iterative Auto-Formalization via Dependency Graphcited by 18
- 2026A Minimal Agent for Automated Theorem Provingcited by 13
- 2025GenoMAS: A Multi-Agent Framework for Scientific Discovery via Code-Driven Gene Expression Analysiscited by 6
- 2026RMA: an Agentic System for Research-Level Mathematical Problemscited by 6
- 2025Agentic Verification of Software Systemscited by 5
- 2026Agentic Proving for Program Verificationcited by 3
- 2026Automated Lemma Discovery in Agentic Program Verificationcited by 2
- 2026Discover and Prove: An Open-source Agentic Framework for Hard Mode Automated Theorem Proving in Lean 4cited by 1
12 most cited of 22 All 22 (JSON)
- 2026Cost-Efficient Theorem Proving via Agent Orchestration in Program Verification7 Oct 2026
- 2026SkillEvoLean: Mutation-enhanced skill evolution for Lean provers1 Oct 2026
- 2026FORALL-LEAN-AGENT for Auditable Reasoning in Formal Mathematics and Software Verification1 Oct 2026
- 2026Schwarz: Solver-Aware Agentic Program Verification31 Aug 2026
- 2026SkillForge: Compositional Skill Synthesis with Verification-in-the-Loop for Generating Formally Verified Dafny Programs30 Aug 2026
- 2026VALG: An Agentic System for ML Theory Research13 Aug 2026
- 2026AoA: Theorem Proving Agent over Abstract Syntax Tree of Redesigned Language17 Jul 2026
- 2026Harnessing Code Agents for Automatic Software Verification7 Jul 2026
- 2026Automating Formal Verification with Agent-Guided Tree Search26 May 2026
- 2026Agentic Proving for Program Verification22 May 2026
- 2026RMA: an Agentic System for Research-Level Mathematical Problems20 May 2026
- 2026Discover and Prove: An Open-source Agentic Framework for Hard Mode Automated Theorem Proving in Lean 417 Apr 2026
12 newest of 22 All 22 (JSON)
- 2024Formal Mathematical Reasoning: A New Frontier in AIcited by 80
- 2024Lean-STaR: Learning to Interleave Thinking and Provingcited by 64
- 2024A Survey of Mathematical Reasoning in the Era of Multimodal Large Language Model: Benchmark, Method & Challengescited by 55
- 2025Solving Formal Math Problems by Decomposition and Iterative Reflectioncited by 35
- 2024LeanAgent: Lifelong Learning for Formal Theorem Provingcited by 34
- 2026Large Language Model Reasoning Failurescited by 20
- 2025Proving Olympiad Inequalities by Synergizing LLMs and Symbolic Reasoningcited by 17
- 2025LeanProgress: Guiding Search for Neural Theorem Proving via Proof Progress Predictioncited by 9
- 2025Grammars of Formal Uncertainty: When to Trust LLMs in Automated Reasoning Taskscited by 9
- 2025A Llama walks into the 'Bar': Efficient Supervised Fine-Tuning for Legal Reasoning in the Multi-state Bar Examcited by 3
- 2025ProofCompass: Enhancing Specialized Provers with LLM Guidancecited by 3
- 2025MINIF2F-DAFNY: LLM-Guided Mathematical Theorem Proving via Auto-Active Verificationcited by 2
12 most cited of 13 All 13 (JSON)
- 2026A Survey of Multimodal Mathematical Reasoning: From Perception, Alignment to Reasoning9 Mar 2026
- 2026Large Language Model Reasoning Failures5 Feb 2026
- 2025MINIF2F-DAFNY: LLM-Guided Mathematical Theorem Proving via Auto-Active Verification11 Dec 2025
- 2025Solving Formal Math Problems by Decomposition and Iterative Reflection21 Jul 2025
- 2025ProofCompass: Enhancing Specialized Provers with LLM Guidance18 Jul 2025
- 2025Grammars of Formal Uncertainty: When to Trust LLMs in Automated Reasoning Tasks26 May 2025
- 2025A Llama walks into the 'Bar': Efficient Supervised Fine-Tuning for Legal Reasoning in the Multi-state Bar Exam7 Apr 2025
- 2025LeanProgress: Guiding Search for Neural Theorem Proving via Proof Progress Prediction25 Feb 2025
- 2025Proving Olympiad Inequalities by Synergizing LLMs and Symbolic Reasoning19 Feb 2025
- 2024Formal Mathematical Reasoning: A New Frontier in AI20 Dec 2024
- 2024A Survey of Mathematical Reasoning in the Era of Multimodal Large Language Model: Benchmark, Method & Challenges16 Dec 2024
- 2024LeanAgent: Lifelong Learning for Formal Theorem Proving8 Oct 2024
12 newest of 13 All 13 (JSON)
- 2024PutnamBench: Evaluating Neural Theorem-Provers on the Putnam Mathematical Competitioncited by 153
- 2024A Survey on Deep Learning for Theorem Provingcited by 55
- 2024The Limits of Inference Scaling Through Resamplingcited by 51
- 2025Aristotle: IMO-level Automated Theorem Provingcited by 47
- 2023LLMSTEP: LLM proofstep suggestions in Leancited by 32
- 2025VERINA: Benchmarking Verifiable Code Generationcited by 30
- 2025CLEVER: A Curated Benchmark for Formally Verified Code Generationcited by 27
- 2024Proving Theorems Recursivelycited by 25
- 2024Hierarchical Context Pruning: Optimizing Real-World Code Completion with Repository-Level Pretrained Code LLMscited by 13
- 2026AlgoVeri: An Aligned Benchmark for Verified Code Generation on Classical Algorithmscited by 11
- 2025ProofAug: Efficient Neural Theorem Proving via Fine-grained Proof Structure Analysiscited by 10
- 2024Cobblestone: A Divide-and-Conquer Approach for Automating Formal Verificationcited by 8
12 most cited of 41 All 41 (JSON)
- 2026Fyan: A Human--AI Harness with Semantic Auditing for Document-Level Formalization30 Sep 2026
- 2026TCSAlgBench: Benchmarking Automated Proving for Research-Level Theoretical Computer Science28 Sep 2026
- 2026When Does Structured Knowledge Help Neural Theorem Proving?28 Sep 2026
- 2026ProofEvolve: Neuro-Symbolic Evolution for Formal Automated Theorem Proving26 Aug 2026
- 2026CAPRI: Contract-Aware Proof Repair for Isabelle13 Aug 2026
- 2026Reward-Oracle MCTS for Formal Theorem Proving: Sample-Efficient Search and the Need for Kernel-Level Proof Auditing11 Aug 2026
- 2026P3: Joint Program-and-Proof Planning for Verified Code Generation10 Aug 2026
- 2026PPDL: LLM-Based Flows as Probabilistic Programs5 Aug 2026
- 2026MathCoPilot: An Interactive System for Human-AI Symbiotic Paradigm of Mathematical Research16 Jul 2026
- 2026From Solvers to Research: Large Language Model-Driven Formal Mathematics at the Research Frontier8 Jul 2026
- 2026Theory-Scale Auto-Formalization of Logics for Computer Science25 Jun 2026
- 2026AXLE: A Cloud Infrastructure for Lean 4 Theorem Proving Utilities24 Jun 2026
12 newest of 41 All 41 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2026OProver: A Unified Framework for Agentic Formal Theorem Proving
- 2025Hilbert: Recursively Building Formal Proofs with Informal Reasoning
- 2026LEAP: Supercharging LLMs for Formal Mathematics with Agentic Frameworks
- 2026Pythagoras-Prover: Advancing Efficient Formal Proving via Augmented Lean Formalisation
- 2025Seed-Prover 1.5: Mastering Undergraduate-Level Theorem Proving via Learning from Experience
- 2026Magenta: Closing the Loop Between Mathematical Reasoning and Lean Verification
- 2024ImProver: Agent-Based Automated Proof Optimization
- 2026Optimizing the Cost-Quality Tradeoff of Agentic Theorem Provers in Lean