Discovering New Theorems via LLMs with In-Context Proof Learning in Lean
Kazumi Kasaura, Naoto Onda, Yuta Oriike, Masaya Taniguchi, Akiyoshi Sannai, Sho Sonoda
Abstract
Large Language Models (LLMs) have demonstrated significant promise in formal theorem proving.In this study, we investigate the ability of LLMs to discover novel theorems and produce verified proofs. We propose a pipeline called *Conjecturing-Proving Loop* (CPL), which iteratively generates mathematical conjectures and attempts to prove them in Lean 4.A key feature of CPL is that each iteration conditions the LLM on previously generated theorems and their formal proofs, enabling parameter-free improvement of proof strategies via in-context learning.We provide both theoretical and experimental evidence that CPL increases the discovery rate of hard-to-prove theorems compared to frameworks that generate statements and proofs simultaneously.Moreover, our experiments show that reusing the LLM’s own formally verified outputs as context consistently improves subsequent proof success, demonstrating the effectiveness of self-generated in-context learning for neural theorem proving.- Anthology ID:
- 2026.naloma-1.5
- Volume:
- Proceedings of the 6th Workshop on Natural Language Meets Logic and Machine Learning (NALOMA)
- Month:
- August
- Year:
- 2026
- Address:
- Prague, Czechia
- Editors:
- Hitomi Yanaka, Lasha Abzianidze
- Venues:
- NALOMA | WS
- SIG:
- Publisher:
- Association for Computational Linguistics
- Note:
- Pages:
- 40–49
- Language:
- URL:
- https://preview.aclanthology.org/ingest-naloma/2026.naloma-1.5/
- DOI:
- Cite (ACL):
- Kazumi Kasaura, Naoto Onda, Yuta Oriike, Masaya Taniguchi, Akiyoshi Sannai, and Sho Sonoda. 2026. Discovering New Theorems via LLMs with In-Context Proof Learning in Lean. In Proceedings of the 6th Workshop on Natural Language Meets Logic and Machine Learning (NALOMA), pages 40–49, Prague, Czechia. Association for Computational Linguistics.
- Cite (Informal):
- Discovering New Theorems via LLMs with In-Context Proof Learning in Lean (Kasaura et al., NALOMA 2026)
- PDF:
- https://preview.aclanthology.org/ingest-naloma/2026.naloma-1.5.pdf