Documentation

CslibFrontier.Computability.Machines.Turing.MultiTape.Halting.Countable

There are countably many decidable sets and computable functions #

A machine with finitely many states is determined, up to renaming its states, by its description (Turing.MultiTapeTM.Universal.desc), and descriptions are encoded injectively as bit words (Turing.MultiTapeTM.Universal.eDesc). A machine computes at most one output on each input, so a computable function is determined by the description of a machine computing it, and there are countably many computable functions (Turing.MultiTapeTM.countable_setOf_isComputable), while there are continuum many functions from bit strings to bit strings. A decidable set is the set where some computable Boolean function is true, so there are also countably many decidable sets (Turing.MultiTapeTM.countable_setOf_isDecidable).

Main results #

References #

theorem Turing.MultiTapeTM.computes_true_iff {α : Type u_1} {enc : α ↪ List Bool} {k : ℕ} {State : Type u_2} {tm : MultiTapeTM k Bool State} {f : α → Bool} (htm : ∀ (a : α), tm.Computes (enc a) [f a]) (a : α) :
tm.Computes (enc a) [true] ↔ f a = true

A machine computing a Boolean function f halts with output [true] exactly where f is true.

theorem Turing.MultiTapeTM.countable_setOf_isComputable {α : Type u_1} {β : Type u_2} (encIn : α ↪ List Bool) (encOut : β ↪ List Bool) :
{f : α → β | IsComputable f encIn encOut}.Countable

There are countably many computable functions, for all encodings of their inputs and outputs: a computable function is determined by the description of a machine computing it, since a machine computes at most one output on each input and the output encoding is injective.

There are countably many decidable sets: a decidable set is the set where some computable Boolean function is true.

On the scarcity of computable functions Goldreich, Theorem 1.4: the functions from bit strings to bit strings computable by a native machine form a countable set, whereas the set of all such functions has the cardinality of the continuum.