Documentation

CslibFrontier.Computability.Complexity.Classes.LogSpace.FirstOrder.ConfigurationGraph

First-order configuration graphs #

A configuration of a nondeterministic machine with k binary work tapes is a fixed tuple of registers (Turing.MultiTapeNTM.ConfigurationGraph.Register k): the input head position, the control tag, the output tag and, for each work tape, the head symbol and the ternary codes of the two stacks beside it. This file defines that graph by first-order formulas over the canonical numeric vocabulary (order, BIT, zero, one and maximum, with exact addition) on a universe Fin N: one universe element per register.

The input is read through two caller-supplied formulas: inputFormula s holds of a position exactly when the input symbol there is s (including both endmarkers), and lengthFormula holds exactly of the input length. Every formula has its exact semantics on every universe Fin N with w.length < N. A step whose successor registers would exceed the universe is not defined: no universe element denotes the successor, which is exactly the behaviour of RegisterStep restricted to tuples of Fin N.

Main definitions #

Main results #

References #

The input head position after a move by d from x, clamped to the endmarkers 0 and n + 1, where lengthFormula holds exactly of the input length n.

Instances For

    The head symbol after an optional write: unchanged by none, the written symbol's code otherwise.

    Instances For

      The three registers of one work tape after the action a: head h, left stack l and right stack r become h', l' and r'. The written head symbol is bound to a fresh variable.

      Instances For

        The output tag after an optional emission (outputStep).

        Instances For

          The registers Y are the successor registers nextRegisters of X under the action a.

          Instances For

            The registers X have the observations of the transition table entry t: its control state, the input symbol under the input head and the work-tape head symbols.

            Instances For

              One step of the configuration graph on register tuples: either X is halted and Y = X, or X has the observations of some transition table entry and Y is its successor.

              Instances For

                The registers X are the start registers of ntm.

                Instances For

                  The registers X are halted with output tag 1.

                  Instances For
                    theorem Cslib.Complexity.ConfigurationGraph.realize_inputMoveFormula {L : FirstOrder.Language} {α : Type u_1} {N : ℕ} [Fact (2 ≤ N)] [L.Structure (Fin N)] {lengthFormula : (Logic.FO.Ordered.language L).Formula (Fin 1)} {n : ℕ} (hlen : ∀ (a : Fin N), lengthFormula.Realize ![a] ↔ n = ↑a) (hn : n < N) (d : SignType) (x y : (Logic.FO.Ordered.language L).Term α) (v : α → Fin N) :

                    The input-move formula has the exact semantics of inputMove, given a length formula that holds exactly of the input length n.

                    The output formula has the exact semantics of outputStep.

                    theorem Cslib.Complexity.ConfigurationGraph.realize_nextFormula {L : FirstOrder.Language} {α : Type u_1} {k : ℕ} {State : Type} [Fintype State] {N : ℕ} [Fact (2 ≤ N)] [L.Structure (Fin N)] {lengthFormula : (Logic.FO.Ordered.language L).Formula (Fin 1)} {n : ℕ} (hlen : ∀ (a : Fin N), lengthFormula.Realize ![a] ↔ n = ↑a) (hn : n < N) (a : Turing.Action k Bool State) (X Y : Turing.MultiTapeNTM.ConfigurationGraph.Register k → (Logic.FO.Ordered.language L).Term α) (v : α → Fin N) :

                    The successor formula has the exact semantics of nextRegisters.

                    theorem Cslib.Complexity.ConfigurationGraph.realize_stepFormula {L : FirstOrder.Language} {α : Type u_1} {k : ℕ} {State : Type} [Fintype State] {N : ℕ} [Fact (2 ≤ N)] [L.Structure (Fin N)] {inputFormula : Option Bool → (Logic.FO.Ordered.language L).Formula (Fin 1)} {lengthFormula : (Logic.FO.Ordered.language L).Formula (Fin 1)} {w : List Bool} (hinput : ∀ (s : Option Bool) (a : Fin N), (inputFormula s).Realize ![a] ↔ Turing.inputAt w ↑a = s) (hlen : ∀ (a : Fin N), lengthFormula.Realize ![a] ↔ w.length = ↑a) (hn : w.length < N) (ntm : Turing.MultiTapeNTM k Bool State) (X Y : Turing.MultiTapeNTM.ConfigurationGraph.Register k → (Logic.FO.Ordered.language L).Term α) (v : α → Fin N) :

                    The step formula defines the configuration graph on register tuples: on every universe Fin N with w.length < N, it holds exactly of RegisterStep between the values of its tuples.