Documentation

Complexity.Computability.Machines.Turing.MultiTape.Complexity.Primitives

Basic functions with bounds of given degrees #

Functions on unary numbers and integers, in linear time and space, and equality tests, in quadratic time and space.

Main definitions #

Main results #

Unary numbers #

Natural numbers in unary: n is encoded by n ones.

Instances For

    Integers #

    Integers: false followed by n in unary for n ≥ 0, and true followed by n in unary for -(n + 1).

    Instances For

      Equality #

      One step of comparing a word with s.1, the part of the other word still to be matched; s.2 records whether the words agree so far.

      Instances For

        The result of comparing words, from the state after the last step.

        theorem Turing.MultiTapeTM.ComputableTidilyInDegree.eq {α : Type} [DecidableEq α] (enc : α ↪ List Bool) :
        ComputableTidilyInDegree (fun (p : α × α) => decide (p.1 = p.2)) (encPair enc enc) encBool 2 0

        Equality, for any encoding.