TCSLib

127 Boolean Analysis — Circuit Degree

127.1 Overview

This file carries out the Razborov–Smolensky polynomial approximation of an \(\mathrm{AC}^0[p]\) circuit: layer by layer, every gate of a feed-forward circuit is replaced by a random low-degree polynomial over \(\mathbb {Z}/p\), and the layerwise error probabilities are combined by a union bound. The end products are existence theorems producing a seed-indexed distribution (or an explicit list) of polynomials of total degree at most \(((p-1)\ell )^{\mathrm{depth}}\) that agree with the circuit at any fixed input except on a small fraction of seeds.

127.2 Declarations

Definition 127.1 Boolean input cast to the prime field
#

For a Boolean input \(x : \mathrm{Fin}\, n \to \mathrm{Fin}\, 2\), the map \(\mathrm{boolInput}_p(x)\) sends each coordinate \(i\) to the image of the natural number \(x_i\) in \(\mathbb {Z}/p\).

Definition 127.2 Field value of a bit
#

The value in \(\mathbb {Z}/p\) represented by a bit \(b : \mathrm{Fin}\, 2\), namely the image of the natural number \(b\) under the canonical map \(\mathbb {N}\to \mathbb {Z}/p\).

Lemma 127.3 Bit values are \(0\) or \(1\)
#

For every bit \(b : \mathrm{Fin}\, 2\) the element \(\mathrm{boolVal}_p(b)\) lies in the subset \(\{ 0,1\} \) of \(\mathbb {Z}/p\).

Lemma 127.4 Bitification inverts boolVal
#

Applying \(\mathrm{bitify}_p\) to \(\mathrm{boolVal}_p(b)\) returns the original bit \(b\), for every \(b : \mathrm{Fin}\, 2\).

Lemma 127.5 One-step unfolding of node evaluation
#

For a feed-forward circuit \(F\), a layer index \(d\), a node \(u\) at layer \(d+1\) and an input \(x\), the value of \(u\) is obtained by applying the gate operation attached to \(u\) to the values of its input nodes at layer \(d\).

Definition 127.6 Degree target after \(d\) layers
#

The degree budget for the approximating polynomials after \(d\) layers, defined as

\[ \mathrm{circuitDegreeBound}(p,\ell ,d) = \bigl((p-1)\ell \bigr)^{d}. \]
Definition 127.7 Gate count in the first \(d\) layers
#

For a circuit \(F\) with finite node sets, \(\mathrm{gateCountBefore}\, F\, d\) counts the non-input gates in layers \(1,\dots ,d\): it is \(0\) for \(d = 0\) and, recursively, the count for \(d\) plus the number of nodes at layer \(d+1\).

Lemma 127.8 Gate count at layer zero

\(\mathrm{gateCountBefore}\, F\, 0 = 0\): the input layer contributes no gates.

Lemma 127.9 Gate count recursion

\(\mathrm{gateCountBefore}\, F\, (d+1)\) equals \(\mathrm{gateCountBefore}\, F\, d\) plus the cardinality of the node set at layer \(d+1\).

Lemma 127.10 Cardinality of a product filtered on the left factor
#

For finite types \(\alpha ,\beta \) and a decidable predicate \(P\) on \(\alpha \), the number of pairs \(z \in \alpha \times \beta \) with \(P(z_1)\) equals \(\left\lvert \{ a : P(a)\} \right\rvert \cdot \left\lvert \beta \right\rvert \).

Lemma 127.11 Fiberwise product counting
#

Let \(P\) be a predicate on \(\alpha \), \(Q\) a predicate on \(\alpha \times \beta \), and \(C, B\) natural numbers such that for every \(a\) with \(P(a)\) the fiber count satisfies \(\left\lvert \{ b : Q(a,b)\} \right\rvert \cdot C \le B\). Then

\[ \left\lvert \{ z \in \alpha \times \beta : P(z_1) \wedge Q(z_1,z_2)\} \right\rvert \cdot C \; \le \; \left\lvert \{ a : P(a)\} \right\rvert \cdot B . \]
Definition 127.12 Splitting off one coordinate of a dependent product
#

For an index \(i\) with decidable equality on the index type, the equivalence

\[ \bigl((j : \iota ) \to \beta _j\bigr) \; \simeq \; \beta _i \times \bigl((j : \{ j : j \ne i\} ) \to \beta _j\bigr) \]

sending a dependent function to its value at \(i\) together with its restriction to the remaining coordinates.

Lemma 127.13 Counting functions bad at one coordinate
#

Fix a coordinate \(i\) and a decidable predicate \(\mathrm{Bad}\) on \(\beta _i\), and suppose \(\left\lvert \{ b : \mathrm{Bad}(b)\} \right\rvert \cdot C \le \left\lvert \beta _i\right\rvert \). Then the number of dependent functions \(f\) with \(\mathrm{Bad}(f_i)\) satisfies

\[ \left\lvert \{ f : \mathrm{Bad}(f_i)\} \right\rvert \cdot C \; \le \; \left\lvert (j : \iota ) \to \beta _j\right\rvert . \]
Lemma 127.14 Union bound over coordinates of a dependent product
#

Given for each coordinate \(i\) a decidable predicate \(\mathrm{Bad}_i\) on \(\beta _i\) with \(\left\lvert \{ b : \mathrm{Bad}_i(b)\} \right\rvert \cdot C \le \left\lvert \beta _i\right\rvert \), the number of dependent functions bad at some coordinate obeys

\[ \left\lvert \{ f : \exists i,\ \mathrm{Bad}_i(f_i)\} \right\rvert \cdot C \; \le \; \left\lvert \iota \right\rvert \cdot \left\lvert (i : \iota ) \to \beta _i\right\rvert . \]
Lemma 127.15 Filtering commutes with mapping, on lengths
#

For a list \(l\), a map \(f\) and a decidable predicate \(P\), the length of the filter of \(l.\mathrm{map}\, f\) by \(P\) equals the length of the filter of \(l\) by the pulled-back predicate \(a \mapsto P(f(a))\).

Lemma 127.16 Finset list preserves filtered cardinality
#

For a finset \(s\) and a decidable predicate \(q\), the length of the filtered list \(s.\mathrm{toList}\) by \(q\) equals the cardinality of the filtered finset \(s\) by \(q\).

Definition 127.17 Gate approximator family
#

A GatePolyFamily for a gate operation \(\mathrm{op}\) packages a nonempty finite seed type together with, for each tuple of incoming polynomials and each seed, an approximating polynomial in \(n\) variables over \(\mathbb {Z}/p\) subject to two guarantees: its total degree is at most \((p-1)\ell \cdot \sup _i \deg (\text{polys}_i)\), and for every Boolean input \(x\) at which all incoming polynomials evaluate into \(\{ 0,1\} \), the number of seeds on which the approximator disagrees with the true gate value, multiplied by \(2^{\ell }\), is at most the number of seeds. Crucially the seed type depends only on the gate, not on the incoming polynomials.

For every \(n\), every error parameter \(\ell \), and every gate operation \(\mathrm{op}\) belonging to the \(\mathrm{AC}^0[p]\) gate set, there exists a GatePolyFamily \(p\, n\, \ell \, \mathrm{op}\).

Definition 127.19 Chosen gate approximator family

A choice of GatePolyFamily for each \(\mathrm{AC}^0[p]\) gate operation, obtained from the preceding existence statement.

Definition 127.20 Layer polynomial family

A LayerPolyFamily for a circuit \(F\) at layer \(d\) consists of a nonempty finite seed type and, for each seed, a polynomial for every node of layer \(d\), such that each polynomial has total degree at most \(\mathrm{circuitDegreeBound}(p,\ell ,d)\) and, for every Boolean input \(x\), the number of seeds for which some layer-\(d\) node is mispredicted, multiplied by \(2^{\ell }\), is at most \(\mathrm{gateCountBefore}\, F\, d\) times the number of seeds.

Definition 127.21 Input layer family

The LayerPolyFamily at layer \(0\): a single seed, with each input node represented exactly by the corresponding variable \(X_i\), so that no seed is ever bad.

Given a circuit \(F\) using only \(\mathrm{AC}^0[p]\) gates and a LayerPolyFamily at layer \(d\), this produces a LayerPolyFamily at layer \(d+1\). Its seed type is the product of the previous seed type with one gate seed per node of layer \(d+1\), and each node polynomial is the gate approximator applied to the layer-\(d\) polynomials of its inputs.

Definition 127.23 Layer family built by recursion on depth

For a circuit using only \(\mathrm{AC}^0[p]\) gates, the LayerPolyFamily at any layer \(d \le F.\mathrm{depth}\), obtained by starting from the input layer family and iterating the layer step \(d\) times.

Let \(F\) be a feed-forward circuit over \(\mathrm{Fin}\, 2\) with finite node sets, finite output type \(\mathrm{out}\), using only \(\mathrm{AC}^0[p]\) gates, and let \(\ell \) be an error parameter. Then there is a nonempty finite seed type and a family \(P\) of polynomials \(P(s,o)\) over \(\mathbb {Z}/p\) such that every \(P(s,o)\) has total degree at most \(\mathrm{circuitDegreeBound}(p,\ell ,F.\mathrm{depth})\) and, for each Boolean input \(x\),

\[ \left\lvert \{ s : \exists o,\ P(s,o)(\mathrm{boolInput}_p\, x) \ne F.\mathrm{eval}\, x\, o\} \right\rvert \cdot 2^{\ell } \; \le \; \mathrm{gateCountBefore}\, F\, F.\mathrm{depth} \cdot \left\lvert \mathrm{Seed}\right\rvert . \]

The same statement for a circuit with a unique output node: there is a nonempty finite seed type and polynomials \(P(s)\) of total degree at most \(\mathrm{circuitDegreeBound}(p,\ell ,F.\mathrm{depth})\) such that for every Boolean input \(x\),

\[ \left\lvert \{ s : P(s)(\mathrm{boolInput}_p\, x) \ne F.\mathrm{eval}_1\, x\} \right\rvert \cdot 2^{\ell } \; \le \; \mathrm{gateCountBefore}\, F\, F.\mathrm{depth} \cdot \left\lvert \mathrm{Seed}\right\rvert . \]

The single-output theorem restated with the seed distribution presented as a nonempty list \(Ps\) of polynomials with multiplicity, one entry per seed: every \(P \in Ps\) has total degree at most \(\mathrm{circuitDegreeBound}(p,\ell ,F.\mathrm{depth})\), and for every Boolean input \(x\) the number of entries of \(Ps\) disagreeing with \(F.\mathrm{eval}_1\, x\), multiplied by \(2^{\ell }\), is at most \(\mathrm{gateCountBefore}\, F\, F.\mathrm{depth} \cdot \left\lvert Ps\right\rvert \).