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 #
Turing.MultiTapeTM.encUnary: natural numbers in unary.Turing.MultiTapeTM.encInt: integers as a sign followed by a unary magnitude.
Main results #
Turing.MultiTapeTM.ComputableTidilyInDegree.eq: equality, for any encoding.- successor, predecessor and zero test in unary, and adding one or subtracting one on integers.
Unary numbers #
theorem Turing.MultiTapeTM.ComputableTidilyInDegree.unary_succ :
ComputableTidilyInDegree (fun (x : ℕ) => x + 1) encUnary encUnary 1 1
theorem Turing.MultiTapeTM.ComputableTidilyInDegree.unary_pred :
ComputableTidilyInDegree (fun (x : ℕ) => x - 1) encUnary encUnary 1 1
Integers #
@[simp]
@[simp]
@[simp]
theorem Turing.MultiTapeTM.ComputableTidilyInDegree.int_succ :
ComputableTidilyInDegree (fun (x : ℤ) => x + 1) encInt encInt 1 1
theorem Turing.MultiTapeTM.ComputableTidilyInDegree.int_pred :
ComputableTidilyInDegree (fun (x : ℤ) => x - 1) encInt encInt 1 1
Equality #
theorem Turing.MultiTapeTM.ComputableTidilyInDegree.eq {α : Type} [DecidableEq α] (enc : α ↪ List Bool) :
Equality, for any encoding.