Local flag algebras
Razborov's flag algebras normalise densities by graph order, which does not suit extremal problems that scale with maximum degree. A bounded-degree refinement of Erdős's pentagon problem asks for the maximum number of induced pentagons in a triangle-free graph as a function of |G| and Δ(G).
The authors define local flag algebras, in which densities are normalised by binomial coefficients in Δ(G). The framework keeps the flag product, limit functionals, averaging operator, positivity cone and weak duality, and adds a transfer principle from asymptotic to unconditional bounds. SDP certificates of size 5 and size 8 are generated by a Rust tool and rationalised into Lean source. The framework, the theorems and the certificates are formalised in Lean 4, and an agentic AI system was used to help with the formal verification and with two auxiliary theorems.
The bounds P(G) ≤ |G|Δ(G)^4/40 and P(G) ≤ 0.02073·|G|Δ(G)^4 are proved. The conjectured optimum of 12/625, attained by blowups of the Clebsch graph, is established at maximum degree five. The size-5 certificate is checked entirely in Lean with no domain axioms, and a repository maps each result to its Lean statement and the axioms it depends on.
