The uniform tableau circuit of a multi-tape machine #
The run of a multi-tape machine over Bool for T steps on inputs of length n is simulated by
a De Morgan circuit written down gate by gate (Cslib.Circuits.Boolean.Tableau.gates), in the
format of Cslib.Circuits.Circuit.code. The circuit is uniform: the operation and the wires of
gate g are given by a table of constant size, indexed by g modulo the size of a block, and by
a few additions and multiplications of g, n and T (Cslib.Circuits.Boolean.Tableau.gateCode).
This is the circuit of Ladner's proof that the circuit value problem is P-complete under
logarithmic-space reductions [Lad75], Arora and Barak, Section 6.7,
Papadimitriou, Theorem 8.1.
The circuit follows the configuration in the model of Turing.MultiTapeTM, without conversion to
a single-tape or oblivious machine. Work-tape cells -T, …, T and input positions 0, …, n + 1
share the 2 T + 1 columns c: column c holds the input head at position c, and the work
heads and work cells at c - T. After two constant gates (false at wire n, true at wire
n + 1), the circuit has one block of gates for each time t ≤ T. Block 0 consists of
constants describing the initial configuration. Block t + 1 reads block t and has four
regions (Complexity/Computability/Circuit/Boolean/Tableau/Layout.lean):
- the scan, column by column: the symbols under the heads, as disjunctions accumulated across
the columns (
Cslib.Circuits.Boolean.Tableau.ScanLoc), and the negated head positions; - the global gates: each situation (
Turing.MultiTapeTM.Situation) as a conjunction of the state and the symbols read, and each attribute of the action (Cslib.Circuits.Boolean.Tableau.Attr) as a disjunction over the situations with that attribute; - the global features: the state and the view of the output (
Turing.OutView); - the column features: the input head, the work heads and the work cells of each column.
Every feature at time t + 1 is a disjunction of at most eight conjunctions of two wires
(Cslib.Circuits.Boolean.Tableau.gfTerms, Cslib.Circuits.Boolean.Tableau.colTerms), computed
by sixteen gates. A gate refers to wires symbolically (Cslib.Circuits.Boolean.Tableau.Ref),
relative to its block and column, and a reference is resolved to a wire number by arithmetic
(Cslib.Circuits.Boolean.Tableau.Ref.resolve).
The circuit is well formed (Cslib.Circuits.Boolean.Tableau.isCodeFrom_gates): every gate reads
only inputs and earlier gates. Its correctness is proved in
Complexity/Computability/Circuit/Boolean/Tableau/Correct.lean.
Main definitions #
Cslib.Circuits.Boolean.Tableau.table: the gate at each position of a block.Cslib.Circuits.Boolean.Tableau.gateAt,Cslib.Circuits.Boolean.Tableau.gateCode: the gate at a block position and the gate with a given number.Cslib.Circuits.Boolean.Tableau.gates,Cslib.Circuits.Boolean.Tableau.outWire: the gate list and the output wire.Cslib.Circuits.Boolean.Tableau.circuit: the tableau as a De Morgan circuit.
Main results #
Cslib.Circuits.Boolean.Tableau.gateCode_wire: the gate at a position's wire is the gate of its position.Cslib.Circuits.Boolean.Tableau.isCodeFrom_gates: the gate list is the code of a program.Cslib.Circuits.Boolean.Tableau.code_circuit: the code of the circuit is the gate list with the output wire.
References #
The gates #
Whether an action has an attribute.
Instances For
The situation with number j.
Instances For
The gate at each position of a block after the first, with symbolic references to its wires.
Instances For
The value of a global feature in the initial configuration.
Instances For
The constant at each position of the first block: the initial value of a feature at the last
gate of its gadget, false elsewhere.
Instances For
The gate at the position l of block t, in column c.
Instances For
The gate with number g of the tableau of tm for T steps on inputs of length n:
gates 0 and 1 are the constants false and true, and gate 2 + t * B + r is the gate at
offset r of block t, for blocks of B gates.
Instances For
The gate list of the tableau of tm for T steps on inputs of length n.
Instances For
Gates at their wires #
The gate at a wire is the gate of its position.
Well-formedness #
The gate list is the code of a circuit #
The tableau is well formed: its gate list is the code of a program on n inputs.
The tableau circuit of tm for T steps on inputs of length n.