Documentation

CslibFrontier.Computability.Circuit.Boolean.SpectralNorm

Joint Fourier bounds for Boolean circuits #

If each primitive Boolean operation has Fourier spectral norm at most 2 ^ cost op, then every parity of the input and gate wires of a program has spectral norm at most 2 ^ program.cost cost. In particular this bounds each output of a circuit.

The induction keeps a bound on every character of the whole available wire vector. Expanding one new gate in its Fourier basis produces linear combinations of old characters. Their products are old characters as well, including when a gate reads a wire repeatedly. Consequently the proof charges each gate once and allows arbitrary sharing and fan-out; it does not unfold a circuit into a formula. The signature and finite gate arities are arbitrary.

The same joint invariant also controls denominators. If every primitive operation has Fourier coefficients in 2 ^ (-cost op) ℤ, every workspace character has coefficients in 2 ^ (-program.cost cost) ℤ. The norm and denominator bounds use the same character identities, but neither bound is inferred from the other.

Main results #

theorem Cslib.Circuits.Program.sum_abs_fourierCoeff_chi_trace_le_two_pow_cost {σ : Signature} {n g : ℕ} (p : Program σ n g) (I : Interpretation σ Bool) (cost : σ.Op → ℕ) (hgate : ∀ (op : σ.Op), ∑ S : Finset (Fin (σ.Arity op)), |BitString.fourierCoeff (fun (y : Fin (σ.Arity op) → Bool) => BitString.signVal (I op y)) S| ≤ 2 ^ cost op) (S : Finset (Wire n g)) :
∑ T : Finset (Fin n), |BitString.fourierCoeff (fun (x : Fin n → Bool) => BitString.chi ℝ S (p.trace I x)) T| ≤ 2 ^ p.cost cost

Every character of the available input and gate values has spectral norm at most the exponential of the total gate cost, provided each primitive operation satisfies its own spectral bound. This controls arbitrary sharing and repeated gate arguments.

theorem Cslib.Circuits.Circuit.sum_abs_fourierCoeff_signVal_eval_le_two_pow_cost {σ : Signature} {n m : ℕ} (c : Circuit σ n m) (I : Interpretation σ Bool) (cost : σ.Op → ℕ) (hgate : ∀ (op : σ.Op), ∑ S : Finset (Fin (σ.Arity op)), |BitString.fourierCoeff (fun (y : Fin (σ.Arity op) → Bool) => BitString.signVal (I op y)) S| ≤ 2 ^ cost op) (j : Fin m) :
∑ S : Finset (Fin n), |BitString.fourierCoeff (fun (x : Fin n → Bool) => BitString.signVal (c.eval I x j)) S| ≤ 2 ^ c.program.cost cost

The spectral norm of each circuit output is bounded by the exponential of the total gate cost whenever every primitive operation satisfies the corresponding spectral bound.

theorem Cslib.Circuits.Program.exists_fourierCoeff_chi_trace_eq_intCast_div_two_pow_cost {σ : Signature} {n g : ℕ} (p : Program σ n g) (I : Interpretation σ Bool) (cost : σ.Op → ℕ) (hgate : ∀ (op : σ.Op) (T : Finset (Fin (σ.Arity op))), ∃ (z : ℤ), BitString.fourierCoeff (fun (y : Fin (σ.Arity op) → Bool) => BitString.signVal (I op y)) T = ↑z / 2 ^ cost op) (S : Finset (Wire n g)) (T : Finset (Fin n)) :
∃ (z : ℤ), BitString.fourierCoeff (fun (x : Fin n → Bool) => BitString.chi ℝ S (p.trace I x)) T = ↑z / 2 ^ p.cost cost

Every workspace character has Fourier coefficients with denominator dividing two to the total gate cost, when each gate has that property at its own cost. Sharing and repeated gate arguments are unrestricted, and a gate's denominator cost is charged only once.

theorem Cslib.Circuits.Circuit.exists_fourierCoeff_signVal_eval_eq_intCast_div_two_pow_cost {σ : Signature} {n m : ℕ} (c : Circuit σ n m) (I : Interpretation σ Bool) (cost : σ.Op → ℕ) (hgate : ∀ (op : σ.Op) (T : Finset (Fin (σ.Arity op))), ∃ (z : ℤ), BitString.fourierCoeff (fun (y : Fin (σ.Arity op) → Bool) => BitString.signVal (I op y)) T = ↑z / 2 ^ cost op) (j : Fin m) (T : Finset (Fin n)) :
∃ (z : ℤ), BitString.fourierCoeff (fun (x : Fin n → Bool) => BitString.signVal (c.eval I x j)) T = ↑z / 2 ^ c.program.cost cost

The Fourier coefficients of each output have denominator dividing two to the total gate cost, provided the primitive gates satisfy the corresponding denominator bounds.