File: Mathlib/Computability/Encoding.lean

full_name: Computability.Encoding.encode
code: /-- An encoding of a type in a certain alphabet, together with a decoding. -/
structure Encoding (α : Type u) where
  Γ : Type v
  encode : α → List Γ
  decode : List Γ → Option α
  decode_encode : ∀ x, decode (encode x) = some x
goal: α → List self.Γ

full_name: Computability.Encoding
code: /-- An encoding of a type in a certain alphabet, together with a decoding. -/
structure Encoding (α : Type u) where
  Γ : Type v
  encode : α → List Γ
  decode : List Γ → Option α
  decode_encode : ∀ x, decode (encode x) = some x
goal: Type (max u (v + 1))

full_name: Computability.Encoding.decode
code: /-- An encoding of a type in a certain alphabet, together with a decoding. -/
structure Encoding (α : Type u) where
  Γ : Type v
  encode : α → List Γ
  decode : List Γ → Option α
  decode_encode : ∀ x, decode (encode x) = some x
goal: List self.Γ → Option α

full_name: Computability.Encoding.Γ
code: /-- An encoding of a type in a certain alphabet, together with a decoding. -/
structure Encoding (α : Type u) where
  Γ : Type v
  encode : α → List Γ
  decode : List Γ → Option α
  decode_encode : ∀ x, decode (encode x) = some x
goal: Type v

full_name: Computability.Encoding.decode_encode
code: /-- An encoding of a type in a certain alphabet, together with a decoding. -/
structure Encoding (α : Type u) where
  Γ : Type v
  encode : α → List Γ
  decode : List Γ → Option α
  decode_encode : ∀ x, decode (encode x) = some x
goal: self.decode (self.encode x) = some x

full_name: Computability.Encoding.encode_injective
code: theorem Encoding.encode_injective {α : Type u} (e : Encoding α) : Function.Injective e.encode 
goal: Function.Injective e.encode

full_name: Computability.FinEncoding.ΓFin
code: /-- An encoding plus a guarantee of finiteness of the alphabet. -/
structure FinEncoding (α : Type u) extends Encoding.{u, 0} α where
  ΓFin : Fintype Γ
goal: Fintype self.Γ

full_name: Computability.FinEncoding
code: /-- An encoding plus a guarantee of finiteness of the alphabet. -/
structure FinEncoding (α : Type u) extends Encoding.{u, 0} α where
  ΓFin : Fintype Γ
goal: Type (max 1 u)

full_name: Computability.Γ.fintype
code: instance Γ.fintype {α : Type u} (e : FinEncoding α) : Fintype e.toEncoding.Γ 
goal: Fintype e.Γ

full_name: Computability.Γ'.blank
code: /-- A standard Turing machine alphabet, consisting of blank,bit0,bit1,bra,ket,comma. -/
inductive Γ'
  | blank
  | bit (b : Bool)
  | bra
  | ket
  | comma
  deriving DecidableEq
goal: Computability.Γ'

full_name: Computability.Γ'.comma
code: /-- A standard Turing machine alphabet, consisting of blank,bit0,bit1,bra,ket,comma. -/
inductive Γ'
  | blank
  | bit (b : Bool)
  | bra
  | ket
  | comma
  deriving DecidableEq
goal: Computability.Γ'

full_name: Computability.Γ'.bra
code: /-- A standard Turing machine alphabet, consisting of blank,bit0,bit1,bra,ket,comma. -/
inductive Γ'
  | blank
  | bit (b : Bool)
  | bra
  | ket
  | comma
  deriving DecidableEq
goal: Computability.Γ'

full_name: Computability.Γ'.bit
code: /-- A standard Turing machine alphabet, consisting of blank,bit0,bit1,bra,ket,comma. -/
inductive Γ'
  | blank
  | bit (b : Bool)
  | bra
  | ket
  | comma
  deriving DecidableEq
goal: Computability.Γ'

full_name: Computability.Γ'
code: /-- A standard Turing machine alphabet, consisting of blank,bit0,bit1,bra,ket,comma. -/
inductive Γ'
  | blank
  | bit (b : Bool)
  | bra
  | ket
  | comma
  deriving DecidableEq
goal: Type

full_name: Computability.Γ'.ket
code: /-- A standard Turing machine alphabet, consisting of blank,bit0,bit1,bra,ket,comma. -/
inductive Γ'
  | blank
  | bit (b : Bool)
  | bra
  | ket
  | comma
  deriving DecidableEq
goal: Computability.Γ'

full_name: Computability.Γ'.fintype
code: instance Γ'.fintype : Fintype Γ' 
goal: Fintype Computability.Γ'

full_name: Computability.inhabitedΓ'
code: instance inhabitedΓ' : Inhabited Γ' 
goal: Inhabited Computability.Γ'

full_name: Computability.inclusionBoolΓ'
code: /-- The natural inclusion of bool in Γ'. -/
def inclusionBoolΓ' : Bool → Γ' 
goal: Bool → Computability.Γ'

full_name: Computability.sectionΓ'Bool
code: /-- An arbitrary section of the natural inclusion of bool in Γ'. -/
def sectionΓ'Bool : Γ' → Bool
  
goal: Computability.Γ' → Bool

full_name: Computability.leftInverse_section_inclusion
code: theorem leftInverse_section_inclusion : Function.LeftInverse sectionΓ'Bool inclusionBoolΓ' 
goal: Function.LeftInverse Computability.sectionΓ'Bool Computability.inclusionBoolΓ'

full_name: Computability.inclusionBoolΓ'_injective
code: theorem inclusionBoolΓ'_injective : Function.Injective inclusionBoolΓ' 
goal: Function.Injective Computability.inclusionBoolΓ'

full_name: Computability.encodePosNum
code: /-- An encoding function of the positive binary numbers in bool. -/
def encodePosNum : PosNum → List Bool
  
goal: PosNum → List Bool

full_name: Computability.encodeNum
code: /-- An encoding function of the binary numbers in bool. -/
def encodeNum : Num → List Bool
  
goal: Num → List Bool

full_name: Computability.encodeNat
code: /-- An encoding function of ℕ in bool. -/
def encodeNat (n : ℕ) : List Bool 
goal: List Bool

full_name: Computability.decodePosNum
code: /-- A decoding function from `List Bool` to the positive binary numbers. -/
def decodePosNum : List Bool → PosNum
  
goal: List Bool → PosNum

full_name: Computability.decodeNum
code: /-- A decoding function from `List Bool` to the binary numbers. -/
def decodeNum : List Bool → Num 
goal: List Bool → Num

full_name: Computability.decodeNat
code: /-- A decoding function from `List Bool` to ℕ. -/
def decodeNat : List Bool → Nat 
goal: List Bool → ℕ

full_name: Computability.encodePosNum_nonempty
code: theorem encodePosNum_nonempty (n : PosNum) : encodePosNum n ≠ [] 
goal: Computability.encodePosNum n ≠ []

full_name: Computability.decode_encodePosNum
code: theorem decode_encodePosNum : ∀ n, decodePosNum (encodePosNum n) = n 
goal: Computability.decodePosNum (Computability.encodePosNum n) = n

full_name: Computability.decode_encodeNum
code: theorem decode_encodeNum : ∀ n, decodeNum (encodeNum n) = n 
goal: Computability.decodeNum (Computability.encodeNum n) = n

full_name: Computability.decode_encodeNat
code: theorem decode_encodeNat : ∀ n, decodeNat (encodeNat n) = n 
goal: Computability.decodeNat (Computability.encodeNat n) = n

full_name: Computability.encodingNatBool
code: /-- A binary encoding of ℕ in bool. -/
def encodingNatBool : Encoding ℕ 
goal: Computability.Encoding ℕ

full_name: Computability.finEncodingNatBool
code: /-- A binary fin_encoding of ℕ in bool. -/
def finEncodingNatBool : FinEncoding ℕ 
goal: Computability.FinEncoding ℕ

full_name: Computability.encodingNatΓ'
code: /-- A binary encoding of ℕ in Γ'. -/
def encodingNatΓ' : Encoding ℕ 
goal: Computability.Encoding ℕ

full_name: Computability.finEncodingNatΓ'
code: /-- A binary fin_encoding of ℕ in Γ'. -/
def finEncodingNatΓ' : FinEncoding ℕ 
goal: Computability.FinEncoding ℕ

full_name: Computability.unaryEncodeNat
code: /-- A unary encoding function of ℕ in bool. -/
def unaryEncodeNat : Nat → List Bool
  
goal: ℕ → List Bool

full_name: Computability.unaryDecodeNat
code: /-- A unary decoding function from `List Bool` to ℕ. -/
def unaryDecodeNat : List Bool → Nat 
goal: List Bool → ℕ

full_name: Computability.unary_decode_encode_nat
code: theorem unary_decode_encode_nat : ∀ n, unaryDecodeNat (unaryEncodeNat n) = n 
goal: Computability.unaryDecodeNat (Computability.unaryEncodeNat n) = n

full_name: Computability.unaryFinEncodingNat
code: /-- A unary fin_encoding of ℕ. -/
def unaryFinEncodingNat : FinEncoding ℕ 
goal: Computability.FinEncoding ℕ

full_name: Computability.encodeBool
code: /-- An encoding function of bool in bool. -/
def encodeBool : Bool → List Bool 
goal: Bool → List Bool

full_name: Computability.decodeBool
code: /-- A decoding function from `List Bool` to bool. -/
def decodeBool : List Bool → Bool
  
goal: List Bool → Bool

full_name: Computability.decode_encodeBool
code: theorem decode_encodeBool (b : Bool) : decodeBool (encodeBool b) = b 
goal: Computability.decodeBool (Computability.encodeBool b) = b

full_name: Computability.finEncodingBoolBool
code: /-- A fin_encoding of bool in bool. -/
def finEncodingBoolBool : FinEncoding Bool 
goal: Computability.FinEncoding Bool

full_name: Computability.inhabitedFinEncoding
code: instance inhabitedFinEncoding : Inhabited (FinEncoding Bool) 
goal: Inhabited (Computability.FinEncoding Bool)

full_name: Computability.inhabitedEncoding
code: instance inhabitedEncoding : Inhabited (Encoding Bool) 
goal: Inhabited (Computability.Encoding Bool)

full_name: Computability.Encoding.card_le_card_list
code: theorem Encoding.card_le_card_list {α : Type u} (e : Encoding.{u, v} α) :
    Cardinal.lift.{v} #α ≤ Cardinal.lift.{u} #(List e.Γ) 
goal: Cardinal.lift.{v, u} #α ≤ Cardinal.lift.{u, v} #(List e.Γ)

full_name: Computability.Encoding.card_le_aleph0
code: theorem Encoding.card_le_aleph0 {α : Type u} (e : Encoding.{u, v} α) [Countable e.Γ] :
    #α ≤ ℵ₀ 
goal: #α ≤ ℵ₀

full_name: Computability.FinEncoding.card_le_aleph0
code: theorem FinEncoding.card_le_aleph0 {α : Type u} (e : FinEncoding α) : #α ≤ ℵ₀ 
goal: #α ≤ ℵ₀