Documentation

CslibFrontier.Algorithms.WordRAM.Refuter4n.PackedAffineRep

Packed affine representations and the steps that use them #

The affine-representation oracle findAffineRep of the 4n - 9d refuter (Cslib.Circuits.Boolean.AffineDisperser4n) on the packed state PackedState, and the two steps that call it: (D4) (unitDelete) and the swap of an auxiliary argument of the minimal gate (applyStep of .swapAuxIn). This is part of the pure layer of the step programs of issue #4322 (Milestone 4); no program and no running time is claimed here.

evaluateAux S a val decides a dense XORSAT system of width varBound S. The packed pEvaluateAux decides the same equations at width N instead, on packed rows only: the alive equation words below their alive flag (eqnWord_mod), the unit rows unitWord of the parameters and of a, eliminated by the packed columns XORSATDense.cols. Every name of a represented state is below N, so the extra columns are zero and the answer is the same (Rep.pEvaluateAux_eq).

Main definitions #

Main results #

Packed rows of the oracle #

The packed row of x_p = b at width N: bit p, and the right-hand side b at bit N.

The packed row of the equation word e, if it is alive: the word below its alive flag.

The packed row x_p = val p of the name p, if it is a parameter.

The packed rows of the system queried by evaluateAux S a val, at width N: the alive equation words below their alive flag (eqnAuxRow), the rows x_p = val p of the parameters (paramAuxRow), and x_a = 0.

evaluateAux on the packed state: false exactly when the packed elimination (XORSATDense.cols) of auxWords leaves no row 0 = 1.

findAffineRep on the packed state: the constant, and the mask of the parameters y whose unit assignment changes the value.

Correctness of the oracle #

The packed oracle. On a bounded well-formed represented state, pEvaluateAux is evaluateAux at every auxiliary variable and every parameter assignment.

The packed affine representation. On a bounded well-formed represented state, pFindAffineRep is findAffineRep at every auxiliary variable, with the representation set as its mask.

Unit deletion #

The substitution word of the affine reparameterisation of x by Q = c + ∑ T, from the constant c and the mask of T: for T and Q below N, the packed row of c + ∑ (T \ {x}) Δ {Q} (swapWord_eq).

On a constant c and the mask of a set T of names below N, and for Q below N, swapWord is the packed dense row with terms (T \ {x}) ∆ {Q} and right-hand side c (the word that Rep.swap takes).

unitDelete on the packed state: swap x with the least auxiliary variable whose packed representation mask has bit x, then drop the equation e and x.

theorem Cslib.Algorithms.WordRAM.Refuter4n.Rep.unitDelete {n N E : ℕ} {P : PackedState} {S : Circuits.Boolean.AffineDisperser4n.State n} (h : Rep N E P S) (hB : Bounded N S) (hwf : S.WellFormed) {x : ℕ} (hx : x < N) (e : ℕ) :

Unit deletion. On a bounded well-formed represented state, for x below N, the packed unit deletion represents unitDelete.

(D4). The packed unit deletion of x below N represents applyStep of .deleteUnitParam x e.

Swapping an auxiliary argument of the minimal gate #

auxArgs on a gate row: an auxiliary argument with the other argument, read off the argument codes and the auxiliary mask.

State.Paired on the packed state: some pair record names y, that is, does not avoid it (pairAvoids).

The .swapAuxIn G step on the packed state, with (c, T) the packed representation of the auxiliary argument a of G and b its other argument: if T ⊆ {b}, delete G as its literal after substituting the representation of a; otherwise swap a with the least unpaired parameter of T other than b, if there is one.

Swapping an auxiliary argument. On a valid represented state, for a gate G of the state, the packed .swapAuxIn step represents applyStep of .swapAuxIn G.