Packed steps of the 4n - 9d refuter #
Steps of the refuter applyStep (Cslib.Circuits.Boolean.AffineDisperser4n) on the packed state
PackedState, built from the packed primitive operations of PackedOps, and proved to represent
the state step (Rep). This is the pure layer of the step programs of issue #4322
(Milestone 4); no program and no running time is claimed here.
The searches of a step read only words. A least name with a property is the ascending scan of
List.range N (find?_range_eq_min').
- Literal of a degenerate gate.
rowLitcomputes the codes ofGate.litfrom a gate row (rowLit_rowOf). - Deleting a constraint.
pDeleteConstraintdeletes a gate through its literal, and an equation through its least auxiliary term and least other term, read off the equation word and the auxiliary mask (Rep.pDeleteConstraint). - Fresh equation name.
pFreshEqnscans the alive flags (Rep.pFreshEqn_eq). - Readers.
rowReadsis the test on a gate row for reading a name (rowReads_rowOf);pFindReaderscans the gate rows with it for the least other gate reading a gate (Rep.pFindReader_eq). - Pairs and children.
pFindPairtests the candidate pairspairCandidatesoffindPairon the pair records (Rep.pFindPair_eq);pGetChildrenscans the gate rows withrowReads, then the equation words (Rep.pGetChildren_eq, and the degreeRep.length_pGetChildren). - Case 2.
pDegeneratePair(Rep.applyStep_degeneratePair); deleting a constraint keeps the other constraints and boundedness (elim_mem_deleteConstraint,Bounded.deleteConstraint), so a step can delete two in a row. - Pair creation.
pPairCreation(Rep.applyStep_pairCreation). - Steps.
(D1),(D2),(D3)and moving an affine gate (Rep.applyStep_deleteConstantGate,Rep.applyStep_deleteDeadGate,Rep.applyStep_deleteShortEqn,Rep.applyStep_moveAffine).
Main definitions #
Cslib.Algorithms.WordRAM.Refuter4n.rowLit: the literal codes of a degenerate gate row.Cslib.Algorithms.WordRAM.Refuter4n.rowReads: the test on a gate row for reading a name.Cslib.Algorithms.WordRAM.Refuter4n.pDeleteEqn,pDeleteConstraint:State.deleteConstraintof an equation, and of a gate or an equation, on the packed state.Cslib.Algorithms.WordRAM.Refuter4n.pFreshEqn:State.freshEqnon the packed state.Cslib.Algorithms.WordRAM.Refuter4n.pFindReader,pPairCreation: the reader search and pair creation on the packed state.Cslib.Algorithms.WordRAM.Refuter4n.pFindPair,pGetChildren:findPairandgetChildrenon the packed state.Cslib.Algorithms.WordRAM.Refuter4n.pDegeneratePair: Case 2 on the packed state.
Main results #
Cslib.Algorithms.WordRAM.Refuter4n.find?_range_eq_min': the ascending scan finds the least element.Cslib.Algorithms.WordRAM.Refuter4n.rowLit_rowOf:rowLitisGate.lit.Cslib.Algorithms.WordRAM.Refuter4n.rowReads_rowOf:rowReadsisGate.Reads.Cslib.Algorithms.WordRAM.Refuter4n.Rep.pDeleteConstraint: the packed deletion representsState.deleteConstraintof a gate or an equation of a bounded state.Cslib.Algorithms.WordRAM.Refuter4n.Rep.testBit_gates,Rep.testBit_aux,Rep.testBit_params,Rep.testBit_alive: the mask bits and the alive flags of a represented state are membership.Cslib.Algorithms.WordRAM.Refuter4n.Rep.pFreshEqn_eq: the packed fresh name isfreshEqn.Cslib.Algorithms.WordRAM.Refuter4n.Rep.pFindReader_eq,Rep.applyStep_pairCreation: the reader search and pair creation.Cslib.Algorithms.WordRAM.Refuter4n.elim_mem_deleteConstraint,Bounded.deleteConstraint: deleting a constraint keeps the others and boundedness.Cslib.Algorithms.WordRAM.Refuter4n.forall_reads_const,forall_reads_node: the names read by a constant literal (none) and by a node literal (its node).Cslib.Algorithms.WordRAM.Refuter4n.Bounded.fixConst,Rep.deleteGate_const: fixing a parameter keeps boundedness, and deleting a gate as a constant.Cslib.Algorithms.WordRAM.Refuter4n.elim_mem_of_mem_children,Rep.partner_lt: children are constraints, and partners in a valid represented state are belowN.Cslib.Algorithms.WordRAM.Refuter4n.Rep.applyStep_degeneratePair: Case 2.Cslib.Algorithms.WordRAM.Refuter4n.Rep.mem_pairs_iff,Rep.pFindPair_eq,Rep.pGetChildren_eq,Rep.length_pGetChildren: pair records,findPair,getChildrenand degrees.Cslib.Algorithms.WordRAM.Refuter4n.Rep.applyStep_deleteConstantGate,Rep.applyStep_deleteDeadGate,Rep.applyStep_deleteShortEqn,Rep.applyStep_moveAffine: the packed(D1),(D2),(D3)and moving steps representapplyStep.
Least names #
The ascending scan of List.range N finds the least element of a nonempty set of names
below N.
The literal of a degenerate gate row #
Gate rows reading a name #
The gate row reads the name G: one of its two argument codes is the node code G + 2.
rowReads on the row of a gate is Gate.Reads.
Deleting a constraint #
State.deleteConstraint of the equation e on the packed state: delete e through its least
auxiliary term v and its least other term (the constant right-hand side of e if there is
none), or drop e if it has no auxiliary term.
State.deleteConstraint on the packed state.
Gates reading a gate #
The least gate other than G reading G, scanned on the gate mask and the gate rows
(rowReads).
Pair creation #
Case 5b, pair creation on the gate G (applyStep of .pairCreation G): add the pair of
its two arguments with the biases making the gate constant, delete G as that constant, and
delete the least other gate reading G. If an argument of G is a constant or no other gate
reads G, the state is unchanged, as in applyStep.
Pairs and children #
findPair on the packed state: the candidate pairs pairCandidates of findPair, a pair
being present when its record is in the pair list.
getChildren on the packed state: the gates whose row reads p (rowReads), then the alive
equations whose word has bit p, in increasing order.
Constraints after a deletion #
A constant literal reads nothing.
Fixing a parameter preserves boundedness.
Deleting a gate below N as the constant c.
A child of a name is a constraint of the state: a gate or an equation.
Deleting one constraint keeps every other constraint.
Case 2 #
Case 2, a paired parameter p of degree 0 or at least 2 (applyStep of
.degeneratePair p): fix the partner of p if p is unused, and otherwise fix p to its bias
and delete its first two children.
The fresh equation name #
State.freshEqn on the packed state: one more than the largest alive equation name below
E, or 0.
Bit i of the gate mask is membership of i in the gates.
Bit i of the auxiliary mask is membership of i in the auxiliary variables.
Bit i of the parameter mask is membership of i in the parameters.
The alive flag of the equation word e is membership of e in the equations, at every e
(also beyond the table).
The packed reader search is the reader search findReader of applyStep.
The packed fresh equation name is State.freshEqn.
Deleting a constraint. On a bounded represented state, pDeleteConstraint represents
State.deleteConstraint of a gate or of an equation of a bounded state.
Steps #
(D1). Deleting the degenerate gate J of a bounded represented state.
(D2). Deleting the dead gate J of a bounded represented state.
Moving an affine gate. Moving the gate J of a represented state into the affine system
under the fresh equation name, when that name is below E.
(D3). Deleting the equation e of a bounded represented state.
A pair record is in the pair list iff its pair is a pair of the state.
The packed pair search is findPair.
The packed children of a name below N are getChildren.
The packed degree of a name below N is its degree.
In a valid represented state, the partner of any name in a pair is below N.
Case 2. On a valid represented state, for a name p below N, the packed Case 2
represents applyStep of .degeneratePair p.
Pair creation. On a bounded represented state, for a gate G whose first argument is
the first member of no pair, the packed pair creation represents applyStep of
.pairCreation G.