File: Mathlib/CategoryTheory/SmallObject/Iteration.lean

full_name: CategoryTheory.Functor.Iteration.mapSucc'
code: /-- The map `F.obj ⟨i, _⟩ ⟶ F.obj ⟨wellOrderSucc i, _⟩` when `F : { i // i ≤ j } ⥤ C`
and `i : J` is such that `i < j`. -/
noncomputable abbrev mapSucc' (i : J) (hi : i < j) :
    F.obj ⟨i, hi.le⟩ ⟶ F.obj ⟨wellOrderSucc i, wellOrderSucc_le hi⟩ 
goal: F.obj ⟨i, ⋯⟩ ⟶ F.obj ⟨wellOrderSucc i, ⋯⟩

full_name: CategoryTheory.Functor.Iteration.restrictionLT
code: /-- The functor `{ k // k < i } ⥤ C` obtained by "restriction" of `F : { i // i ≤ j } ⥤ C`
when `i ≤ j`. -/
def restrictionLT : { k // k < i } ⥤ C 
goal: CategoryTheory.Functor { k // k < i } C

full_name: CategoryTheory.Functor.Iteration.restrictionLT_obj
code: @[simp]
lemma restrictionLT_obj (k : J) (hk : k < i) :
    (restrictionLT F hi).obj ⟨k, hk⟩ = F.obj ⟨k, hk.le.trans hi⟩ 
goal: (CategoryTheory.Functor.Iteration.restrictionLT F hi).obj ⟨k, hk⟩ = F.obj ⟨k, ⋯⟩

full_name: CategoryTheory.Functor.Iteration.restrictionLT_map
code: @[simp]
lemma restrictionLT_map {k₁ k₂ : { k // k < i }} (φ : k₁ ⟶ k₂) :
    (restrictionLT F hi).map φ = F.map (homOfLE (by simpa using leOfHom φ)) 
goal: (CategoryTheory.Functor.Iteration.restrictionLT F hi).map φ = F.map (CategoryTheory.homOfLE ⋯)

full_name: CategoryTheory.Functor.Iteration.coconeOfLE
code: /-- Given `F : { i // i ≤ j } ⥤ C`, `i : J` such that `hi : i ≤ j`, this is the
cocone consisting of all maps `F.obj ⟨k, hk⟩ ⟶ F.obj ⟨i, hi⟩` for `k : J` such that `k < i`. -/
@[simps]
def coconeOfLE : Cocone (restrictionLT F hi) 
goal: CategoryTheory.Limits.Cocone (CategoryTheory.Functor.Iteration.restrictionLT F hi)

full_name: CategoryTheory.Functor.Iteration.coconeOfLE_ι_app
code: /-- Given `F : { i // i ≤ j } ⥤ C`, `i : J` such that `hi : i ≤ j`, this is the
cocone consisting of all maps `F.obj ⟨k, hk⟩ ⟶ F.obj ⟨i, hi⟩` for `k : J` such that `k < i`. -/
@[simps]
def coconeOfLE : Cocone (restrictionLT F hi) 
goal: ∀ (x : { k // k < i }),
  (CategoryTheory.Functor.Iteration.coconeOfLE F hi).ι.app x =
    match x with
    | ⟨k, hk⟩ => F.map (CategoryTheory.homOfLE ⋯)

full_name: CategoryTheory.Functor.Iteration.coconeOfLE_pt
code: /-- Given `F : { i // i ≤ j } ⥤ C`, `i : J` such that `hi : i ≤ j`, this is the
cocone consisting of all maps `F.obj ⟨k, hk⟩ ⟶ F.obj ⟨i, hi⟩` for `k : J` such that `k < i`. -/
@[simps]
def coconeOfLE : Cocone (restrictionLT F hi) 
goal: (CategoryTheory.Functor.Iteration.coconeOfLE F hi).pt = F.obj ⟨i, hi⟩

full_name: CategoryTheory.Functor.Iteration
code: /-- The category of `j`th iterations of a functor `Φ` equipped with a natural
transformation `ε : 𝟭 C ⟶ Φ`. An object consists of the data of all iterations
of `Φ` for `i : J` such that `i ≤ j` (this is the field `F`). Such objects are
equipped with data and properties which characterizes the iterations up to a unique
isomorphism for the three types of elements: `⊥`, successors, limit elements. -/
structure Iteration (j : J) where
  /-- The data of all `i`th iterations for `i : J` such that `i ≤ j`. -/
  F : { i // i ≤ j } ⥤ C ⥤ C
  /-- The zeroth iteration is the identity functor. -/
  isoZero : F.obj ⟨⊥, bot_le⟩ ≅ 𝟭 C
  /-- The iteration on a successor element is obtained by composition of
  the previous iteration with `Φ`. -/
  isoSucc (i : J) (hi : i < j) :
    F.obj ⟨wellOrderSucc i, wellOrderSucc_le hi⟩ ≅ F.obj ⟨i, hi.le⟩ ⋙ Φ
  /-- The natural map from an iteration to its successor is induced by `ε`. -/
  mapSucc'_eq (i : J) (hi : i < j) :
    Iteration.mapSucc' F i hi = whiskerLeft _ ε ≫ (isoSucc i hi).inv
  /-- If `i` is a limit element, the `i`th iteration is the colimit
  of `k`th iterations for `k < i`. -/
  isColimit (i : J) [IsWellOrderLimitElement i] (hi : i ≤ j) :
    IsColimit (Iteration.coconeOfLE F hi)
goal: Type (max (max u u_1) u_2)

full_name: CategoryTheory.Functor.Iteration.mapSucc'_eq
code: /-- The category of `j`th iterations of a functor `Φ` equipped with a natural
transformation `ε : 𝟭 C ⟶ Φ`. An object consists of the data of all iterations
of `Φ` for `i : J` such that `i ≤ j` (this is the field `F`). Such objects are
equipped with data and properties which characterizes the iterations up to a unique
isomorphism for the three types of elements: `⊥`, successors, limit elements. -/
structure Iteration (j : J) where
  /-- The data of all `i`th iterations for `i : J` such that `i ≤ j`. -/
  F : { i // i ≤ j } ⥤ C ⥤ C
  /-- The zeroth iteration is the identity functor. -/
  isoZero : F.obj ⟨⊥, bot_le⟩ ≅ 𝟭 C
  /-- The iteration on a successor element is obtained by composition of
  the previous iteration with `Φ`. -/
  isoSucc (i : J) (hi : i < j) :
    F.obj ⟨wellOrderSucc i, wellOrderSucc_le hi⟩ ≅ F.obj ⟨i, hi.le⟩ ⋙ Φ
  /-- The natural map from an iteration to its successor is induced by `ε`. -/
  mapSucc'_eq (i : J) (hi : i < j) :
    Iteration.mapSucc' F i hi = whiskerLeft _ ε ≫ (isoSucc i hi).inv
  /-- If `i` is a limit element, the `i`th iteration is the colimit
  of `k`th iterations for `k < i`. -/
  isColimit (i : J) [IsWellOrderLimitElement i] (hi : i ≤ j) :
    IsColimit (Iteration.coconeOfLE F hi)
goal: CategoryTheory.Functor.Iteration.mapSucc' self.F i hi =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.whiskerLeft (self.F.obj ⟨i, ⋯⟩) ε) (self.isoSucc i hi).inv

full_name: CategoryTheory.Functor.Iteration.isColimit
code: /-- The category of `j`th iterations of a functor `Φ` equipped with a natural
transformation `ε : 𝟭 C ⟶ Φ`. An object consists of the data of all iterations
of `Φ` for `i : J` such that `i ≤ j` (this is the field `F`). Such objects are
equipped with data and properties which characterizes the iterations up to a unique
isomorphism for the three types of elements: `⊥`, successors, limit elements. -/
structure Iteration (j : J) where
  /-- The data of all `i`th iterations for `i : J` such that `i ≤ j`. -/
  F : { i // i ≤ j } ⥤ C ⥤ C
  /-- The zeroth iteration is the identity functor. -/
  isoZero : F.obj ⟨⊥, bot_le⟩ ≅ 𝟭 C
  /-- The iteration on a successor element is obtained by composition of
  the previous iteration with `Φ`. -/
  isoSucc (i : J) (hi : i < j) :
    F.obj ⟨wellOrderSucc i, wellOrderSucc_le hi⟩ ≅ F.obj ⟨i, hi.le⟩ ⋙ Φ
  /-- The natural map from an iteration to its successor is induced by `ε`. -/
  mapSucc'_eq (i : J) (hi : i < j) :
    Iteration.mapSucc' F i hi = whiskerLeft _ ε ≫ (isoSucc i hi).inv
  /-- If `i` is a limit element, the `i`th iteration is the colimit
  of `k`th iterations for `k < i`. -/
  isColimit (i : J) [IsWellOrderLimitElement i] (hi : i ≤ j) :
    IsColimit (Iteration.coconeOfLE F hi)
goal: CategoryTheory.Limits.IsColimit (CategoryTheory.Functor.Iteration.coconeOfLE self.F hi)

full_name: CategoryTheory.Functor.Iteration.isoZero
code: /-- The category of `j`th iterations of a functor `Φ` equipped with a natural
transformation `ε : 𝟭 C ⟶ Φ`. An object consists of the data of all iterations
of `Φ` for `i : J` such that `i ≤ j` (this is the field `F`). Such objects are
equipped with data and properties which characterizes the iterations up to a unique
isomorphism for the three types of elements: `⊥`, successors, limit elements. -/
structure Iteration (j : J) where
  /-- The data of all `i`th iterations for `i : J` such that `i ≤ j`. -/
  F : { i // i ≤ j } ⥤ C ⥤ C
  /-- The zeroth iteration is the identity functor. -/
  isoZero : F.obj ⟨⊥, bot_le⟩ ≅ 𝟭 C
  /-- The iteration on a successor element is obtained by composition of
  the previous iteration with `Φ`. -/
  isoSucc (i : J) (hi : i < j) :
    F.obj ⟨wellOrderSucc i, wellOrderSucc_le hi⟩ ≅ F.obj ⟨i, hi.le⟩ ⋙ Φ
  /-- The natural map from an iteration to its successor is induced by `ε`. -/
  mapSucc'_eq (i : J) (hi : i < j) :
    Iteration.mapSucc' F i hi = whiskerLeft _ ε ≫ (isoSucc i hi).inv
  /-- If `i` is a limit element, the `i`th iteration is the colimit
  of `k`th iterations for `k < i`. -/
  isColimit (i : J) [IsWellOrderLimitElement i] (hi : i ≤ j) :
    IsColimit (Iteration.coconeOfLE F hi)
goal: self.F.obj ⟨⊥, ⋯⟩ ≅ CategoryTheory.Functor.id C

full_name: CategoryTheory.Functor.Iteration.F
code: /-- The category of `j`th iterations of a functor `Φ` equipped with a natural
transformation `ε : 𝟭 C ⟶ Φ`. An object consists of the data of all iterations
of `Φ` for `i : J` such that `i ≤ j` (this is the field `F`). Such objects are
equipped with data and properties which characterizes the iterations up to a unique
isomorphism for the three types of elements: `⊥`, successors, limit elements. -/
structure Iteration (j : J) where
  /-- The data of all `i`th iterations for `i : J` such that `i ≤ j`. -/
  F : { i // i ≤ j } ⥤ C ⥤ C
  /-- The zeroth iteration is the identity functor. -/
  isoZero : F.obj ⟨⊥, bot_le⟩ ≅ 𝟭 C
  /-- The iteration on a successor element is obtained by composition of
  the previous iteration with `Φ`. -/
  isoSucc (i : J) (hi : i < j) :
    F.obj ⟨wellOrderSucc i, wellOrderSucc_le hi⟩ ≅ F.obj ⟨i, hi.le⟩ ⋙ Φ
  /-- The natural map from an iteration to its successor is induced by `ε`. -/
  mapSucc'_eq (i : J) (hi : i < j) :
    Iteration.mapSucc' F i hi = whiskerLeft _ ε ≫ (isoSucc i hi).inv
  /-- If `i` is a limit element, the `i`th iteration is the colimit
  of `k`th iterations for `k < i`. -/
  isColimit (i : J) [IsWellOrderLimitElement i] (hi : i ≤ j) :
    IsColimit (Iteration.coconeOfLE F hi)
goal: CategoryTheory.Functor { i // i ≤ j } (CategoryTheory.Functor C C)

full_name: CategoryTheory.Functor.Iteration.isoSucc
code: /-- The category of `j`th iterations of a functor `Φ` equipped with a natural
transformation `ε : 𝟭 C ⟶ Φ`. An object consists of the data of all iterations
of `Φ` for `i : J` such that `i ≤ j` (this is the field `F`). Such objects are
equipped with data and properties which characterizes the iterations up to a unique
isomorphism for the three types of elements: `⊥`, successors, limit elements. -/
structure Iteration (j : J) where
  /-- The data of all `i`th iterations for `i : J` such that `i ≤ j`. -/
  F : { i // i ≤ j } ⥤ C ⥤ C
  /-- The zeroth iteration is the identity functor. -/
  isoZero : F.obj ⟨⊥, bot_le⟩ ≅ 𝟭 C
  /-- The iteration on a successor element is obtained by composition of
  the previous iteration with `Φ`. -/
  isoSucc (i : J) (hi : i < j) :
    F.obj ⟨wellOrderSucc i, wellOrderSucc_le hi⟩ ≅ F.obj ⟨i, hi.le⟩ ⋙ Φ
  /-- The natural map from an iteration to its successor is induced by `ε`. -/
  mapSucc'_eq (i : J) (hi : i < j) :
    Iteration.mapSucc' F i hi = whiskerLeft _ ε ≫ (isoSucc i hi).inv
  /-- If `i` is a limit element, the `i`th iteration is the colimit
  of `k`th iterations for `k < i`. -/
  isColimit (i : J) [IsWellOrderLimitElement i] (hi : i ≤ j) :
    IsColimit (Iteration.coconeOfLE F hi)
goal: self.F.obj ⟨wellOrderSucc i, ⋯⟩ ≅ (self.F.obj ⟨i, ⋯⟩).comp Φ

full_name: CategoryTheory.Functor.Iteration.mapSucc
code: /-- For `iter : Φ.Iteration.ε j`, this is the map
`iter.F.obj ⟨i, _⟩ ⟶ iter.F.obj ⟨wellOrderSucc i, _⟩` if `i : J` is such that `i < j`. -/
noncomputable abbrev mapSucc (i : J) (hi : i < j) :
    iter.F.obj ⟨i, hi.le⟩ ⟶ iter.F.obj ⟨wellOrderSucc i, wellOrderSucc_le hi⟩ 
goal: iter.F.obj ⟨i, ⋯⟩ ⟶ iter.F.obj ⟨wellOrderSucc i, ⋯⟩

full_name: CategoryTheory.Functor.Iteration.mapSucc_eq
code: lemma mapSucc_eq (i : J) (hi : i < j) :
    iter.mapSucc i hi = whiskerLeft _ ε ≫ (iter.isoSucc i hi).inv 
goal: iter.mapSucc i hi =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.whiskerLeft (iter.F.obj ⟨i, ⋯⟩) ε) (iter.isoSucc i hi).inv

full_name: CategoryTheory.Functor.Iteration.Hom.natTrans_app_succ
code: /-- A morphism between two objects `iter₁` and `iter₂` in the
category `Φ.Iteration ε j` of `j`th iterations of a functor `Φ`
equipped with a natural transformation `ε : 𝟭 C ⟶ Φ` consists of a natural
transformation `natTrans : iter₁.F ⟶ iter₂.F` which is compatible with the
isomorphisms `isoZero` and `isoSucc`. -/
structure Hom where
  /-- A natural transformation `iter₁.F ⟶ iter₂.F` -/
  natTrans : iter₁.F ⟶ iter₂.F
  natTrans_app_zero :
    natTrans.app ⟨⊥, bot_le⟩ = iter₁.isoZero.hom ≫ iter₂.isoZero.inv := by aesop_cat
  natTrans_app_succ (i : J) (hi : i < j) :
    natTrans.app ⟨wellOrderSucc i, wellOrderSucc_le hi⟩ = (iter₁.isoSucc i hi).hom ≫
      whiskerRight (natTrans.app ⟨i, hi.le⟩) _ ≫ (iter₂.isoSucc i hi).inv := by aesop_cat
goal: self.natTrans.app ⟨wellOrderSucc i, ⋯⟩ =
  CategoryTheory.CategoryStruct.comp (iter₁.isoSucc i hi).hom
    (CategoryTheory.CategoryStruct.comp (CategoryTheory.whiskerRight (self.natTrans.app ⟨i, ⋯⟩) Φ)
      (iter₂.isoSucc i hi).inv)

full_name: CategoryTheory.Functor.Iteration.Hom
code: /-- A morphism between two objects `iter₁` and `iter₂` in the
category `Φ.Iteration ε j` of `j`th iterations of a functor `Φ`
equipped with a natural transformation `ε : 𝟭 C ⟶ Φ` consists of a natural
transformation `natTrans : iter₁.F ⟶ iter₂.F` which is compatible with the
isomorphisms `isoZero` and `isoSucc`. -/
structure Hom where
  /-- A natural transformation `iter₁.F ⟶ iter₂.F` -/
  natTrans : iter₁.F ⟶ iter₂.F
  natTrans_app_zero :
    natTrans.app ⟨⊥, bot_le⟩ = iter₁.isoZero.hom ≫ iter₂.isoZero.inv := by aesop_cat
  natTrans_app_succ (i : J) (hi : i < j) :
    natTrans.app ⟨wellOrderSucc i, wellOrderSucc_le hi⟩ = (iter₁.isoSucc i hi).hom ≫
      whiskerRight (natTrans.app ⟨i, hi.le⟩) _ ≫ (iter₂.isoSucc i hi).inv := by aesop_cat
goal: Type (max (max u u_1) u_2)

full_name: CategoryTheory.Functor.Iteration.Hom.natTrans
code: /-- A morphism between two objects `iter₁` and `iter₂` in the
category `Φ.Iteration ε j` of `j`th iterations of a functor `Φ`
equipped with a natural transformation `ε : 𝟭 C ⟶ Φ` consists of a natural
transformation `natTrans : iter₁.F ⟶ iter₂.F` which is compatible with the
isomorphisms `isoZero` and `isoSucc`. -/
structure Hom where
  /-- A natural transformation `iter₁.F ⟶ iter₂.F` -/
  natTrans : iter₁.F ⟶ iter₂.F
  natTrans_app_zero :
    natTrans.app ⟨⊥, bot_le⟩ = iter₁.isoZero.hom ≫ iter₂.isoZero.inv := by aesop_cat
  natTrans_app_succ (i : J) (hi : i < j) :
    natTrans.app ⟨wellOrderSucc i, wellOrderSucc_le hi⟩ = (iter₁.isoSucc i hi).hom ≫
      whiskerRight (natTrans.app ⟨i, hi.le⟩) _ ≫ (iter₂.isoSucc i hi).inv := by aesop_cat
goal: iter₁.F ⟶ iter₂.F

full_name: CategoryTheory.Functor.Iteration.Hom.natTrans_app_zero
code: /-- A morphism between two objects `iter₁` and `iter₂` in the
category `Φ.Iteration ε j` of `j`th iterations of a functor `Φ`
equipped with a natural transformation `ε : 𝟭 C ⟶ Φ` consists of a natural
transformation `natTrans : iter₁.F ⟶ iter₂.F` which is compatible with the
isomorphisms `isoZero` and `isoSucc`. -/
structure Hom where
  /-- A natural transformation `iter₁.F ⟶ iter₂.F` -/
  natTrans : iter₁.F ⟶ iter₂.F
  natTrans_app_zero :
    natTrans.app ⟨⊥, bot_le⟩ = iter₁.isoZero.hom ≫ iter₂.isoZero.inv := by aesop_cat
  natTrans_app_succ (i : J) (hi : i < j) :
    natTrans.app ⟨wellOrderSucc i, wellOrderSucc_le hi⟩ = (iter₁.isoSucc i hi).hom ≫
      whiskerRight (natTrans.app ⟨i, hi.le⟩) _ ≫ (iter₂.isoSucc i hi).inv := by aesop_cat
goal: self.natTrans.app ⟨⊥, ⋯⟩ = CategoryTheory.CategoryStruct.comp iter₁.isoZero.hom iter₂.isoZero.inv

full_name: CategoryTheory.Functor.Iteration.Hom.id_natTrans
code: /-- The identity morphism in the category `Φ.Iteration ε j`. -/
@[simps]
def id : Hom iter₁ iter₁ 
goal: (CategoryTheory.Functor.Iteration.Hom.id iter₁).natTrans = CategoryTheory.CategoryStruct.id iter₁.F

full_name: CategoryTheory.Functor.Iteration.Hom.id
code: /-- The identity morphism in the category `Φ.Iteration ε j`. -/
@[simps]
def id : Hom iter₁ iter₁ 
goal: iter₁.Hom iter₁

full_name: CategoryTheory.Functor.Iteration.Hom.ext'
code: lemma ext' {f g : Hom iter₁ iter₂} (h : f.natTrans = g.natTrans) : f = g 
goal: f = g

full_name: CategoryTheory.Functor.Iteration.Hom.comp
code: /-- The composition of morphisms in the category `Φ.Iteration ε j`. -/
@[simps]
def comp {iter₃ : Iteration ε j} (f : Hom iter₁ iter₂) (g : Hom iter₂ iter₃) :
    Hom iter₁ iter₃ 
goal: iter₁.Hom iter₃

full_name: CategoryTheory.Functor.Iteration.Hom.comp_natTrans
code: /-- The composition of morphisms in the category `Φ.Iteration ε j`. -/
@[simps]
def comp {iter₃ : Iteration ε j} (f : Hom iter₁ iter₂) (g : Hom iter₂ iter₃) :
    Hom iter₁ iter₃ 
goal: (f.comp g).natTrans = CategoryTheory.CategoryStruct.comp f.natTrans g.natTrans

full_name: CategoryTheory.Functor.Iteration.Hom.instCategory
code: instance : Category (Iteration ε j) 
goal: CategoryTheory.Category.{max (max u u_1) u_2, max (max u_2 u_1) u} (CategoryTheory.Functor.Iteration ε j)

full_name: CategoryTheory.Functor.Iteration.Hom.instSubsingletonHom
code: instance : Subsingleton (iter₁ ⟶ iter₂) 
goal: Subsingleton (iter₁ ⟶ iter₂)