Documentation

Complexity.Computability.Machines.Turing.MultiTape.Encodings.Finite

Encodings of fixed finite types #

A finite type is encoded by unary ranks in one fixed enumeration. The enumeration and its size are independent of the runtime input; this does not give a uniform algorithm for growing types. Concrete finite types with a FinEnum instance use Turing.MultiTapeTM.encFinEnum, which is computable; generic [Finite α] parameters use Turing.MultiTapeTM.encFinite.

Main definitions #

Main results #

References #

Adapts Computability/Probabilistic/Finite.lean on the cslib crypto branch at 5ff69ca93402e7c947208dc56396d6d86203ccd8, using the existing unary encoding.

@[instance_reducible]

Concrete bit enumeration.

Encode a constructively enumerated finite type by unary ranks.

Instances For

    Every constructively encoded finite tag has length less than the fixed domain's cardinality.

    noncomputable def Turing.MultiTapeTM.encFinite (α : Type) [Finite α] :

    Encode a fixed finite type by unary ranks in an enumeration chosen once.

    Instances For
      theorem Turing.MultiTapeTM.length_encFinite_lt {α : Type} [Finite α] (a : α) :

      Every encoded finite tag has length less than the fixed domain's cardinality.