Documentation

CslibFrontier.Computability.Circuit.Boolean.ACC0.Gadgets

Small AC⁰[2] circuits #

Building blocks for circuits over Unbounded.extSignature read with MOD₂ gates, Unbounded.extInterpretation (modGate 2), the basis of AC⁰[2]:

The first two have depth at most one and the inner product depth at most two. Gates count towards the size; wires do not. Fixed bits, fed by Unbounded.substituteCircuit, are in CslibFrontier.Computability.Circuit.Boolean.AC0.

Main definitions #

Main results #

Parity of some inputs #

One MOD₂ gate on the inputs in s, listed in increasing order.

@[simp]

With MOD₂ gates, parityOnCircuit s computes the parity of the inputs in s.

Conjunction of two inputs #

One conjunction of the inputs i and j.

@[simp]
theorem Cslib.Circuits.Boolean.Unbounded.eval_andCircuit {n : ℕ} (g : (m : ℕ) → BooleanFunction m) (i j : Fin n) (x : BitString n) (o : Fin 1) :
(andCircuit i j).eval (extInterpretation g) x o = (x i && x j)

andCircuit i j computes the conjunction of the inputs i and j, whatever the extra gates compute.

@[simp]

andCircuit i j is one gate.

andCircuit i j has depth at most one.

Inner product over GF(2) #

On inputs (b, r) of k bits each, the conjunctions bᵢ ∧ rᵢ under one MOD₂ gate.

@[simp]

With MOD₂ gates, innerProductCircuit k computes the inner product over GF(2).