Lean
20 articles on BlogLLM
- Why Mathematicians Let a Computer Check Their Proofs: Meet Lean
A long math proof can run to hundreds of pages. A referee reads it, nods, and signs off. But referees are human, and humans skim, get tired and trust steps that look familiar…
- Set Up Lean 4 and Talk to It With #eval and #check
Reading about Lean only gets you so far. The fastest way to learn it is to type something, see what Lean says back, and adjust. So before any proofs, you need a place where Lean…
- Every Lean Expression Has a Type, and Type Errors Are Your Friend
In many languages you find out that you passed text where a number was expected only when the program runs, sometimes in production. The mistake was visible in the code all along…
- Writing Functions in Lean: def, fun, Curly Braces and match
Once you can compute 3 3 and 7 7, you want to say "square any number" once and reuse it. Every language solves this with functions. Lean's functions look a little different from…
- Build Your Own Nat: How Inductive Types Define Data in Lean
Most languages hand you numbers and lists as built in magic. You use them, but you never see how they are made. That is fine for programming, but it is a problem for proving. To…
- Why Lean Refuses a Function That Might Never Stop
In most languages you can write a function that calls itself forever, and the compiler will not stop you. The program just hangs when you run it. That is annoying in programming…
- A Proof Is Just a Value: Propositions as Types in Lean
So far Lean has looked like a programming language with a strict type checker. You wrote functions, defined data and evaluated expressions. But this course promises proofs a…
- And, Or, Implies: Building Proofs Like Data in Lean
2 + 2 = 4 is a fine start, but real statements are built from pieces. "x is positive and x is even." "The list is empty or it has a first element." "If the input is sorted, then…
- For All, There Exists, and Equals: Lean's Three Workhorse Statements
Here is a problem. You want to tell Lean "adding zero to any number gives that number back." Not just for 5, or for 100, but for every natural number at once. You also want to say…
- Tactic Mode in Lean 4: Proving Step by Step With the Goal View
Here is a problem. Term proofs work, but as statements grow they get hard to write in one go. You have to hold the whole proof in your head, nested brackets and all, and Lean only…
- rw vs simp in Lean 4: Rewriting Goals Without Losing Track
Here is a problem. You know a = b, and you want to prove a + 1 = b + 1. On paper you would just say "replace a with b". None of the tactics from the last lesson do that directly…
- Why Lean Accepts n + 0 = n but Not 0 + n = n: Induction on Nat
Here is a problem. Lean accepts n + 0 = n with a plain rfl, but it rejects 0 + n = n the same way. Both are obviously true. So why does one go through and the other fail? The…
- Proving Facts About Lists in Lean 4: Append, Length and Reverse Twice
Here is a problem. You join two lists, xs ++ ys, and you want to prove the length of the result is the length of xs plus the length of ys. You can test it on a hundred examples…
- Finding the Lemma You Need in Mathlib: Names, exact? and Loogle
Here is a problem. You are in the middle of a proof and you need the fact that a b = b a for real numbers. You know it is true. Someone has surely proved it already. But what is…
- Lean Accepted It. Is It True? How to Read a Theorem Statement
Here is a problem. Someone shows you a Lean file and says "this theorem is formally verified". Lean accepted it. Does that mean the claim you care about is true? Not necessarily…
- Lean Proved It. Did It Prove What the Paper Says?
A research paper makes a claim in its abstract. A Lean file says the claim is proved. Lean checked every step, so the claim must be true. Right? Not quite. Lean checks that the…
- OpenAI Says Nothing Beats n^2.25 for Matrix Multiplication. Here Is What Lean Actually Checked
Every large language model spends most of its time multiplying matrices. So here is a simple question with a surprisingly deep answer: how much work does it take to multiply two n…
- A 600,000-Line Proof Claims a $1 Million Prize. The Key File Is Missing
On November 20, two mathematicians posted a paper that claims to settle one of the hardest problems in math. Tristan Buckmaster of NYU and Levent Alpoge of Anthropic say the…
- Claude May Have Solved the Riemann Hypothesis. The Proof Is 17 Million Lines Long
On Friday, November 20, 2026, a mathematician at Anthropic named Levent Alpöge announced that he and Claude have a proof of the Riemann Hypothesis. Not a sketch, not a claim about…
- Formal Proofs Are the Stress Test LLM Reasoning Cannot Fake
Informal reasoning is easy to fake. A model can write a plausible-looking proof with a wrong step in the middle, and nobody notices until an expert checks every line. Formal…