Documentation

CslibFrontier.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.

        The coding of bits as symbols is a finite computation.

        Simulation with a unary clock #

        @[reducible, inline]

        The encoding of inputs of the universal function with the number of steps in unary: the framed description, then the framed list of unary input symbols, then the step count in unary. It differs from eIn only in its last component, which eIn writes in binary.

        Instances For
          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 * ((eInUnary i).length + 1) ^ 6 ∧ runBound (descLen i.1) ((encList encUnary) i.2.1).length i.2.2 + (eIn i).length ≤ 205 * ((eInUnary 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.

          Plain ComputableInPolyTime wrappers for the universal simulator #

          Plain linear certificate for coding a bit string as unary symbol numbers.

          Plain polynomial-time certificate for coding a bit string as unary symbol numbers.

          Plain polynomial-time certificate for coding a single bit as a unary symbol number.

          Decoding a list of unary symbol numbers to bits via (· != 0) is computable in polynomial time.

          Plain polynomial-time certificate for the universal simulator with a unary step budget.