Formalizing PARITY Circuit Lower Bounds in Lean
Håstad's lower bound shows that constant-depth circuits computing PARITY on n inputs require size exp(Omega_d(n^(1/(d-1)))), implying PARITY is not in nonuniform AC0. This classical complexity-theory result had not been machine-checked.
Boolean formulas and DAG circuits with unbounded-fan-in AND/OR and NOT gates are defined inductively in Lean, along with DNF/CNF, size, width, and PARITY-computation predicates. NOT-gate elimination via De Morgan pushing, restriction lemmas, and the switching lemma are formalized to prove the formula lower bound. The bound is transferred to DAG circuits by unfolding into equivalent formulas with controlled depth and size blowup from duplicated shared gates.
For every fixed depth d>=2 and sufficiently large n, well-formed circuits computing PARITY are proven to require size exp(Omega_d(n^(1/(d-1)))), matching the classical upper bound and formally establishing PARITY not in nonuniform AC0. A polynomial-size logarithmic-depth formula family witnesses NC1 not a subset of AC0 for the formalized models. Checked with Lean 4.33.1 and Mathlib 4.33.1.
