The next steps are the author’s extension of the internally reviewed argument. The six-input classification can be checked separately in the verification part.
L4. Index lemma [Handwritten intermediate result]. In a clean AIC let N(w), for a gate w, be the number of directed paths that start at a top gate, end at w and pass through gates only. So N = 1 for a top gate, N(w) = N(h) for a chain gate with gate in-node h, and N(w) = N(u) + N(v) for a join of u and v. Then the function computed at w is N(w)-affine. In particular c(K) ≤ N(out) + 1.
Proof. Induction along a topological order. A top gate g(ℓ[1], ℓ[2]) is 1-affine by L3(i) with h = ℓ[2]. A chain gate g(ℓ, h): h is N(h)-affine with N(h) ≥ 1, so the gate is N(h)-affine by L3(i). A join: L3(ii). The last claim is L3(0). ∎
L5. Circuits with e = 3 that resist the moves [Handwritten intermediate result]. Let K be clean with e(K) = 3 and suppose every top gate has two shared inputs. Let E[in] be the sum of (t[x] − 1) over the inputs and T the number of top gates.
- (a) Either E[in] = 3, every non-output gate has out-degree 1, T ≤ 3 and N(out) = T; or E[in] = 2, there are exactly two shared inputs x, y, both of out-degree 2, exactly one non-output gate W has out-degree 2, T ≤ 2 and N(out) ≤ 2T. In all cases N(out) ≤ 4.
- (b) If N(out) = 4, then K has shape S3: two top gates G, G′, both reading x and y; a chain A over G and a chain B over G′; a join J1 of the last gates of A and B; a chain C over J1 ending in W (W = J1 if C is empty); two chains D and E over W, not both empty; a join J2 of the last gates of D and E; a chain F over J2 ending in the output (the output is J2 if F is empty). Every chain gate reads the previous gate of its chain and a private input, and the six chain lengths sum to i − 2. ("The last gate" of an empty chain means its base gate.)
Proof. (a) By L1(1), E[in] + E[g] = 3, where E[g] is the sum of (t[w] − 1) over the non-output gates. A top gate exists and reads two different shared inputs, so the number q of shared inputs is ≥ 2 and E[in] ≥ q ≥ 2.
If E[in] = 3: E[g] = 0, so every non-output gate has out-degree exactly 1 and every gate has exactly one directed path to the output; hence N(out) = T. The top gates use 2T of the q + E[in] ≤ 6 wires that leave the shared inputs, so T ≤ 3.
If E[in] = 2: q = 2, t[x] = t[y] = 2, so 2T ≤ 4; and E[g] = 1: exactly one non-output gate W has out-degree 2, the others have out-degree 1. From any gate the path towards the output is forced except at W, where there are two continuations, and W is met at most once. So a top gate has 2 paths to the output if W is reachable from it and 1 otherwise: N(out) ≤ 2T ≤ 4.
(b) N(out) = 4 forces E[in] = 2, T = 2 and W reachable from both top gates. Both top gates read {x, y}; this uses all four wires of x and y, so all other inputs are private and every chain gate reads a private input. Counting wires (2T + C = i + E[in] for C chain gates, and T + C + J = s = i + 2 for J joins) gives C = i − 2 and J = 2.
Write π(g) for the forced path from a top gate g to W, and let J1 be the first node of π(G) that lies on π(G′). J1 is not a top gate and its predecessors on the two paths are two different gates, so J1 is a join; after J1 the two paths coincide.
Claim: every gate p on these paths other than G, G′, J1 is a chain gate. One in-node of p is its predecessor q on the path. Suppose the other in-node is a gate r. Some top gate lies below r, and r lies below W, so r is on π(G) or π(G′), and its only successor is the next node of that path; hence p is that next node. If r and q are on the same path, p has two predecessors on one forced path, which is impossible. Otherwise p lies on both paths with different predecessors, and J1 is the only such node. This proves the claim and gives the chains A, B (before J1) and C (from J1 to W).
W has two successors R, R′, two different gates. The forced paths from R and from R′ both end at the output; let J2 be the first node of the first path that lies on the second. Its two in-nodes are gates (its predecessors on the two paths, the predecessor of R or R′ being W), so J2 is a join, and it is not J1, which is W or precedes it; so it is the second and last join. Every other gate above W has a gate in-node and is not a join, so it is a chain gate: this gives the chains D, E (between W and J2) and F (above J2). Every gate lies above G or G′, hence on one of these paths. The chain gates read the i − 2 private inputs, one each. ∎
L6. Shape S3 is 3-affine [Handwritten intermediate result]. If K has shape S3, then f[K] is 3-affine; hence c(K) ≤ 4.
Proof. W is 2-affine by L4, since N(W) = N(J1) = 2. It is enough to show that J2 is 3-affine: the output is then 3-affine by L3(i) along the chain F. Write D and E for the last gates of chains D and E. Let B be a flat. Apply the chain dichotomy L3(iii) to the chain D over W on B: either D is affine on some B[1] inside B of codimension ≤ 1 (cut), or D = W + λ[D] on B (pass; put B[1] = B). Apply it to the chain E over W on B[1]: either E is affine on some B[2] inside B[1] of codimension ≤ 1 (cut), or E = W + λ[E] on B[1] (pass; B[2] = B[1]).
- Both cut. D and E are affine on B[2], of codimension ≤ 2 in B. If J2 is XOR-type it is affine on B[2]. If J2 = (D + a)(E + b) + c: if D is not constant on B[2], J2 is constant on B[2] ∩ {D = a}, of codimension ≤ 3; otherwise J2 is constant or equals E* + b + c on B[2].
- Exactly one cut. On B[2], of codimension ≤ 1 in B, one in-node of J2 equals an affine form m and the other equals W + λ. If J2 is XOR-type, J2 = m + W + λ + c, which is affine on a sub-flat of B[2] of codimension ≤ 2 on which W is affine: total ≤ 3. If J2 is AND-type, write it as (m + a)(W + λ + b) + c: if m is not constant on B[2], J2 is constant on B[2] ∩ {m = a} (total ≤ 2); if m = a on B[2], J2 is constant there; if m = a + 1 on B[2], J2 = W + λ + b + c on B[2], affine after ≤ 2 further constraints (total ≤ 3).
- Both pass. D = W + λ[D] and E = W + λ[E] on B. Choose B′ inside B of codimension ≤ 2 on which W is affine. Both in-nodes of J2 are affine on B′, so J2 is affine on B′ (XOR-type), or on B′ or on a hyperplane of B′ (AND-type, as in the first case): total ≤ 3. ∎
Theorem 2 (excess 3 behaves like excess 2) [Handwritten intermediate result]. If K is trivial, or clean with e(K) ≤ 3, then c(K) ≤ β(i): at most i/2 for even i and (i+1)/2 for odd i.
For odd i and for e ≤ 2 this is Theorem 1 and Proposition A. The stronger case is i even, e = 3, where κ(i,3) = i/2 + 1.
Finite dependency. When i = 6, the labels have rank six and N(out) ≥ 3, the uniform path budget alone can allow four constraints. K4 supplies three. Both the authors’ Table 2 and the fresh all-functions search give this step, without using the historical C4 wiring enumeration. Table 2 · Finite evidence
Proof. Induction on s. Trivial K: Fact T. i odd: Theorem 1, because κ(i,3) = (i+1)/2. e ≤ 2: Proposition A. Let i be even and e = 3; the target is i/2.
(0) If some input form is constant on A, fix it at no cost (L1(2)): K′ has at most i − 1 inputs and e′ ≤ 3, so c(K) = c(K′) ≤ β(i−1) = i/2. Assume now that no form is constant on A.
(1) Suppose some top gate G has a private input y; let x be its other input. If G is XOR-type, re-designate it (L1(4), σ ≥ 1): K′ is trivial, or clean with s′ = s − 1 and (i′, e′) = (i, 2) or (i − 1, 3), so c(K) = c(K′) ≤ β(i). If G is AND-type, fix ℓ[x] to the value that makes G constant: by L1(2) and L1(3)(i), K′ is trivial, or clean with s > s′ and e′ ≤ 3, and it has at most i − 2 inputs; so c(K) ≤ 1 + β(i−2) = i/2.
(2) Otherwise every top gate has two shared inputs. By L5, N(out) ≤ 4, and N(out) = 4 only for shape S3. By L4 and L6: c(K) ≤ N(out) + 1 when N(out) ≤ 3, and c(K) ≤ 4 in all cases.
- If i ≥ 8: c(K) ≤ 4 ≤ i/2.
- If i = 2 or 4: c(K) ≤ i/2 by fact E1.
- If i = 6: when N(out) ≤ 2, c(K) ≤ 3. When the six input forms have rank d ≤ 5 on A (notation of E1), c(K) ≤ r(d) ≤ 3 by E1. When they have rank 6, f[K] is the pull-back of a function on a 6-dimensional flat computed by the same circuit with independent labels; it is constant on a 3-flat by K4, so c(K) ≤ 3. ∎