Partial recursiveness of MultiTapeTM and bridges to Mathlib computability #
This file proves that the universal multi-tape simulator Turing.MultiTapeTM.Universal.simulate is
primitive recursive (Primrec) and bridges multi-tape Turing machine computability, decidability,
and mapping reductions with Mathlib's Partrec, Computable, ComputablePred, and
ManyOneReducible.
Main definitions #
Turing.MultiTapeTM.Universal.Desc.runForandDesc.eval: clocked and unbounded evaluation of a universal machine descriptionDesc.Turing.MultiTapeTM.runForandMultiTapeTM.eval: clocked and unbounded partial evaluation of a multi-tape Turing machineMultiTapeTM k Symbol State.
Main results #
Turing.MultiTapeTM.Universal.primrec_simulateandDesc.partrec_eval:simulateisPrimrecandDesc.evalisPartrec, characterizingDesc.ComputesandDesc.Halts.Turing.MultiTapeTM.primrec_runForandMultiTapeTM.partrec_eval: for every finite-state binary multi-tape Turing machinetm : MultiTapeTM k Bool State,tm.runForisPrimrec₂andtm.evalisPartrec.Turing.MultiTapeTM.IsComputable.computable,IsComputable.computable_bits, andIsComputable.computable_bool: every function satisfyingIsComputable f encIn encOut(with computableencInand left-invertibleencOut) isComputablein Mathlib's sense.Turing.MultiTapeTM.IsDecidable.computablePredandIsDecidable.computablePred_bits: every set satisfyingMultiTapeTM.IsDecidable L enc(with computableenc) satisfies Mathlib'sComputablePred (· ∈ L).Turing.MultiTapeTM.MappingReducible.manyOneReducibleandMappingReducible.manyOneReducible_bits: everyMultiTapeTM.MappingReduciblereduction induces a MathlibManyOneReducible(≤₀) reduction.
References #
Primcodable instances for Universal types #
Partial recursive evaluation of Desc #
Partial recursiveness of MultiTapeTM and bridges to Computable #
Clocked run of a MultiTapeTM: returns some output if tm has halted after t steps on
x, and none otherwise.
Instances For
Partial evaluation of a MultiTapeTM: tm.eval x evaluates to y iff tm.Computes x y.
Instances For
For every finite-state binary MultiTapeTM, its clocked run tm.runFor is primitive
recursive.
For every finite-state binary MultiTapeTM, its partial evaluation tm.eval is partial
recursive.
Bridges from IsComputable, IsDecidable, and MappingReducible to Mathlib #
If IsComputable f encIn encOut and encIn is Computable, then fun a => encOut (f a) is
Computable in Mathlib's sense.
If IsComputable f encIn encOut, encIn is Computable, and decOut is a computable left
inverse of encOut, then f is Computable in Mathlib's sense.
Any function f : List Bool → List Bool that is MultiTapeTM.IsComputable under the identity
encoding encBits is Computable in Mathlib's sense.
Any Boolean-valued function f : α → Bool that is MultiTapeTM.IsComputable with respect to a
computable input encoding encIn and encBool is Computable in Mathlib's sense.
Any set L : Set α that is MultiTapeTM.IsDecidable with respect to a computable encoding
enc satisfies Mathlib's ComputablePred (· ∈ L).
Any language L : Set (List Bool) that is MultiTapeTM.IsDecidable under encBits satisfies
Mathlib's ComputablePred (· ∈ L).
Any MultiTapeTM.MappingReducible reduction between Primcodable types with computable
encoding encA and left-invertible encB yields a Mathlib ManyOneReducible (≤₀) reduction.
Any MultiTapeTM.MappingReducible reduction on bit strings under encBits yields a Mathlib
ManyOneReducible (≤₀) reduction.