Documentation

CslibFrontier.Computability.Circuit.Boolean.SymAnd.Restrict

Restricting SYM ∘ AND circuits #

A SYM ∘ AND circuit on slots T is restricted along a partial map ρ : T → Option ι by reading slot t from input i when ρ t = some i and fixing it to false when ρ t = none (Circuits.Boolean.SymAnd.restrict). The AND gates reading a fixed slot are never satisfied, so they are dropped; the others read the inputs their slots are sent to. The restricted circuit computes the original one on the valuation t ↦ (ρ t).elim false x (SymAnd.eval_restrict), and has no more AND gates (SymAnd.size_restrict_le) and no larger fan-in (SymAnd.fanIn_restrict_le).

This turns a SYM ∘ AND circuit reading all the slots of a modular tower (SymAnd.exists_eval_eq_eval_run) into a circuit over the inputs alone, the other slots starting at false.

Main definitions #

Main results #

def Cslib.Circuits.Boolean.SymAnd.restrict {T : Type u_1} {ι : Type u_2} [DecidableEq ι] (C : SymAnd T) (ρ : T → Option ι) :

The restriction of C along ρ: slot t reads input i when ρ t = some i and is fixed to false when ρ t = none. AND gates reading a fixed slot are dropped.

theorem Cslib.Circuits.Boolean.SymAnd.eval_restrict {T : Type u_1} {ι : Type u_2} [DecidableEq ι] (C : SymAnd T) (ρ : T → Option ι) (x : ι → Bool) :
(C.restrict ρ).eval x = C.eval fun (t : T) => (ρ t).elim false x

What the restriction computes: C on the valuation reading slot t from x through ρ, and false where ρ is undefined.

theorem Cslib.Circuits.Boolean.SymAnd.size_restrict_le {T : Type u_1} {ι : Type u_2} [DecidableEq ι] (C : SymAnd T) (ρ : T → Option ι) :

Restriction does not increase the number of AND gates.

theorem Cslib.Circuits.Boolean.SymAnd.fanIn_restrict_le {T : Type u_1} {ι : Type u_2} [DecidableEq ι] (C : SymAnd T) (ρ : T → Option ι) :

Restriction does not increase the fan-in.