The tableau formula on bit-field labels #
The Tseitin formula (CslibFrontier/Computability/Circuit/Boolean/Tseitin.lean) of the uniform
tableau circuit of a multi-tape machine
(CslibFrontier/Computability/Circuit/Boolean/Tableau/Basic.lean), written with variables that are
labels made of fixed-width binary fields rather than wire numbers. Each clause is computed from
its number by bit-field arithmetic (Cslib.Circuits.Boolean.Tableau.clauseAt), with no
multiplication by the block size, so that a circuit of size linear in the field widths can decode
it. This is the succinct tableau formula of the sketch of
Williams, Theorem 6.1, p. 20: the clauses of a cell are the same for every cell,
except that the block and the column enter the labels of their variables. The sketch first
converts the machine to a single-tape one; this formula uses the multi-tape tableau directly.
A label is a two-bit tag followed by a payload (label = tag + 4 * payload):
- tag
0, the constant gateb(constLabel), payloadb; - tag
1, the inputi(inputLabel), payloadi; - tag
2, the positionlof blocktin columnc(posLabel), payloadslot + 2 ^ sb * (c + 2 ^ cb * t), whereslotis the number oflamong the positions of a block (Loc.slot),sb = slotBits k Statedepends only on the machine,cb = colBits T = Nat.size (2 * T)andttakes the remaining high bits.
A reference of the tableau (Ref), relative to the block and the column of its gate, becomes the
label Ref.label: the block t or t - 1, the column c, c - 1, c + 1 or 2 T (0 for the
global positions, which are not repeated across the columns), and the slot of the position. A
clause number is j + 4 * (tag + 4 * payload): clause j < 3 of the gate of a constant or a
position, the unit clause fixing an input, or (tag 3, payload 0) the unit clause fixing the
output; every other number gives a tautology. The formula succinctCNF tm x n T lists the clauses
of all numbers below 2 ^ clauseBits k State T.
The formula is satisfiable exactly when, on some input of length n extending x, the machine
has written exactly [true] after T steps (satisfiable_succinctCNF_iff). The proof compares it
with tseitinSatCNF of the tableau gate list, through the labelling of wires (wireLabel) and
the inverse decoding of labels (wireOf); the labels of references agree with their resolved wire
numbers (wireLabel_resolve, wireOf_label).
Main definitions #
Cslib.Circuits.Boolean.Tableau.Loc.slot,Cslib.Circuits.Boolean.Tableau.slotBits,Cslib.Circuits.Boolean.Tableau.colBits,Cslib.Circuits.Boolean.Tableau.timeBits: the fields.Cslib.Circuits.Boolean.Tableau.constLabel,Cslib.Circuits.Boolean.Tableau.inputLabel,Cslib.Circuits.Boolean.Tableau.posLabel,Cslib.Circuits.Boolean.Tableau.Ref.label: labels.Cslib.Circuits.Boolean.Tableau.posClause,Cslib.Circuits.Boolean.Tableau.clauseOf,Cslib.Circuits.Boolean.Tableau.clauseAt: the clause with a number, from its fields.Cslib.Circuits.Boolean.Tableau.clauseBits,Cslib.Circuits.Boolean.Tableau.labelBits: the widths of clause numbers and labels.Cslib.Circuits.Boolean.Tableau.succinctCNF: the formula.
Main results #
Cslib.Circuits.Boolean.Tableau.wireLabel_resolve,Cslib.Circuits.Boolean.Tableau.wireOf_label: the label of a reference is the label of the wire it resolves to, and decodes to that wire.Cslib.Circuits.Boolean.Tableau.satisfiable_succinctCNF_iff_tseitin: the formula is equisatisfiable with the Tseitin formula of the tableau.Cslib.Circuits.Boolean.Tableau.satisfiable_succinctCNF_iff: the formula is satisfiable exactly when, on some input of lengthnextendingx, the machine has written exactly[true]afterTsteps.Cslib.Circuits.Boolean.Tableau.length_succinctCNF,Cslib.Circuits.Boolean.Tableau.length_of_mem_succinctCNF,Cslib.Circuits.Boolean.Tableau.lt_two_pow_labelBits_of_mem_vars: there are2 ^ clauseBits k State Tclauses of three literals, on variables below2 ^ labelBits k State T.
References #
Fields #
Slots are below the number of positions.
The width of the column field, for the columns c ≤ 2 T.
The width of the time field, for the blocks t ≤ T.
Labels #
The label of the constant gate b: tag 0.
The label of the position l of block t in column c: tag 2, and the slot, the column
and the block in fields of widths slotBits k State, colBits T and the remaining high bits.
From labels to wires #
Decoding the label of an input gives its wire.
From wires to labels #
Labels of references #
The label of a reference is the label of its wire.
Decoding the label of a reference gives its wire.
The references of the gates of the tableau read the window.
The clauses #
A clause that every assignment satisfies.
Every assignment satisfies tautology.
Clause j of the gate at the position l of block t in column c, on labels: the initial
constant in block 0, and otherwise the gate of table on the labels of its references.
The clause with the fields j, tag and p of its number j + 4 * (tag + 4 * p):
clause j of the constant gate p (tag 0), the unit clause fixing input p to x[p]
(tag 1, j = 0), clause j of the gate at the position whose slot, column and block are the
fields of p (tag 2), or the unit clause fixing the output (tag 3, j = p = 0). Every other
number gives a tautology.
The clause with number idx, from the fields of idx.
The tableau formula on bit-field labels: the clauses of all numbers below
2 ^ clauseBits k State T, for the tableau of tm for T steps on n inputs, with the inputs
i < x.length fixed to x[i] and the output fixed to true.
Clauses at their numbers #
The clause of a number with the fields j, tag and p.
The numbers of the clauses with a payload of slotBits + colBits + timeBits bits are below
2 ^ clauseBits.
The clauses of a position.
The clauses of a position hold exactly when its label carries the value of its gate.
Every clause holds under an assignment of labels that gives the constants their values,
the fixed inputs the bits of x and the output true, and every position the value of its gate on
the labels of its references.
Comparison with the Tseitin formula of the tableau #
The tableau formula on labels is equisatisfiable with the Tseitin formula of the tableau with the same fixed inputs and output.
The tableau formula on labels is satisfiable exactly when, on some input of length n
extending x, the machine tm has written exactly [true] after T steps, whether or not it
has halted, for n < 2 T and x of length at most n.
Size #
Every clause of the formula has three literals.
The formula has 2 ^ clauseBits k State T clauses.
Every variable of the formula is below 2 ^ labelBits k State T, for n < 2 T: labels
have labelBits k State T bits.