The decoder circuit of the succinct tableau #
The three stages of the decoder of the tableau formula on bit-field labels
(CslibFrontier/Computability/Circuit/Boolean/Tableau/Decoder/Circuit.lean) composed into one
De Morgan circuit (decoder). From the bits of a clause number below 2 ^ clauseBits, it computes
the bits of Cslib.Circuits.Boolean.Tableau.clauseAt (ofFn_eval_decoder). It has
O(colBits T + timeBits T + x.length) gates (size_decoder_le): the field stage has
2 + N + 14 P + (2 ^ (Nat.size x.length + 1) - 1) + x.length gates for N = clauseBits and
P = N - 4, the constant stage a number depending only on the machine, and the output stage 63
gates per output bit. There is no carry-lookahead adder, whose size is not linear in the width.
Its code is decoderCode, written with the code combinators compCode, appendCode,
appendCodes and formulaCode on the explicit gate list of the field stage and the constant code
of the constant stage (code_decoder). This is the decoder of the sketch of
Williams, Theorem 6.1, p. 20: the variables of the clauses of a cell differ from
cell to cell only by the block and the column, which enter through comparisons, increments and
decrements of fields. The sketch first converts the machine to a single-tape machine; this decoder
is built for the multi-tape tableau directly.
Main definitions #
Cslib.Circuits.Boolean.Tableau.Decoder.decoder: the decoder circuit.Cslib.Circuits.Boolean.Tableau.Decoder.decoderCode: its code.Cslib.Circuits.Boolean.Tableau.Decoder.sizeConst: the constant of its size bound.
Main results #
Cslib.Circuits.Boolean.Tableau.Decoder.ofFn_eval_decoder: the decoder computes the clause with a given number, bit by bit.Cslib.Circuits.Boolean.Tableau.Decoder.size_decoder_le: it hasO(colBits T + timeBits T + x.length)gates.Cslib.Circuits.Boolean.Tableau.Decoder.code_decoder: its code isdecoderCode.Cslib.Circuits.Boolean.Tableau.Decoder.exists_decoder: the three together.
References #
The constant stage on the wires of the field stage, beside those wires.
The decoder circuit of the tableau formula of tm on bit-field labels, for the fixed
prefix x, n inputs and T steps.
The code #
The code of the decoder, written with the code combinators compCode, appendCode,
appendCodes and formulaCode: the field stage, the constant code of the constant stage, and one
instance of outTemplate per output bit (code_decoder).
The code of the decoder circuit is decoderCode.
Size #
The decoder has O(colBits T + timeBits T + x.length) gates, with a constant depending
only on the machine.
Correctness #
The values of the wires of the field and constant stages.
The decoder computes the clause with a given number: its outputs are the bits of the
three literals of clauseAt, for n < 2 T and a fixed prefix of length at most n.
The decoder of the succinct tableau #
The constant of the size bound of the decoder, which depends only on the machine.
The decoder of the succinct tableau formula: for n < 2 T and a fixed prefix x of length
at most n, a De Morgan circuit with code decoderCode tm (x, n, T) and at most
sizeConst tm * (colBits T + timeBits T + x.length + 1) gates computes, from the bits of a clause
number below 2 ^ clauseBits, the bits of the clause clauseAt tm x n T idx of
Cslib.Circuits.Boolean.Tableau.succinctCNF: the label of each of its three literals in
labelBits bits, least significant first, then its sign.