Every Boolean function has a DNF and a CNF with at most gates
ProvedShallowSym.prelim_cnf_dnfboolean-functionscircuit-complexityconstant-depth-circuitsp2o-gran-per-chapterp2o-plan-paperp2o-v1symmetric-functions
Let be any Boolean function. Then is computed by a formula (a DNF) and by a formula (a CNF), each with at most
AND/OR gates.
This is the base case of the induction proving Theorem 1 (" and circuits of size ", p.10), and it is used for small juntas throughout the paper.
Formalization Note Formulas are strictly layered alternating AND/OR trees over literals (ShallowSym.Layer): every literal sits at depth exactly , a gate at level reads only nodes of level , gates of arbitrary (also empty) fan-in, size = number of gates.
Differences from the source:
- encoding: size of a CNF/DNF = number of clauses or terms, bound 2ⁿ (p.5) → size = number of gates including the output gate, bound 2ⁿ + 1; reason: the proof of Theorem 1 (p.10) states the same fact in gate counts, 'Π2 and Σ2 circuits of size 2^n + 1'; the two conventions differ by exactly the output gate
- encoding: CNF/DNF (no statement about empty clause lists) → empty gates allowed (empty OR = false, empty AND = true); reason: the paper's DNF of the constant-0 function is the OR over no satisfying assignments; same instances
Preamble
import Mathlib import Definitions.Def_ShallowSym_Layer
Formal statement
namespace ShallowSym
/-- §2 "Circuits", p.5, used as the base case `d = 2` of Theorem 1 (p.10). V. Lecomte, P. Ramakrishnan, *Optimal Shallow Circuits for Majority*, arXiv:2609.34029
(version of 2026-11-01, sha256 6f46ce49…).
"A useful fact is that every Boolean function on n variables can be represented as both a CNF
and a DNF of size at most 2^n." The proof of Theorem 1 (p.10) uses it with gates counted: "any
function can be represented as a CNF or DNF of size 2^n (Π2 and Σ2 circuits of size 2^n + 1)."
Every `f : {0,1}^n → {0,1}` is computed by a Σ_2 formula (DNF) and by a Π_2 formula (CNF), each
with at most `2^n + 1` gates.
**Formalization Note.** The p.5 convention counts clauses or terms; `size` counts every gate,
including the output gate, hence the bound `2^n + 1`. -/
theorem prelim_cnf_dnf (n : ℕ) (f : Cube n → Bool) :
(∃ φ : Layer n 2, (∀ x, evalSigma 2 φ x = f x) ∧ size 2 φ ≤ 2 ^ n + 1) ∧
(∃ ψ : Layer n 2, (∀ x, evalPi 2 ψ x = f x) ∧ size 2 ψ ≤ 2 ^ n + 1) := by sorry
end ShallowSym
Source
Lecomte, Ramakrishnan, Optimal Shallow Circuits for Majority, arXiv:2609.34029 (version of 2026-11-01, sha256 6f46ce49…), §2 'Circuits', p.5; used as the base case of Theorem 1, p.10
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.