Generic state operations and validity transport for gate elimination #
Shared state operations, parameter-map transport, and validity-preservation lemmas shared by the
3.5n (AffineDisperser) and 4n (AffineDisperser4n) gate-elimination developments:
- validity transport (
State.Valid.of_phi,State.Valid.of_liftsTo,State.Valid.of_semiCircuit_liftsTo,State.Transport,State.Valid.of_transport); - restrictions (
State.restrict,State.fixConst) and pair creation (State.addPair,State.AddPairOK); - gate and equation deletions (
State.deleteGate,State.DeleteGateLocusOK,State.deleteEqn,State.dropEqn,State.dropTrivialEqn); - moving affine gates (
State.moveAffine), rewiring gates (State.rewire), and affine reparameterisation (State.swap,State.SwapOK).
Main results #
Cslib.Circuits.Boolean.AffineDisperserCore.State.Valid.of_transport,Cslib.Circuits.Boolean.AffineDisperserCore.State.Valid.of_liftsTo,Cslib.Circuits.Boolean.AffineDisperserCore.State.Valid.of_semiCircuit_liftsTo: validity transport.Cslib.Circuits.Boolean.AffineDisperserCore.State.Valid.restrict_of,Valid.deleteGate,Valid.deleteGate_of_ok,Valid.deleteEqn,Valid.dropEqn,Valid.dropTrivialEqn,Valid.moveAffine,Valid.rewire,Valid.swap_of,Valid.addPair_of: operation preservation.
Evaluating a literal ℓ along an affine family of assignments τ defines an affine Boolean
function.
Adding coordinate Q, constant c, and a sum over R of an affine family preserves
affinity.
Transporting validity #
A state with the parameters, pairs, parameter map, and admissibility of a valid state is valid
when its semi-circuit is well formed and computes f on admissible assignments.
A state with the parameters, pairs, and parameter map of a valid state is valid when its
semi-circuit is well formed and its consistent admissible assignments lift to S.
Validity from an unconditional SemiCircuit.LiftsTo.
The obligations for transporting validity from S to S' along a map σ from the
assignments of S' to those of S.
- pair_mem (pr : cfg.Pair) : pr ∈ S'.pairs → cfg.fst pr ∈ S'.params ∧ cfg.snd pr ∈ S'.params ∧ cfg.fst pr ≠ cfg.snd pr
New pairs consist of two distinct new parameters.
- pairs_disjoint (pr : cfg.Pair) : pr ∈ S'.pairs → ∀ pr' ∈ S'.pairs, pr ≠ pr' → cfg.fst pr ≠ cfg.fst pr' ∧ cfg.fst pr ≠ cfg.snd pr' ∧ cfg.snd pr ≠ cfg.fst pr' ∧ cfg.snd pr ≠ cfg.snd pr'
Distinct new pairs are disjoint.
The new parameter map factors through
σ.The new parameter map satisfies
cfg.phiOK.- congr (val val' : ℕ → Bool) : (∀ j ∈ S'.params, val j = val' j) → ∀ j ∈ S.params, σ val j = σ val' j
On
S.params,σdepends only onS'.params. On
S'.params,σis injective moduloS.params.σpreserves consistency.σpreserves locus admissibility.σpreserves output evaluation on consistent admissible assignments.
Validity transported along a map σ from the assignments of a new, well-formed state to
those of a valid state.
Restrictions (UF) and (PF) #
Restrict the parameter x to the literal ℓ, keeping the pairs P.
The children of z in S.restrict x ℓ P are its children after substituting x with ℓ.
Generic validity transport for S.restrict x ℓ P given phiOK and locus preservation.
Pair creation (PC) #
The hypotheses of pair creation (PC): both members are distinct unpaired parameters.
The first endpoint is an unpaired parameter.
The second endpoint is an unpaired parameter.
The two endpoints are distinct.
Generic validity preservation for pair creation (PC) given phiOK and locus weakening.
Deleting a gate (D1) and (D2) #
Delete the gate J, rerouting its uses to the literal ℓ.
Hypotheses for deleting gate J with replacement ℓ relative to S.Locus.
Deleting a gate preserves the parameters of the state.
Deleting a gate preserves the pairs of the state.
Deleting a gate preserves the parameter map phi.
Deleting gate J with replacement ℓ substitutes J with ℓ in every gate.
Deleting gate J with replacement ℓ substitutes J with ℓ in every equation.
Deleting gate J removes J from S.gates.
Deleting a gate decreases the size of the state by 1.
After deleting gate J with replacement ℓ, the children of z are contained in the
children of z after substituting J with ℓ with .inl J removed.
Deleting a gate removes it from the children of every parameter other than the target of
ℓ.
Deleting a gate preserves validity on admissible assignments.
Deleting a gate from an unconditional SemiCircuit.DeleteGateOK preserves validity.
Deleting and dropping equations (D3) and (D4) #
Delete the equation e, which reads v = ℓ, and the auxiliary variable v, rerouting v
to ℓ.
Deleting an equation decreases the size of the state by 1.
After deleting equation e and auxiliary variable v with replacement ℓ, the children of
z are contained in the children of z after substituting v with ℓ with .inr e removed.
Deleting an equation removes it from the children of every parameter other than the target of
ℓ.
Deleting an equation v = ℓ with its auxiliary variable preserves validity.
Dropping an equation with an auxiliary variable occurring only there preserves validity.
Dropping a trivial equation preserves the parameters of the state.
Dropping a trivial equation preserves the pairs of the state.
Deleting an equation without terms preserves validity.
Moving and rewiring gates #
Moving an affine gate into the affine system preserves the parameters of the state.
Moving an affine gate into the affine system preserves the pairs of the state.
Moving an affine gate reading no gates into the affine system preserves validity.
Replace the gate J by the gate g.
A gate K is a child of z in S.rewire J g iff K ∈ S.gates and the gate at K (which
is g when K = J) reads z.
Rewiring a gate preserves the equation children of every variable.
Rewiring a gate preserves validity.
Affine reparameterisation (AR) #
The hypotheses of the affine reparameterisation (AR).
xis a parameter ofS.xis not paired.Qis an auxiliary variable ofS.- affine : SemiCircuit.AffineIn Q c T
Qhas affine representationc + ∑ j ∈ T, val j. - mem_T : x ∈ T
xoccurs inT.
Generic validity preservation for (AR) given cfg.phiOK on (S.swap x Q c T).phi.
Potential comparison helper for (AR): if replacing x by Q increases weight on Q by at
most gainQ and lossX ≤ S.wt x, then (S.swap x Q c T).W + lossX ≤ S.W + gainQ.