OpenAI Proved 722 Theorems. I Proved One.

October 6, 2026 · math · lean

OpenAI just released 722 math manuscripts produced by an unreleased model, some with machine-checked Lean proofs. The proofs are research-level. I wanted Lean proofs I could actually practice with, so I wrote my own, starting from zero: √2 is irrational, checked by a computer.

lean-practice

My Lean 4 practice set: baby steps, the full √2 irrationality proof with comments, and exercises (√3, then √p for any prime). Every file compiles.

Open the repo →

1. What OpenAI dropped

The repo is openai/math, Apache licensed. 722 manuscripts in 372 families, produced by an internal frontier model at roughly three hours of heavy thinking compute per result, drawn from about 4,000 posed problems. Some results already come with Lean 4 formalizations, which is the part that caught my eye: a machine-checked proof is either right or it does not compile. There is no partial credit and no hand-waving.

The headline families include the irrationality exponent of π, the Mahler conjectures, Kaplansky's direct-finiteness conjecture in characteristic two, the Hodge conjecture for CM abelian varieties, and a zero-free region for the Riemann zeta function. Heavyweight stuff. The π one is my favorite: it asks how well π can be approximated by fractions, which is a precise way of measuring how irrational a number is.

2. The gap I actually wanted to fill

Here is the thing about a Lean proof of the irrationality exponent of π: you cannot practice on it. It is the top of a mountain with no trail. I wanted the trail. So I built the smallest possible practice set that points at the same mountain: start with baby steps in Lean's tactic language, then prove √2 is irrational from scratch, with every step explained.

If the π result measures how irrational a number is, the √2 proof is where that road starts: the 2,500-year-old argument that some numbers simply are not fractions, now in a form a computer can check.

3. The proof, in six steps

Tap through it. Each step is one move in the argument, with the real Lean code that makes it real. Tap any highlighted word in the code to learn what it does.

Step 1 of 6
In plain words
1 / 8

Lean's little words

The same few words close out almost every line above. Here is what they mean.

byOpens a tactic block: a short script that proves the goal. Read it as "proved by doing the following."
exactHands Lean a proof that fits the goal perfectly. One move, done.
haveProves a helper fact right now and names it, so later lines can use it.
introTakes the goal apart and names the pieces: the variables and assumptions you get to work with.
obtainUnpacks a fact into its contents. "2 divides a" becomes a real witness: some c with a = 2c.
rwRewrites using an equation. rw [h] swaps one side of h for the other; the little arrow flips the direction.
:=Read as "is". Everything after it is the proof of everything before it.
omegaThe arithmetic robot. Closes any goal that is just adding, subtracting, and comparing numbers.
ringThe algebra robot. Expands and rearranges: (2c)² becomes 4c², that kind of work.
simpThe simplifier. Applies standard simplifications over and over until nothing changes.
norm_numCrunching concrete numbers, like checking that 0 ≤ 2.
exact_mod_castPlumbing between number types. Moves a fact from integers to reals (or back) so the types line up. push_cast is its partner.
Proof by contradiction: assume √2 is a fraction, then break that assumption.

4. What learning Lean feels like

Lean is a programming language where the program is a proof and the compiler is the referee. You write what you believe, and it tells you exactly which step does not hold up. There is something addictive about it: every error message is a precise pointer at the gap in your reasoning. Mathematicians have always had referees. Now the referee runs in milliseconds and never gets tired.

The honest part: the first hour is humbling. Things you "know" turn out to have twelve hidden steps. n + 0 = n is free, but 0 + n = n needs induction, because addition is defined by recursion on the right. You learn how much of your own math runs on vibes.

Then it clicks, and you start seeing proofs as programs. The √2 proof in the repo is 40 lines with comments. The computer checked every one of them. Euclid never got that.

5. Try it yourself

The repo has three parts: Basics.lean (tactics from zero, all compiling), Irrational.lean (the full √2 proof, heavily commented), and exercises with the answers removed: √3, then √p for any prime p. Install Lean with elan, clone, run lake build. If it compiles, you are right. That is the whole grading system.

Somewhere in the openai/math repo, a machine proved something about π that no human had managed. My contribution is smaller: one ancient theorem, checked by a laptop, and a trailhead for anyone who wants to start climbing. Take notes, OpenAI.

6. Run it in this page

The proof above is the same one, adapted slightly for the browser: this page's Mathlib does not include Mathlib's Irrational predicate, so irrationality is stated directly ("never equal to a ratio of integers") and the lowest-terms argument runs by infinite descent instead of going through fractions. Same theorem, same heart. Press Run and the real Lean kernel checks every line, on your machine. Nothing is uploaded. (On iPhone and iPad the checker hands off to the Lean web playground instead, since mobile Safari will not hold the full runtime in a tab.)

Lean 4, running in this tab
The proof is loaded below. Press Run.

  
Real Lean 4, compiled to WebAssembly. The first run downloads the runtime and the Mathlib pieces the proof needs (a few hundred megabytes); after that it is instant. "Break it" sneaks in a false theorem so you can watch the kernel complain. The full original file is in the repo.