Collapsing towers of modular polynomial layers into SYM ∘ AND #
A modular polynomial layer on a finite set T of slots (Circuits.Boolean.ModPolyLayer) has a
modulus p and assigns to each slot t an integer polynomial q t of the previous values; it
updates slot t to whether q t ≢ 0 (mod p) (ModPolyLayer.step). A list of layers is run from
the last to the first (ModPolyLayer.run). These are the stratified modular polynomial circuits
of Beigel and Tarui [BeigelTarui1994, Section 2.2], with every slot evaluated at every level.
Collapse. A SYM ∘ AND circuit on top of such a layer, with prime p, collapses into a
single SYM ∘ AND circuit (SymAnd.exists_eval_eq_eval_step). With M = p ^ k above the size of
the top circuit, the modulus-amplified bits h_t = 1 - p_k(q_t ^ (p - 1)) agree with the layer's
outputs modulo M (Polynomial.one_sub_parityAmplifier_eval_pow_modEq). Hence
∑_{S ∈ gates} ∏_{t ∈ S} h_t is a low-degree integer function congruent modulo M to the
number of satisfied gates, which is below M (SymAnd.amplifiedCount_modEq). The canonical
circuit of that function modulo M (SymAnd.ofLowDegree, with AND multiplicities its subset
Möbius coefficients) is the collapsed circuit (SymAnd.collapseStep), and its symmetric gate reads
its argument modulo M. This is the inductive step of [BeigelTarui1994, Lemma 2.8] with their
Fact 2.7 (Section 2.4).
Iterating over L layers whose primes, slot-polynomial degrees and log₂(|T| + 1) are at most
B, starting from a circuit of fan-in at most B and size at most 2 ^ B, gives a
SYM ∘ AND circuit of fan-in at most (2B) ^ (5 ^ L) and size at most 2 ^ ((2B) ^ (5 ^ L))
(SymAnd.collapseRun, SymAnd.exists_eval_eq_eval_run). Reading one slot of the tower is the
special case SymAnd.exists_eval_eq_run_apply. For a fixed number of layers and B
polylogarithmic, this is the quasi-polynomial size and polylogarithmic fan-in of
[BeigelTarui1994, Theorem 1.1].
The source states the collapse for one arbitrary modulus m per level, requiring each level
polynomial to be 0 or 1 modulo m. Here each level has a prime modulus, and Fermat's little
theorem normalizes arbitrary integer values, so no 0/1 promise is needed. Composite moduli
reduce to prime moduli through prime-power digits ([BeigelTarui1994, Lemma 2.1]). That reduction,
and the passage from ACC⁰ circuits (Circuits.Boolean.AC0Mod) to towers of these layers, are in
CslibFrontier.Computability.Circuit.Boolean.SymAnd.ACC0. The collapsed circuit reads all slots of
T; restricting the non-input slots to their initial value false and dropping the AND gates
that meet them (SymAnd.restrict) gives a circuit over the inputs alone.
Main definitions #
Cslib.Circuits.Boolean.ModPolyLayer: a layer of modular polynomial gates.Cslib.Circuits.Boolean.ModPolyLayer.step,ModPolyLayer.run.Cslib.Circuits.Boolean.SymAnd.collapseStep,SymAnd.collapseRun: the explicit collapse of one layer and of a tower.
Main results #
Cslib.Circuits.Boolean.SymAnd.eval_collapseStep,SymAnd.eval_collapseRun: what the explicit collapses compute, with their fan-in and size bounds.Cslib.Circuits.Boolean.SymAnd.exists_eval_eq_eval_step: one layer collapses into theSYM ∘ ANDcircuit above it.Cslib.Circuits.Boolean.SymAnd.exists_eval_eq_eval_run: a tower of layers collapses, with explicit fan-in and size bounds.Cslib.Circuits.Boolean.SymAnd.exists_eval_eq_run_apply: every slot of a tower is computed by aSYM ∘ ANDcircuit.
References #
A layer of modular polynomial gates on slots T: slot t becomes whether the integer
polynomial q t of the previous slot values is nonzero modulo p. Degrees and primality are
hypotheses of the theorems using a layer.
- p : ℕ
The modulus of the layer.
The integer polynomial read by each slot, as a function of the previous slot values.
One step: every slot t becomes whether q t v is nonzero modulo p.
Run a list of layers on v, from the last layer to the first.
Running L :: Ls applies L after Ls.
The modulus-amplified count of C after the layer L: the sum over the gates S of C of
∏_{t ∈ S} (1 - p_k(q_t ^ (p - 1))). Modulo p ^ k it is the number of gates of C satisfied
after L (SymAnd.amplifiedCount_modEq).
The amplified count has degree at most C.fanIn * (2k - 1)(p - 1)D when the slot polynomials
have degree at most D.
For a prime modulus, the amplified count is the number of gates of C satisfied after L,
modulo p ^ k [BeigelTarui1994, Fact 2.7].
One explicit collapse step [BeigelTarui1994, Lemma 2.8]: the canonical circuit
(SymAnd.ofLowDegree) of the amplified count amplifiedCount C L k modulo p ^ k, up to its
degree bound C.fanIn * (2k - 1)(p - 1)D, below the symmetric gate of C.
What the collapse step computes: C after L, when p is prime, the slot polynomials have
degree at most D and C.size < p ^ k.
The collapse step has fan-in at most C.fanIn * (2k - 1)(p - 1)D.
The collapse step has at most p ^ k * (|T| + 1) ^ F AND gates, where
F = C.fanIn * (2k - 1)(p - 1)D is its fan-in bound.
Collapsing one modular layer [BeigelTarui1994, Lemma 2.8]. Let C be a SYM ∘ AND
circuit on slots T and L a layer with prime modulus p whose slot polynomials have degree at
most D. If C.size < p ^ k, then some SYM ∘ AND circuit computes C after L, with fan-in at
most F = C.fanIn * (2k - 1)(p - 1)D and at most p ^ k * (|T| + 1) ^ F AND gates, where the
exponent F is this new fan-in bound. The circuit is SymAnd.collapseStep C L k D.
The explicit collapse of a tower: collapse the layers of Ls one at a time from the
outermost, with k = B + 1 and degree bound B at the first layer and 5 B ^ 5 in place of B
afterwards.
What the explicit tower collapse computes: under the hypotheses of
SymAnd.exists_eval_eq_eval_run, collapseRun C Ls B computes C after running Ls.
The explicit tower collapse has fan-in at most (2B) ^ (5 ^ L).
The explicit tower collapse has at most 2 ^ ((2B) ^ (5 ^ L)) AND gates.
Collapsing a tower of modular layers [BeigelTarui1994, Lemma 2.8]. Let every layer of
Ls have a prime modulus at most B and slot polynomials of degree at most B, with
|T| + 1 ≤ 2 ^ B. A SYM ∘ AND circuit of fan-in at most B and size at most 2 ^ B, applied
after running Ls, is computed by a single SYM ∘ AND circuit of fan-in at most
(2B) ^ (5 ^ L) and size at most 2 ^ ((2B) ^ (5 ^ L)), where L is the number of layers. The
circuit is SymAnd.collapseRun C Ls B.
Every slot of a tower is a SYM ∘ AND circuit. Under the hypotheses of
exists_eval_eq_eval_run, slot t after running Ls is computed by a SYM ∘ AND circuit of
fan-in at most (2B) ^ (5 ^ L) and size at most 2 ^ ((2B) ^ (5 ^ L)).