Encodings #
This file contains the definition of a (finite) encoding, a map from a type to strings in an alphabet, used in defining computability by Turing machines. It also contains several examples:
Examples #
finEncodingNatBool: a binary encoding ofℕin a simple alphabet.finEncodingNatΓ': a binary encoding ofℕin the alphabet used for TM's.unaryFinEncodingNat: a unary encoding ofℕfinEncodingBoolBool: an encoding ofBool.finEncodingList: an encoding ofList αin the alphabetα.finEncodingPair: an encoding ofα × βfrom encodings ofαandβ.
An Encoding plus a guarantee of finiteness of the alphabet.
The alphabet of the encoding is finite
Instances For
A standard Turing machine alphabet, consisting of blank,bit0,bit1,bra,ket,comma.
Instances For
Instances For
The natural inclusion of Bool in Γ'.
Instances For
An arbitrary section of the natural inclusion of Bool in Γ'.
Instances For
An encoding function of the positive binary numbers in Bool.
Instances For
An encoding function of the binary numbers in Bool.
Instances For
An encoding function of ℕ in Bool.
Instances For
A decoding function from List Bool to the positive binary numbers.
Instances For
A decoding function from List Bool to the binary numbers.
Instances For
A decoding function from List Bool to ℕ.
Instances For
A binary Encoding of ℕ in Bool.
Instances For
A binary encoding of ℕ in Bool, as a FinEncoding.
Instances For
Instances For
A binary FinEncoding of ℕ in Γ'.
Instances For
A unary encoding function of ℕ in Bool.
Instances For
A unary decoding function from List Bool to ℕ.
Instances For
A unary FinEncoding of ℕ in Bool.
Instances For
An encoding function of Bool in Bool.
Instances For
A decoding function from List Bool to Bool.
Instances For
A FinEncoding of Bool in Bool.
Instances For
A FinEncoding of a List α in (finite) alphabet α, encoded directly.
Instances For
Given FinEncoding of α and β,
constructs a FinEncoding of α × β by concatenating the encodings,
mapping the symbols from the first encoding with Sum.inl
and those from the second with Sum.inr.