← Latest papers
🔢 mathematics

Formalizing Flag Algebras in Lean

This paper presents a machine-checked formalization of Razborov's flag algebra method in Lean, featuring a compiler that independently verifies semidefinite programming certificates to rigorously prove seven Turán-type upper bounds and explore the meta-theoretic nuances of imposing graph constraints.

Original authors: Gyeongwon Jeong, Seonghun Park, Jihoon Hyun, Sang-il Oum, Hongseok Yang

Published 2026-07-28
📖 3 min read🧠 Deep dive

Original authors: Gyeongwon Jeong, Seonghun Park, Jihoon Hyun, Sang-il Oum, Hongseok Yang

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 are a detective trying to solve a mystery about how things fit together. In the world of math, specifically a branch called "extremal graph theory," the mystery is this: If you have a huge collection of dots (vertices) connected by lines (edges), and you are strictly forbidden from drawing a specific shape—like a triangle or a square—what is the absolute maximum number of lines you can draw before you accidentally create that forbidden shape? It's like trying to pack as many toys as possible into a box without crushing a fragile vase in the middle. Mathematicians have been trying to find these "packing limits" for decades, but the numbers get so huge and the patterns so complex that human brains can't check every single possibility.

To tackle this, mathematicians invented a clever trick called "flag algebras." Think of a "flag" not as a piece of cloth on a pole, but as a tiny, labeled snapshot of a graph. If you have a giant graph, a flag is just a small piece of it where some dots are marked with stickers (labels) to keep track of who is who. The method uses these tiny snapshots to write down algebraic equations that describe the whole giant graph. It's like trying to understand the weather of an entire continent by measuring the wind speed in just a few specific, labeled spots. By solving these equations, mathematicians can prove strict upper limits on how many lines can exist without breaking the rules. However, these proofs often rely on massive computer calculations that are too big for a human to double-check by hand, leaving a nagging doubt: "Did the computer make a mistake?"

This paper is about building a super-strict, machine-checked safety net for these proofs. The authors, a team of researchers from Korea, have translated the entire theory of flag algebras into a programming language called Lean, which acts like a hyper-logical robot judge. They didn't just write the rules; they built a "certificate-to-proof compiler." Imagine a scenario where a computer program (like a detective's assistant) finds a solution and hands you a stack of papers claiming, "Here is the proof!" Usually, you'd have to trust that the computer didn't mess up the math. But this paper introduces a system where the computer's stack of papers is treated as a suspect. The Lean compiler takes that stack, re-does every single calculation from scratch using its own internal logic, checks that the computer's "positive semidefinite matrices" (a fancy way of saying "guaranteed non-negative numbers") are actually correct, and then assembles a final, unbreakable proof.

The team tested this system on seven famous mathematical puzzles, including Mantel's theorem (about triangle-free graphs) and the Erdős pentagon theorem (about pentagons in triangle-free graphs). They successfully turned external computer-generated "certificates" into formal, machine-verified proofs for all seven cases. This means that for these specific problems, we now have a mathematical guarantee that the answers are correct, down to the last decimal, because a computer has verified every step of the logic. They also used their new tools to prove some lower bounds (showing that you can reach these limits) and explored a deep theoretical question about how to handle the "forbidden" shapes in the math, discovering that sometimes the way you set up the rules matters more than you think. Ultimately, this work doesn't just solve a few old riddles; it builds a new, reliable engine that can take complex, computer-assisted math and turn it into ironclad, human-verifiable truth.

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 →