A small circuit can be studied by counting the affine constraints needed to make its output constant. The arguments below distinguish facts from the literature, deductions on paper and finite computations.
4.1 Definitions
Functions. All functions are f: F₂ⁿ → F₂ and depend on all n of their variables; "+" is addition mod 2. A flat is an affine subspace of F₂ⁿ. D(f) is the largest dimension of a flat on which f is constant. α(f) is the largest dimension of a flat on which f equals an affine function. For even n, f is normal if D(f) ≥ n/2 and weakly normal if α(f) ≥ n/2.
Circuits. A B2 circuit has two-input gates computing any two-bit function. C(f) is the least number of gates (0 if n ≤ 1), and e(f) = C(f) − n + 1. Every two-bit function that depends on both arguments is AND-type, (u+a)(v+b)+c, or XOR-type, u+v+c, with constants a, b, c in F₂.
Affine-input circuit (AIC) over a flat A. A finite directed acyclic graph. Its sources are inputs; each input x is labelled by an affine form ℓ[x] on A. The labels are arbitrary: they may repeat, be linearly dependent, or be constant on A. Every other node is a gate with exactly two in-wires, from two different nodes, and an AND-type or XOR-type operation. One node is the output. K is clean if it has at least one gate and every node has a directed path to the output. K is trivial if it has no gate and no node except the output: the output is a constant (i = 0) or one input, possibly negated (i = 1). An ordinary circuit on x[1]..x[n] is the case A = F₂ⁿ with labels x[1]..x[n]. The model is known: it is the "xor-inputs circuit" studied by Find, Golovnev, Hirsch and Kulikov, here with labels on a flat.
Notation. Square brackets enclose an index. For example, t[w] is the out-degree of node w. i = number of inputs, s = number of gates, e(K) = s − i + 1 (the excess, used for clean circuits), f[K]: A → F₂ the function computed, c(K) = least codimension in A of a flat inside A on which f[K] is constant. For an ordinary circuit, c(K) = n − D(f). A top gate has both in-wires from inputs; a chain gate has one in-wire from an input and one from a gate; a join has both in-wires from gates. An input is private if t = 1 and shared if t ≥ 2.
Bounds. κ(i,e) = floor((3i + e + 3)/6) = floor((s + 2i + 4)/6), and β(i) = floor((3i + 5)/6) = κ(i,2). Both are non-decreasing in every argument. Values:
| Input parity | Excess 0–2 | Excess 3–5 | Excess 6–8 | Excess 9–11 |
|---|---|---|---|---|
| Even | i/2 | i/2 + 1 | i/2 + 1 | i/2 + 2 |
| Odd | (i+1)/2 | (i+1)/2 | (i+3)/2 | (i+3)/2 |
β(i) is i/2 for even i and (i+1)/2 for odd i. For an ordinary circuit with n inputs and s gates, "c(K) ≤ κ(n,e)" is the same as D(f) ≥ ceil((4n − 4 − s)/6), that is s ≥ 4n − 6·D(f) − 4, the inequality of CI-1.
Moves. (F) Fix an input form to a constant: A is replaced by a sub-flat of codimension at most 1. (R) Re-designate an XOR-type top gate as a new input labelled by its affine form: A is unchanged. Move (R) creates dependent labels, which is why every statement is made for AICs and not only for ordinary circuits.
How an induction step is used. The gate-count induction uses s, the number of gates. A step produces, at cost δ in {0,1} (the number of affine constraints added), an AIC K′ that is trivial, or clean with s′ < s, with at most I inputs and, when clean, e(K′) ≤ E. Then c(K) ≤ δ + c(K′), and c(K′) is bounded by the induction hypothesis at (I, E) when K′ is clean, and by Fact T when K′ is trivial.
Fact T [Established mathematical fact]. A trivial circuit has c ≤ i ≤ 1, and for i in {0,1}: i ≤ β(i) and i ≤ κ(i, e′) for every e′ ≥ 0.
4.2 Known results used
K1. Demenkov–Kulikov bound [Known theorem; read at source]. Let f be an affine disperser for dimension d on n variables (f is constant on no flat of dimension ≥ d), A a flat of dimension D and C a B2 circuit equal to f on A. Then s(C) + N(C) ≥ 4(D − d), where N(C) is the number of input variables of out-degree ≥ 1. With A = F₂ⁿ this gives s ≥ 3n − 4d; with d = D(f) + 1 it gives C(f) ≥ 3n − 4·D(f) − 4. Not re-proved here. The paper's corollary prints "3n − d", a misprint for 3n − 4d (Demenkov and Kulikov).
K1b. Xor-input circuits and the replacement move [Known theorem]. In an xor-inputs circuit, linear sums of variables may be used as inputs; with μ = gates + inputs, an XOR gate on two inputs may be replaced by an input without increasing μ. For such a circuit computing, on a flat of dimension D, an affine disperser for dimension d: μ ≥ 4(D − d − 1). This estimate is tight up to an additive constant: the inner product IP[n] is an affine disperser for dimension n/2 + 1 with n − 1 gates (2n − 1 against 2n − 8), and that for this reason the argument cannot give more than 3n (a remark it attributes to Vadhan and Williams) (Find and colleagues). So the model and move (R) are known. The handwritten argument below instead uses gates + 2·inputs and counts surplus wires by the cycle count.
K2. Padding lemma [Known theorem]. For fresh variables y, z: D(f + yz) = D(f) + 1 and α(f + yz) = α(f) + 1 (Meidl and Pirsic, Lemma 8). Our tests check both identities on all 16 two-input truth tables, with two fresh variables in each test.
K3. The 4n − 10d preprint [Unresolved proof attempt]. Theorem 4.1 of the November revision gives C(f) ≥ 4n − 10d for a polynomial-time computable affine disperser for dimension d. Mishra and Santhanam It is not used anywhere below. Near D = n/2 it is weaker than the trivial bound n − 1.
K4. Six inputs [Known six-input result, independently reproduced from the 2024 preprint]. Gillot, Langevin and Polujan give the six-input result attributed to Dubuc and the complete degree-by-degree row. Every six-input function has a constant three-flat. For seven inputs restrict one coordinate. For fewer than six inputs use E1. The rank-six branch of Theorem 2 uses exactly this constant-flat fact. Table 2 · Verification
4.3 Elementary facts
E1. Functions of few forms [Established mathematical fact]. Let f = Ψ(ℓ[1], …, ℓ[i]) on a flat A with affine forms ℓ[j], and let d ≤ i be the dimension of the image I of A under x → (ℓ[1](x), …, ℓ[i](x)). Then f is constant on a sub-flat of A of codimension ≤ r(d), where r(0) = 0, r(1) = r(2) = 1, r(3) = r(4) = 2, r(5) = 3, and with K4 also r(6) = 3. So an AIC with i ≤ 2 inputs has c ≤ 1, with i ≤ 4 inputs c ≤ 2, with i ≤ 5 inputs c ≤ 3.
Proof. The map sends A onto the affine space I, and the preimage of a sub-flat of I is a sub-flat of A of the same codimension. So it is enough to find a constant sub-flat of I of dimension d − r(d). For d ≤ 1 take a point. For d = 2, 3: two points with the same value form a 1-flat. For d = 4: one value is taken at 8 or more points; among 7 of them the 21 pairs have their sums among the 15 non-zero vectors, so two different pairs {a,b}, {c,d} have the same sum; they are disjoint and {a,b,c,d} is a 2-flat. For d = 5 apply the case d = 4 inside a 4-dimensional sub-flat. For d = 6 use K4. ∎ Machine check: 0 of the 65,536 functions on 4 variables avoid all 140 two-dimensional flats; the odd paired-product examples T₃ and T₅ below attain r(3) and r(5).
E2. Tight examples [Established mathematical fact]. (a) T[n] = x1x2 + … + x[n−2]x[n−1] + x[n] (n odd) has C = n − 1 and D = (n−1)/2: equality in CI-1 for every odd n. (b) IP[n] = x1x2 + … + x[n−1]x[n] (n even) has C = n − 1 and D = n/2. (c) As AICs, T[n] has (i odd, e = 0, c = (i+1)/2) and IP[n] has (i even, e = 0, c = i/2). For n ≥ 2 the same functions computed with redundant gates give AICs IPg[n] (i even, e = 3, c = i/2) and Tg[n] (i odd, e = 5, c = (i+1)/2), so the bounds of Theorem 2 (even i) and of Theorem 3 (odd i, e ≤ 5) are attained by AICs.
Proof. D(IP[2]) = 1 and D(x[n]) = 0; apply K2 repeatedly. The formulas use n − 1 gates, and n − 1 gates are needed to read n variables. For three redundant gates append two successive ORs of the old output with inputs, then AND the result with the old output. Absorption restores the old output. Four successive ORs followed by the same AND add five gates. The old output and each appended gate still have a path to the new output. ∎ The shipped exhaustive search gives D = 0, 1, 2 for T₁, T₃, T₅ and D = 1, 2, 3 for IP₂, IP₄, IP₆. The identities at larger lengths follow from the padding argument. For n = 1 use the single affine input directly.