The Coe Lab
← Back to Blog

When AI Disproves the Mathematicians: The Counterexample Revolution

July 21, 20267 min read
AImathematicsLeanformalizationOpenAI

AI systems are systematically finding counterexamples to mathematical conjectures that have stood for decades. From Erdos to Grothendieck, no long-held assumption seems safe — and the proofs are being verified by machines.

For nearly 80 years, mathematicians believed they understood the limits of a deceptively simple problem in geometry. Now AI has proved them wrong — and the implications extend far beyond mathematics.

In May 2026, ChatGPT disproved the Erdos Unit Distance conjecture, one of the most famous open problems in combinatorial geometry. Two months later, AI systems are not just solving individual problems — they are systematically finding counterexamples to conjectures that have stood for decades, and formalizing the results in proof assistants that leave no room for doubt.

The Erdos Unit Distance Problem

Paul Erdos posed the unit distance problem in 1946: if you place n points in the plane, how many pairs of points can be exactly distance 1 apart? It sounds simple enough for a homework assignment, but it became one of the most stubborn open questions in discrete geometry. A 2005 reference book called it "possibly the best known (and simplest to explain) problem in combinatorial geometry." Erdos himself offered a cash prize for its resolution.

The prevailing belief for decades was that square grid constructions were essentially optimal — you could not do meaningfully better than arranging points in a grid pattern. An internal OpenAI model disproved this. It produced an infinite family of examples that yield a polynomial improvement over the grid construction, bringing sophisticated ideas from algebraic number theory to bear on what looked like an elementary geometric question.

Fields medalist Tim Gowers called the result "a milestone in AI mathematics." Number theorist Arul Shankar went further, saying the paper demonstrates that current AI models "go beyond just helpers to human mathematicians — they are capable of having original ingenious ideas, and then carrying them out to fruition."

From Disproof to Formal Proof in Weeks

What happened next is arguably more remarkable than the discovery itself. Kevin Buzzard, a professor at Imperial College London and one of the world's leading advocates for computer-formalized mathematics, documented the chain of events on the Xena Project blog.

When the Erdos counterexample was announced, Buzzard's first question was whether the proof had been formalized in Lean, the interactive theorem prover that has become the standard for machine-checkable mathematics. It had not. But within days, a company called Logical Intelligence — co-founded by Turing Award winner Yann LeCun — autoformalized the entire ChatGPT-generated paper in Lean. Their system translated the key argument from human language into machine-checkable code.

Then on June 26, Boris Alexeev at OpenAI announced that he had steered ChatGPT's new reasoning model, Sol, to a complete formalization of the Erdos counterexample from first principles — assuming nothing beyond the axioms of mathematics. Sol generated 1.2 million lines of Lean code in three weeks. For context, Lean's entire mathematics library, built over nine years by a global community of mathematicians, is 2.3 million lines.

The Counterexample Epidemic

The Erdos result was not an isolated event. At a workshop on formalizing Fermat's Last Theorem in early July 2026, multiple AI systems were finding counterexamples to claims that mathematicians had accepted — sometimes for years.

Buzzard describes feeding classic papers on finite flat group schemes to Claude and ChatGPT, which produced an expository document that was then passed to Logos Research's autoformalization tool. The tool identified that one of the claims in the AI-generated document was false and produced an explicit counterexample. It turned out to be a mistake in the exposition, not in the underlying mathematics, but the pattern was clear: AI systems are not just finding new counterexamples — they are finding errors in existing mathematical literature that humans had missed.

At the same workshop, a question from Akhil Mathew about Grothendieck's conjecture on finite free group schemes led to another AI-generated counterexample within days. Conjectures that had survived decades of human scrutiny are falling to AI systems in weeks.

Why This Matters Beyond Mathematics

Mathematics is the canary in the coal mine for AI's impact on knowledge work. It is the field where correctness is most rigorously defined, where claims can be definitively verified, and where the gap between intuition and proof is most stark. When AI can find counterexamples that human mathematicians missed, it tells us something about the nature of mathematical insight itself.

The implications extend in several directions:

  • Verification at scale: Lean and other proof assistants can now check AI-generated proofs, creating a pipeline where AI proposes and machines verify — no human trust required.
  • Accelerated discovery: The time from conjecture to counterexample is compressing from decades to weeks. Mathematicians may need to rethink how they work.
  • Formalization as infrastructure: The ability to translate human mathematical writing into machine-checkable code is becoming routine, not experimental.
  • Cross-domain synthesis: The Erdos proof used algebraic number theory to solve a geometry problem. AI systems are making connections across subfields that human specialists, trained in narrow areas, might not see.

The 1.2 Million Line Proof

The most striking detail in Buzzard's account is the scale of Sol's formalization output. Generating 1.2 million lines of Lean code in three weeks — more than half the size of a library that took a global community nine years to build — represents a qualitative shift in what automated mathematics looks like.

Buzzard notes that the AI-generated code was sometimes "horrible" and sometimes "decent," but within it were proofs of genuinely hard theorems in global class field theory — a subject so technical that only a handful of specialists work on it. He ran the code in a sandbox on his own machine, aware that malicious Lean code can execute arbitrary commands. It was proving nontrivial theorems about the cohomology of number fields. It worked.

This is the part that should make everyone sit up and pay attention. The code was not elegant. It was not always well-structured. But it was correct, and it covered material that would take a graduate student years to work through. Quantity has a quality all its own, and 1.2 million lines of verified mathematical code is a lot of quality.

What Comes Next

Buzzard, who has been arguing for years that interactive theorem provers should play a central role in mathematics, sounds almost vindicated rather than eccentric. His 2017 realization that he no longer trusted many human mathematicians on technical details led him to Lean. Now the rest of the world is catching up.

The emerging picture is one of collaboration between human mathematicians and AI systems, mediated by proof assistants. Humans pose questions and provide intuition. AI systems explore proof spaces, find counterexamples, and generate formalizations. Proof assistants verify everything. The role of the human mathematician shifts from proving theorems to directing the exploration and interpreting the results.

For now, the AI systems are still guided by humans. Boris Alexeev "steered" ChatGPT to its formalization. Buzzard fed papers to Claude and ChatGPT to generate expositions. The AI is a tool, not yet an independent researcher. But the velocity of progress suggests this distinction may not last long.

The Xena Project blog post ends with Buzzard reflecting on how his perception of what was possible changed in a single month. First, AI disproved a famous conjecture. Then, it was formalized in days. Then, a complete from-scratch formalization appeared, generating more code than half of mathlib. Then, at a workshop, AI started finding counterexamples to standing questions in real time.

Mathematics has always been about the search for truth. The tools are changing, the methods are changing, and the speed is changing. But the search goes on — now with silicon partners who are proving surprisingly good at finding the exceptions that disprove the rules.

Related Posts

Varkos: The AI Gaming Companion That Actually Plays With You

A developer built an AI dog companion for Skyrim that understands voice commands, executes multi-step plans, and evolves its personality over time — all running on local hardware with sub-500ms latency.

Aug 24, 20267 min

Why Your Local LLM Feels Dumber Than It Is: The Hidden Quality Gap

Your local LLM is not broken. Quantization, weak system prompts, and basic inference engines silently degrade quality. Here is what to fix.

Aug 23, 20266 min

AI Blindness: When Your Brain Learns to Stop Reading AI-Generated Content

A growing number of people report their brains automatically filtering out AI-generated text, like banner blindness for LLM output. This phenomenon reveals something deeper about trust, attention, and the future of human-AI interaction.

Aug 22, 20266 min