Documentation

Complexity.Computability.Circuit.Boolean.SemiCircuit.Reparameterisation

Exchanging parameters #

Two changes of the parameters of a fair semi-circuit, the semi-circuit side of the reparameterisations (AR) and (QR) of Mishra and Santhanam, Section 3.2:

Main definitions #

Main results #

References #

Exchanging a parameter and an auxiliary variable #

Exchange the parameter x with the auxiliary variable Q. No equation or gate changes.

Instances For
    theorem Cslib.Circuits.Boolean.SemiCircuit.AffineIn.solve {C : SemiCircuit} {Q x : ℕ} {c : Bool} {T : Finset ℕ} (h : AffineIn Q c T) (hxT : x ∈ T) {val : ℕ → Bool} (hval : C.EqnsHold val) :
    val x = val Q + c + ∑ j ∈ T.erase x, val j

    On the solutions of the affine system, a parameter x on which Q = c + ∑ j ∈ T, u j depends is Q + c + ∑ j ∈ T \ {x}, u j.

    theorem Cslib.Circuits.Boolean.SemiCircuit.live_swap {C : SemiCircuit} {x Q : ℕ} (hx : x ∈ C.params) (hQ : Q ∈ C.aux) :
    (C.swap x Q).live = C.live
    theorem Cslib.Circuits.Boolean.SemiCircuit.WellFormed.swap {C : SemiCircuit} (hC : C.WellFormed) {x Q : ℕ} {c : Bool} {T : Finset ℕ} (hx : x ∈ C.params) (hQ : Q ∈ C.aux) (haff : AffineIn Q c T) (hxT : x ∈ T) :

    Exchanging a parameter x with an auxiliary variable depending on it preserves well-formedness.

    The quadratic reparameterisation #

    Turn the gate D into a parameter in place of z, and delete the gates G and D.

    Instances For
      theorem Cslib.Circuits.Boolean.SemiCircuit.mem_live_quad {C : SemiCircuit} {z G D i : ℕ} (hi : i ∈ C.live) (hiz : i ≠ z) (hiG : i ≠ G) :
      i ∈ (C.quad z G D).live
      structure Cslib.Circuits.Boolean.SemiCircuit.QuadOK (C : SemiCircuit) (x y z G D : ℕ) (α β γ c : Bool) :

      The configuration of the quadratic reparameterisation: an AND-type gate G = (x + α)(y + β) + γ on the distinct parameters x and y, whose only child is the XOR-type gate D = G + z + c, where D is the only child of the parameter z, and neither G nor z is the output.

      Instances For
        theorem Cslib.Circuits.Boolean.SemiCircuit.QuadOK.notMem_terms_z {C : SemiCircuit} {x y z G D : ℕ} {α β γ c : Bool} (h : C.QuadOK x y z G D α β γ c) {e : ℕ} (he : e ∈ C.eqns) :
        z ∉ (C.eqn e).terms
        theorem Cslib.Circuits.Boolean.SemiCircuit.QuadOK.not_reads_z {C : SemiCircuit} {x y z G D : ℕ} {α β γ c : Bool} (h : C.QuadOK x y z G D α β γ c) {K : ℕ} (hK : K ∈ C.gates) (hKD : K ≠ D) :
        ¬(C.gate K).Reads z
        theorem Cslib.Circuits.Boolean.SemiCircuit.QuadOK.not_reads_G {C : SemiCircuit} {x y z G D : ℕ} {α β γ c : Bool} (h : C.QuadOK x y z G D α β γ c) {K : ℕ} (hK : K ∈ C.gates) (hKD : K ≠ D) :
        ¬(C.gate K).Reads G
        theorem Cslib.Circuits.Boolean.SemiCircuit.WellFormed.quad {C : SemiCircuit} (hC : C.WellFormed) {x y z G D : ℕ} {α β γ c : Bool} (h : C.QuadOK x y z G D α β γ c) :
        (C.quad z G D).WellFormed

        The quadratic reparameterisation preserves well-formedness.

        def Cslib.Circuits.Boolean.SemiCircuit.quadValue (x y z G D : ℕ) (α β γ c : Bool) (val : ℕ → Bool) :
        ℕ → Bool

        The assignment of the original semi-circuit determined by an assignment of its quadratic reparameterisation: z = D + G + c and G takes its value.

        Instances For
          theorem Cslib.Circuits.Boolean.SemiCircuit.QuadOK.consistent {C : SemiCircuit} (hC : C.WellFormed) {x y z G D : ℕ} {α β γ c : Bool} (h : C.QuadOK x y z G D α β γ c) {val : ℕ → Bool} (hval : (C.quad z G D).Consistent val) :
          C.Consistent (quadValue x y z G D α β γ c val) ∧ (C.quad z G D).out.eval val = C.out.eval (quadValue x y z G D α β γ c val)

          A consistent assignment of the quadratic reparameterisation gives a consistent assignment of the original semi-circuit with the same output.