Documentation

Complexity.Computability.Machines.Turing.MultiTape.Universal.PolyTime

Universal input coding and polynomial-time simulation #

The universal function Turing.MultiTapeTM.Universal.universal runs a described machine on an input for a given number of steps. Its time and space are polynomial in the length of the description, of the input and of the number of steps written in unary (Turing.MultiTapeTM.Universal.universal_bounds_unary), so it is tidily computable in polynomial time when the number of steps is written in unary (Turing.MultiTapeTM.Universal.computableTidilyInPolyTime_universal). Written in binary, the number of steps would be exponential in its length.

The input-coding API translates bits to unary symbols (false ↦ 0, true ↦ 1) in linear time and output size. It also certifies polynomial-time decoding of descriptions and coding of a single bit, independently of hierarchy theorems and Ladner's language.

Main definitions #

Main results #

References #

The symbols of the input #

The code of a bit list with every true doubled: false ↦ [false], true ↦ [true, true].

Instances For

    Bit lists with every true doubled.

    Instances For

      Reads a doubled word as the framed unary symbols 0 for false and 1 for true.

      Instances For

        The input as symbols, in linear time and space.

        Decoding a machine description is polynomial-time in the input word.

        The coding of bits as symbols is a finite computation.

        Simulation with a unary clock #

        theorem Turing.MultiTapeTM.Universal.universal_bounds_unary (i : Desc × List ℕ × ℕ) :
        (i.2.2 + 1) * (stepBound (descLen i.1) ((encList encUnary) i.2.1).length i.2.2 + runBound (descLen i.1) ((encList encUnary) i.2.1).length i.2.2 + ((encNat i.2.2).length + 1) ^ 2) + ((eIn i).length + 1) ^ 2 ≤ 100025 * (((encPair eDesc (encPair (encList encUnary) encUnary)) i).length + 1) ^ 8 ∧ runBound (descLen i.1) ((encList encUnary) i.2.1).length i.2.2 + (eIn i).length ≤ 205 * (((encPair eDesc (encPair (encList encUnary) encUnary)) i).length + 1) ^ 3

        The time and space of the universal function, polynomially in the length of its input with the number of steps in unary.

        The universal function with a unary clock is polynomial-time: written in unary, the number of steps counts towards the length of the input.