File: Mathlib/Data/W/Constructions.lean

full_name: WType.Natα.zero
code: /-- The constructors for the naturals -/
inductive Natα : Type
  | zero : Natα
  | succ : Natα
goal: WType.Natα

full_name: WType.Natα.succ
code: /-- The constructors for the naturals -/
inductive Natα : Type
  | zero : Natα
  | succ : Natα
goal: WType.Natα

full_name: WType.Natα
code: /-- The constructors for the naturals -/
inductive Natα : Type
  | zero : Natα
  | succ : Natα
goal: Type

full_name: WType.instInhabitedNatα
code: instance : Inhabited Natα 
goal: Inhabited WType.Natα

full_name: WType.Natβ
code: /-- The arity of the constructors for the naturals, `zero` takes no arguments, `succ` takes one -/
def Natβ : Natα → Type
  
goal: WType.Natα → Type

full_name: WType.instInhabitedNatβSucc
code: instance : Inhabited (Natβ Natα.succ) 
goal: Inhabited (WType.Natβ WType.Natα.succ)

full_name: WType.ofNat
code: /-- The isomorphism from the naturals to its corresponding `WType` -/
@[simp]
def ofNat : ℕ → WType Natβ
  
goal: ℕ → WType WType.Natβ

full_name: WType.toNat
code: /-- The isomorphism from the `WType` of the naturals to the naturals -/
@[simp]
def toNat : WType Natβ → ℕ
  
goal: WType WType.Natβ → ℕ

full_name: WType.leftInverse_nat
code: theorem leftInverse_nat : Function.LeftInverse ofNat toNat
  
goal: Function.LeftInverse WType.ofNat WType.toNat

full_name: WType.rightInverse_nat
code: theorem rightInverse_nat : Function.RightInverse ofNat toNat
  
goal: Function.RightInverse WType.ofNat WType.toNat

full_name: WType.equivNat
code: /-- The naturals are equivalent to their associated `WType` -/
def equivNat : WType Natβ ≃ ℕ 
goal: WType WType.Natβ ≃ ℕ

full_name: WType.NatαEquivPUnitSumPUnit
code: /-- `WType.Natα` is equivalent to `PUnit ⊕ PUnit`.
This is useful when considering the associated polynomial endofunctor.
-/
@[simps]
def NatαEquivPUnitSumPUnit : Natα ≃ PUnit.{u + 1} ⊕ PUnit 
goal: WType.Natα ≃ PUnit.{u + 1} ⊕ PUnit.{u_1 + 1}

full_name: WType.NatαEquivPUnitSumPUnit_apply
code: /-- `WType.Natα` is equivalent to `PUnit ⊕ PUnit`.
This is useful when considering the associated polynomial endofunctor.
-/
@[simps]
def NatαEquivPUnitSumPUnit : Natα ≃ PUnit.{u + 1} ⊕ PUnit 
goal: WType.NatαEquivPUnitSumPUnit c =
  match c with
  | WType.Natα.zero => Sum.inl PUnit.unit
  | WType.Natα.succ => Sum.inr PUnit.unit

full_name: WType.NatαEquivPUnitSumPUnit_symm_apply
code: /-- `WType.Natα` is equivalent to `PUnit ⊕ PUnit`.
This is useful when considering the associated polynomial endofunctor.
-/
@[simps]
def NatαEquivPUnitSumPUnit : Natα ≃ PUnit.{u + 1} ⊕ PUnit 
goal: WType.NatαEquivPUnitSumPUnit.symm b =
  match b with
  | Sum.inl val => WType.Natα.zero
  | Sum.inr val => WType.Natα.succ

full_name: WType.Listα.nil
code: /-- The constructors for lists.
There is "one constructor `cons x` for each `x : γ`",
since we view `List γ` as
```
| nil : List γ
| cons x₀ : List γ → List γ
| cons x₁ : List γ → List γ
|   ⋮      γ many times
```
-/
inductive Listα : Type u
  | nil : Listα
  | cons : γ → Listα
goal: WType.Listα γ

full_name: WType.Listα.cons
code: /-- The constructors for lists.
There is "one constructor `cons x` for each `x : γ`",
since we view `List γ` as
```
| nil : List γ
| cons x₀ : List γ → List γ
| cons x₁ : List γ → List γ
|   ⋮      γ many times
```
-/
inductive Listα : Type u
  | nil : Listα
  | cons : γ → Listα
goal: γ → WType.Listα γ

full_name: WType.Listα
code: /-- The constructors for lists.
There is "one constructor `cons x` for each `x : γ`",
since we view `List γ` as
```
| nil : List γ
| cons x₀ : List γ → List γ
| cons x₁ : List γ → List γ
|   ⋮      γ many times
```
-/
inductive Listα : Type u
  | nil : Listα
  | cons : γ → Listα
goal: Type u

full_name: WType.instInhabitedListα
code: instance : Inhabited (Listα γ) 
goal: Inhabited (WType.Listα γ)

full_name: WType.Listβ
code: /-- The arities of each constructor for lists, `nil` takes no arguments, `cons hd` takes one -/
def Listβ : Listα γ → Type u
  
goal: WType.Listα γ → Type u

full_name: WType.instInhabitedListβCons
code: instance (hd : γ) : Inhabited (Listβ γ (Listα.cons hd)) 
goal: Inhabited (WType.Listβ γ (WType.Listα.cons hd))

full_name: WType.ofList
code: /-- The isomorphism from lists to the `WType` construction of lists -/
@[simp]
def ofList : List γ → WType (Listβ γ)
  
goal: List γ → WType (WType.Listβ γ)

full_name: WType.toList
code: /-- The isomorphism from the `WType` construction of lists to lists -/
@[simp]
def toList : WType (Listβ γ) → List γ
  
goal: WType (WType.Listβ γ) → List γ

full_name: WType.leftInverse_list
code: theorem leftInverse_list : Function.LeftInverse (ofList γ) (toList _)
  
goal: Function.LeftInverse (WType.ofList γ) (WType.toList γ)

full_name: WType.rightInverse_list
code: theorem rightInverse_list : Function.RightInverse (ofList γ) (toList _)
  
goal: Function.RightInverse (WType.ofList γ) (WType.toList γ)

full_name: WType.equivList
code: /-- Lists are equivalent to their associated `WType` -/
def equivList : WType (Listβ γ) ≃ List γ 
goal: WType (WType.Listβ γ) ≃ List γ

full_name: WType.ListαEquivPUnitSum
code: /-- `WType.Listα` is equivalent to `γ` with an extra point.
This is useful when considering the associated polynomial endofunctor
-/
def ListαEquivPUnitSum : Listα γ ≃ PUnit.{v + 1} ⊕ γ 
goal: WType.Listα γ ≃ PUnit.{v + 1} ⊕ γ