Documentation

CslibFrontier.Computability.Circuit.Boolean.AffineDisperser.MinimalAnd

Restructuring to a minimal AND #

Section 4.2 of Mishra and Santhanam. In a normal state with d < a (State.Normal), the minimal gate is an AND-type gate G on two distinct inputs among the parameters and auxiliary variables (State.Valid.exists_minGate).

Restructuring (Section 4.2) uses preparatory operations (State.Preparation), which keep m, s and q and do not increase W. An auxiliary input of G is exchanged with a parameter it depends on by the affine reparameterisation (State.Valid.exists_preparation_auxIn_lt), and a child of G reading an input of G is relabelled to read both inputs instead (State.Valid.exists_preparation_childIn_lt). Afterwards G is a minimal AND (State.MinimalAnd, State.Valid.exists_minimalAnd): it reads two unpaired parameters x and y with 2 ≤ deg y ≤ deg x, no child of G reads them, and G is not the output and has a child.

Elimination of the minimal AND (Section 4.3, State.Valid.step_of_minimalAnd) is in CslibFrontier/Computability/Circuit/Boolean/AffineDisperser/Elimination.lean.

Main definitions #

Main results #

References #

Exchanging a parameter and an auxiliary variable #

Rewiring a gate #

Degenerate minimal gates allow deletions #

The minimal gate of a normal state #

theorem Cslib.Circuits.Boolean.AffineDisperser.State.Valid.exists_minGate {n : ℕ} {f : BooleanFunction n} {S : State n} {d : ℕ} (hS : AffineDisperserCore.State.Valid S f) (hf : BitString.IsAffineDisperser f d) (ha : d < AffineDisperserCore.State.a S) (hmov : ∀ (J : ℕ), ¬S.Movable J) (hdel : ¬S.DeletionAvailable) :
∃ (h : S.gates.Nonempty), ¬SemiCircuit.IsAffineOp (S.gate (S.gates.min' h)).op ∧ ∃ (t₁ : ℕ) (t₂ : ℕ), (S.gate (S.gates.min' h)).left = SemiCircuit.Arg.node t₁ ∧ (S.gate (S.gates.min' h)).right = SemiCircuit.Arg.node t₂ ∧ t₁ ≠ t₂ ∧ t₁ ∈ S.params ∪ S.aux ∧ t₂ ∈ S.params ∪ S.aux

In a valid state with d < a where no affine gate can be moved and no deletion applies, there are gates, and the minimal one is an AND-type gate reading two distinct inputs among the parameters and auxiliary variables.

The measures of the restructuring #

The number of auxiliary inputs of a gate.

The number of auxiliary inputs of the minimal gate.

The number of children of the minimal gate reading one of its parameter inputs.

Restructuring the minimal AND #

Exchanging an auxiliary input of the minimal gate of a normal state with a parameter it depends on is a preparatory operation lowering the number of auxiliary inputs of the minimal gate.

theorem Cslib.Circuits.Boolean.AffineDisperser.State.Valid.exists_preparation_childIn_lt {n : ℕ} {f : BooleanFunction n} {S : State n} (hS : AffineDisperserCore.State.Valid S f) (hne : S.gates.Nonempty) {t₁ t₂ : ℕ} (hl : (S.gate (S.gates.min' hne)).left = SemiCircuit.Arg.node t₁) (hr : (S.gate (S.gates.min' hne)).right = SemiCircuit.Arg.node t₂) (ht12 : t₁ ≠ t₂) (hx : t₁ ∈ S.params) (hy : t₂ ∈ S.params) (hxdeg : 2 ≤ S.deg t₁) (hydeg : 2 ≤ S.deg t₂) {K : ℕ} (hK : K ∈ S.gates) (hKG : (S.gate K).Reads (S.gates.min' hne)) (hKt : (S.gate K).Reads t₁ ∨ (S.gate K).Reads t₂) :
∃ (S₁ : State n), AffineDisperserCore.State.Preparation f S S₁ ∧ S₁.gates = S.gates ∧ S₁.auxIn = S.auxIn ∧ S₁.childIn < S.childIn

Rerouting a child K of the minimal gate that reads one of its parameter inputs, by relabelling K with the operation it computes on the two inputs, is a preparatory operation lowering the number of such children.

Eliminating the minimal AND #

The configuration of Section 4.3: G is an AND-type gate reading the distinct unpaired parameters x and y with 2 ≤ deg y ≤ deg x, no child of G reads x or y, and G is not the output and has a child.

The first input x of a minimal AND is a parameter of S.

The second input y of a minimal AND is a parameter of S.

The minimal AND gate G is a child of its first input x.

The minimal AND gate G is a child of its second input y.

theorem Cslib.Circuits.Boolean.AffineDisperser.State.MinimalAnd.exists_op {n : ℕ} {S : State n} {G x y : ℕ} (h : S.MinimalAnd G x y) :
∃ (φ : Bool → Bool → Bool), ¬SemiCircuit.IsAffineOp φ ∧ ∀ (val : ℕ → Bool), (S.gate G).eval val = φ (val x) (val y)

The minimal AND computes an AND-type operation of its inputs.

theorem Cslib.Circuits.Boolean.AffineDisperser.State.MinimalAnd.ne_gate {n : ℕ} {f : BooleanFunction n} {S : State n} {G x y : ℕ} (hS : AffineDisperserCore.State.Valid S f) (h : S.MinimalAnd G x y) {u : ℕ} (hu : u ∈ S.params) :
u ≠ G

No parameter of a valid state is equal to its minimal AND gate G.

theorem Cslib.Circuits.Boolean.AffineDisperser.State.MinimalAnd.eq_inl_of_mem_children {n : ℕ} {f : BooleanFunction n} {S : State n} {G x y : ℕ} (hS : AffineDisperserCore.State.Valid S f) (h : S.MinimalAnd G x y) {N : ℕ ⊕ ℕ} (hN : N ∈ S.children G) :
∃ K ∈ S.gates, N = Sum.inl K ∧ (S.gate K).Reads G

The children of G are gates.

theorem Cslib.Circuits.Boolean.AffineDisperser.State.Valid.exists_minimalAnd {n : ℕ} {f : BooleanFunction n} {S : State n} {d : ℕ} (hS : AffineDisperserCore.State.Valid S f) (hf : BitString.IsAffineDisperser f d) (ha : d < AffineDisperserCore.State.a S) (hN : S.Normal) {G t₁ t₂ : ℕ} (hG : G ∈ S.gates) (hand : ¬SemiCircuit.IsAffineOp (S.gate G).op) (hl : (S.gate G).left = SemiCircuit.Arg.node t₁) (hr : (S.gate G).right = SemiCircuit.Arg.node t₂) (ht12 : t₁ ≠ t₂) (hx : t₁ ∈ S.params) (hy : t₂ ∈ S.params) (hch : ∀ K ∈ S.gates, (S.gate K).Reads G → ¬(S.gate K).Reads t₁ ∧ ¬(S.gate K).Reads t₂) :
∃ (x : ℕ) (y : ℕ), S.MinimalAnd G x y

In a normal state with d < a, an AND-type gate G reading two parameters, no child of which reads them, is a minimal AND in the sense of Section 4.3, its inputs ordered by degree: by Lemma 2.3, G is not the output, and it has a child since no deletion applies.