← Latest papers
🤖 AI

LEAP: Supercharging LLMs for Formal Mathematics with Agentic Frameworks

The paper introduces LEAP, an agentic framework that empowers general-purpose large language models to achieve state-of-the-art performance in formal theorem proving by bridging informal reasoning with Lean compiler feedback, successfully solving all 12 problems of the 2025 Putnam Competition and significantly outperforming specialized systems on the newly proposed Lean-IMO-Bench.

Original authors: Po-Nien Kung, Linfeng Song, Dawsen Hwang, Jinsung Yoon, Chun-Liang Li, Simone Severini, Mirek Olšák, Edward Lockhart, Quoc V Le, Burak Gokturk, Thang Luong, Tomas Pfister, Nanyun Peng

Published 2026-06-03
📖 4 min read☕ Coffee break read

Original authors: Po-Nien Kung, Linfeng Song, Dawsen Hwang, Jinsung Yoon, Chun-Liang Li, Simone Severini, Mirek Olšák, Edward Lockhart, Quoc V Le, Burak Gokturk, Thang Luong, Tomas Pfister, Nanyun Peng

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a brilliant, world-class mathematician who can explain complex ideas in plain English, tell a great story, and reason through difficult puzzles. However, this mathematician is terrible at writing code. If you ask them to write a program to solve a math problem, they might write something that sounds right but crashes immediately when you try to run it.

This is the current state of Large Language Models (LLMs) in mathematics. They are amazing at "informal" math (talking about it) but struggle with "formal" math (writing it in a strict, computer-checkable language like Lean, where a single typo breaks the whole proof).

The paper introduces LEAP (LLM-in-Lean Environment Agentic Prover), a new system that acts like a super-organized project manager to help this brilliant mathematician finally write perfect code.

Here is how LEAP works, using simple analogies:

1. The Problem: The "One-Shot" Trap

Previously, if you asked an AI to prove a theorem, it tried to write the entire solution in one go, like a student trying to write a 50-page thesis in a single breath. If they made a mistake on page 3, the whole thing failed. The paper calls this "one-shot formalization," and it rarely works for hard problems.

2. The Solution: The "Blueprint" Approach

LEAP changes the game by breaking the process down, much like building a skyscraper:

  • Step 1: The Architect's Sketch (The Blueprint): Instead of trying to build the whole building at once, LEAP first asks the AI to draw a "blueprint." This is a high-level plan written in plain English. It says, "To solve this, we first need to prove Lemma A, then Lemma B, and finally combine them."
  • Step 2: The Construction Crew (The Formal Proof): Once the blueprint is approved, the AI tries to write the actual Lean code for just one small part of the plan.
  • Step 3: The Inspector (The Compiler): The Lean compiler acts like a strict building inspector. It checks the code. If it's perfect, great! If there's an error, it sends a specific message back: "The foundation is cracked here."
  • Step 4: The Fixer (Self-Refinement): The AI reads the inspector's note, fixes the specific error, and tries again. It doesn't start over; it just patches the hole.

3. The Secret Sauce: The "Memory Map" (DAG)

The most clever part of LEAP is how it remembers what it has done. Imagine you are solving a giant maze.

  • Old Way: If you hit a dead end, you might forget where you came from and wander in circles, wasting time.
  • LEAP's Way: LEAP draws a map (called a Directed Acyclic Graph, or DAG) of the entire maze.
    • If it solves a small puzzle (a "lemma") in one branch of the maze, it writes it down on the map.
    • If it encounters that same puzzle later in a different branch, it doesn't solve it again. It just looks at the map, sees the solution is already there, and uses it.
    • This prevents the AI from wasting energy re-inventing the wheel and allows it to tackle massive, complex problems that would otherwise take forever.

4. The Results: From Zero to Hero

The paper tested this system on some of the hardest math problems in the world:

  • The Putnam Competition: This is a grueling math contest for university students in North America. In 2025, the average student scored only 2 out of 120. LEAP solved 100% of the problems (all 12 of them).
  • The IMO-Bench: The authors created a new test based on the International Mathematical Olympiad (IMO). Previous specialized AI systems (trained only on math) solved about 48% of these. LEAP, using a general-purpose AI, solved 70%.

5. The Big Takeaway

The paper argues that we don't need to build tiny, specialized robots just for math. Instead, we can take a general-purpose AI (one that knows a little about everything) and give it a good workflow (the blueprint, the inspector, and the memory map).

Think of it like this: You don't need a robot that is only good at baking to bake a perfect cake. You just need a general-purpose chef who is given a good recipe, a strict taste-tester, and a notebook to remember what worked. LEAP provides that recipe, taste-tester, and notebook, turning a "good talker" into a "perfect prover."

In short: LEAP doesn't make the AI smarter; it just gives the AI a better way to organize its thoughts, check its work, and remember its successes, allowing it to solve math problems that were previously impossible for general AI.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →