File: Mathlib/CategoryTheory/Monad/Limits.lean

full_name: CategoryTheory.Monad.ForgetCreatesLimits.γ_app
code: /-- (Impl) The natural transformation used to define the new cone -/
@[simps]
def γ : D ⋙ T.forget ⋙ ↑T ⟶ D ⋙ T.forget 
goal: (CategoryTheory.Monad.ForgetCreatesLimits.γ D).app j = (D.obj j).a

full_name: CategoryTheory.Monad.ForgetCreatesLimits.γ
code: /-- (Impl) The natural transformation used to define the new cone -/
@[simps]
def γ : D ⋙ T.forget ⋙ ↑T ⟶ D ⋙ T.forget 
goal: D.comp (T.forget.comp T.toFunctor) ⟶ D.comp T.forget

full_name: CategoryTheory.Monad.ForgetCreatesLimits.newCone
code: /-- (Impl) This new cone is used to construct the algebra structure -/
@[simps! π_app]
def newCone : Cone (D ⋙ forget T) 
goal: CategoryTheory.Limits.Cone (D.comp T.forget)

full_name: CategoryTheory.Monad.ForgetCreatesLimits.newCone_π_app
code: /-- (Impl) This new cone is used to construct the algebra structure -/
@[simps! π_app]
def newCone : Cone (D ⋙ forget T) 
goal: (CategoryTheory.Monad.ForgetCreatesLimits.newCone D c).π.app X =
  CategoryTheory.CategoryStruct.comp (T.map (c.π.app X)) (D.obj X).a

full_name: CategoryTheory.Monad.ForgetCreatesLimits.conePoint_A
code: /-- The algebra structure which will be the apex of the new limit cone for `D`. -/
@[simps]
def conePoint : Algebra T 
goal: (CategoryTheory.Monad.ForgetCreatesLimits.conePoint D c t).A = c.pt

full_name: CategoryTheory.Monad.ForgetCreatesLimits.conePoint_a
code: /-- The algebra structure which will be the apex of the new limit cone for `D`. -/
@[simps]
def conePoint : Algebra T 
goal: (CategoryTheory.Monad.ForgetCreatesLimits.conePoint D c t).a =
  t.lift (CategoryTheory.Monad.ForgetCreatesLimits.newCone D c)

full_name: CategoryTheory.Monad.ForgetCreatesLimits.conePoint
code: /-- The algebra structure which will be the apex of the new limit cone for `D`. -/
@[simps]
def conePoint : Algebra T 
goal: T.Algebra

full_name: CategoryTheory.Monad.ForgetCreatesLimits.liftedCone
code: /-- (Impl) Construct the lifted cone in `Algebra T` which will be limiting. -/
@[simps]
def liftedCone : Cone D 
goal: CategoryTheory.Limits.Cone D

full_name: CategoryTheory.Monad.ForgetCreatesLimits.liftedCone_pt
code: /-- (Impl) Construct the lifted cone in `Algebra T` which will be limiting. -/
@[simps]
def liftedCone : Cone D 
goal: (CategoryTheory.Monad.ForgetCreatesLimits.liftedCone D c t).pt =
  CategoryTheory.Monad.ForgetCreatesLimits.conePoint D c t

full_name: CategoryTheory.Monad.ForgetCreatesLimits.liftedCone_π_app_f
code: /-- (Impl) Construct the lifted cone in `Algebra T` which will be limiting. -/
@[simps]
def liftedCone : Cone D 
goal: ((CategoryTheory.Monad.ForgetCreatesLimits.liftedCone D c t).π.app j).f = c.π.app j

full_name: CategoryTheory.Monad.ForgetCreatesLimits.liftedConeIsLimit_lift_f
code: /-- (Impl) Prove that the lifted cone is limiting. -/
@[simps]
def liftedConeIsLimit : IsLimit (liftedCone D c t) 
goal: ((CategoryTheory.Monad.ForgetCreatesLimits.liftedConeIsLimit D c t).lift s).f = t.lift (T.forget.mapCone s)

full_name: CategoryTheory.Monad.ForgetCreatesLimits.liftedConeIsLimit
code: /-- (Impl) Prove that the lifted cone is limiting. -/
@[simps]
def liftedConeIsLimit : IsLimit (liftedCone D c t) 
goal: CategoryTheory.Limits.IsLimit (CategoryTheory.Monad.ForgetCreatesLimits.liftedCone D c t)

full_name: CategoryTheory.Monad.forgetCreatesLimits
code: /-- The forgetful functor from the Eilenberg-Moore category creates limits. -/
noncomputable instance forgetCreatesLimits : CreatesLimitsOfSize (forget T) 
goal: CategoryTheory.CreatesLimitsOfSize.{u_1, u_2, v₁, v₁, max u₁ v₁, u₁} T.forget

full_name: CategoryTheory.Monad.hasLimit_of_comp_forget_hasLimit
code: /-- `D ⋙ forget T` has a limit, then `D` has a limit. -/
theorem hasLimit_of_comp_forget_hasLimit (D : J ⥤ Algebra T) [HasLimit (D ⋙ forget T)] :
    HasLimit D 
goal: CategoryTheory.Limits.HasLimit D

full_name: CategoryTheory.Monad.ForgetCreatesColimits.γ
code: /-- (Impl)
The natural transformation given by the algebra structure maps, used to construct a cocone `c` with
point `colimit (D ⋙ forget T)`.
 -/
@[simps]
def γ : (D ⋙ forget T) ⋙ ↑T ⟶ D ⋙ forget T 
goal: (D.comp T.forget).comp T.toFunctor ⟶ D.comp T.forget

full_name: CategoryTheory.Monad.ForgetCreatesColimits.γ_app
code: /-- (Impl)
The natural transformation given by the algebra structure maps, used to construct a cocone `c` with
point `colimit (D ⋙ forget T)`.
 -/
@[simps]
def γ : (D ⋙ forget T) ⋙ ↑T ⟶ D ⋙ forget T 
goal: CategoryTheory.Monad.ForgetCreatesColimits.γ.app j = (D.obj j).a

full_name: CategoryTheory.Monad.ForgetCreatesColimits.newCocone_pt
code: /-- (Impl)
A cocone for the diagram `(D ⋙ forget T) ⋙ T` found by composing the natural transformation `γ`
with the colimiting cocone for `D ⋙ forget T`.
-/
@[simps]
def newCocone : Cocone ((D ⋙ forget T) ⋙ (T : C ⥤ C)) 
goal: (CategoryTheory.Monad.ForgetCreatesColimits.newCocone c).pt = c.pt

full_name: CategoryTheory.Monad.ForgetCreatesColimits.newCocone_ι
code: /-- (Impl)
A cocone for the diagram `(D ⋙ forget T) ⋙ T` found by composing the natural transformation `γ`
with the colimiting cocone for `D ⋙ forget T`.
-/
@[simps]
def newCocone : Cocone ((D ⋙ forget T) ⋙ (T : C ⥤ C)) 
goal: (CategoryTheory.Monad.ForgetCreatesColimits.newCocone c).ι =
  CategoryTheory.CategoryStruct.comp CategoryTheory.Monad.ForgetCreatesColimits.γ c.ι

full_name: CategoryTheory.Monad.ForgetCreatesColimits.newCocone
code: /-- (Impl)
A cocone for the diagram `(D ⋙ forget T) ⋙ T` found by composing the natural transformation `γ`
with the colimiting cocone for `D ⋙ forget T`.
-/
@[simps]
def newCocone : Cocone ((D ⋙ forget T) ⋙ (T : C ⥤ C)) 
goal: CategoryTheory.Limits.Cocone ((D.comp T.forget).comp T.toFunctor)

full_name: CategoryTheory.Monad.ForgetCreatesColimits.lambda
code: /-- (Impl)
Define the map `λ : TL ⟶ L`, which will serve as the structure of the coalgebra on `L`, and
we will show is the colimiting object. We use the cocone constructed by `c` and the fact that
`T` preserves colimits to produce this morphism.
-/
abbrev lambda : ((T : C ⥤ C).mapCocone c).pt ⟶ c.pt 
goal: (T.mapCocone c).pt ⟶ c.pt

full_name: CategoryTheory.Monad.ForgetCreatesColimits.commuting
code: /-- (Impl) The key property defining the map `λ : TL ⟶ L`. -/
theorem commuting (j : J) : (T : C ⥤ C).map (c.ι.app j) ≫ lambda c t = (D.obj j).a ≫ c.ι.app j 
goal: CategoryTheory.CategoryStruct.comp (T.map (c.ι.app j)) (CategoryTheory.Monad.ForgetCreatesColimits.lambda c t) =
  CategoryTheory.CategoryStruct.comp (D.obj j).a (c.ι.app j)

full_name: CategoryTheory.Monad.ForgetCreatesColimits.coconePoint_A
code: /-- (Impl)
Construct the colimiting algebra from the map `λ : TL ⟶ L` given by `lambda`. We are required to
show it satisfies the two algebra laws, which follow from the algebra laws for the image of `D` and
our `commuting` lemma.
-/
@[simps]
def coconePoint : Algebra T 
goal: (CategoryTheory.Monad.ForgetCreatesColimits.coconePoint c t).A = c.pt

full_name: CategoryTheory.Monad.ForgetCreatesColimits.coconePoint
code: /-- (Impl)
Construct the colimiting algebra from the map `λ : TL ⟶ L` given by `lambda`. We are required to
show it satisfies the two algebra laws, which follow from the algebra laws for the image of `D` and
our `commuting` lemma.
-/
@[simps]
def coconePoint : Algebra T 
goal: T.Algebra

full_name: CategoryTheory.Monad.ForgetCreatesColimits.coconePoint_a
code: /-- (Impl)
Construct the colimiting algebra from the map `λ : TL ⟶ L` given by `lambda`. We are required to
show it satisfies the two algebra laws, which follow from the algebra laws for the image of `D` and
our `commuting` lemma.
-/
@[simps]
def coconePoint : Algebra T 
goal: (CategoryTheory.Monad.ForgetCreatesColimits.coconePoint c t).a = CategoryTheory.Monad.ForgetCreatesColimits.lambda c t

full_name: CategoryTheory.Monad.ForgetCreatesColimits.liftedCocone
code: /-- (Impl) Construct the lifted cocone in `Algebra T` which will be colimiting. -/
@[simps]
def liftedCocone : Cocone D 
goal: CategoryTheory.Limits.Cocone D

full_name: CategoryTheory.Monad.ForgetCreatesColimits.liftedCocone_ι_app_f
code: /-- (Impl) Construct the lifted cocone in `Algebra T` which will be colimiting. -/
@[simps]
def liftedCocone : Cocone D 
goal: ((CategoryTheory.Monad.ForgetCreatesColimits.liftedCocone c t).ι.app j).f = c.ι.app j

full_name: CategoryTheory.Monad.ForgetCreatesColimits.liftedCocone_pt
code: /-- (Impl) Construct the lifted cocone in `Algebra T` which will be colimiting. -/
@[simps]
def liftedCocone : Cocone D 
goal: (CategoryTheory.Monad.ForgetCreatesColimits.liftedCocone c t).pt =
  CategoryTheory.Monad.ForgetCreatesColimits.coconePoint c t

full_name: CategoryTheory.Monad.ForgetCreatesColimits.liftedCoconeIsColimit
code: /-- (Impl) Prove that the lifted cocone is colimiting. -/
@[simps]
def liftedCoconeIsColimit : IsColimit (liftedCocone c t) 
goal: CategoryTheory.Limits.IsColimit (CategoryTheory.Monad.ForgetCreatesColimits.liftedCocone c t)

full_name: CategoryTheory.Monad.ForgetCreatesColimits.liftedCoconeIsColimit_desc_f
code: /-- (Impl) Prove that the lifted cocone is colimiting. -/
@[simps]
def liftedCoconeIsColimit : IsColimit (liftedCocone c t) 
goal: ((CategoryTheory.Monad.ForgetCreatesColimits.liftedCoconeIsColimit c t).desc s).f = t.desc (T.forget.mapCocone s)

full_name: CategoryTheory.Monad.forgetCreatesColimit
code: /-- The forgetful functor from the Eilenberg-Moore category for a monad creates any colimit
which the monad itself preserves.
-/
noncomputable instance forgetCreatesColimit (D : J ⥤ Algebra T)
    [PreservesColimit (D ⋙ forget T) (T : C ⥤ C)]
    [PreservesColimit ((D ⋙ forget T) ⋙ ↑T) (T : C ⥤ C)] : CreatesColimit D (forget T) 
goal: CategoryTheory.CreatesColimit D T.forget

full_name: CategoryTheory.Monad.forgetCreatesColimitsOfShape
code: noncomputable instance forgetCreatesColimitsOfShape [PreservesColimitsOfShape J (T : C ⥤ C)] :
    CreatesColimitsOfShape J (forget T) 
goal: CategoryTheory.CreatesColimitsOfShape J T.forget

full_name: CategoryTheory.Monad.forgetCreatesColimits
code: noncomputable instance forgetCreatesColimits [PreservesColimitsOfSize.{v, u} (T : C ⥤ C)] :
    CreatesColimitsOfSize.{v, u} (forget T) 
goal: CategoryTheory.CreatesColimitsOfSize.{v, u, v₁, v₁, max u₁ v₁, u₁} T.forget

full_name: CategoryTheory.Monad.forget_creates_colimits_of_monad_preserves
code: /-- For `D : J ⥤ Algebra T`, `D ⋙ forget T` has a colimit, then `D` has a colimit provided colimits
of shape `J` are preserved by `T`.
-/
theorem forget_creates_colimits_of_monad_preserves [PreservesColimitsOfShape J (T : C ⥤ C)]
    (D : J ⥤ Algebra T) [HasColimit (D ⋙ forget T)] : HasColimit D 
goal: CategoryTheory.Limits.HasColimit D

full_name: CategoryTheory.comp_comparison_forget_hasLimit
code: instance comp_comparison_forget_hasLimit (F : J ⥤ D) (R : D ⥤ C) [MonadicRightAdjoint R]
    [HasLimit (F ⋙ R)] :
    HasLimit ((F ⋙ Monad.comparison (monadicAdjunction R)) ⋙ Monad.forget _) 
goal: CategoryTheory.Limits.HasLimit
  ((F.comp (CategoryTheory.Monad.comparison (CategoryTheory.monadicAdjunction R))).comp
    (CategoryTheory.monadicAdjunction R).toMonad.forget)

full_name: CategoryTheory.comp_comparison_hasLimit
code: instance comp_comparison_hasLimit (F : J ⥤ D) (R : D ⥤ C) [MonadicRightAdjoint R]
    [HasLimit (F ⋙ R)] : HasLimit (F ⋙ Monad.comparison (monadicAdjunction R)) 
goal: CategoryTheory.Limits.HasLimit (F.comp (CategoryTheory.Monad.comparison (CategoryTheory.monadicAdjunction R)))

full_name: CategoryTheory.monadicCreatesLimits
code: /-- Any monadic functor creates limits. -/
noncomputable def monadicCreatesLimits (R : D ⥤ C) [MonadicRightAdjoint R] :
    CreatesLimitsOfSize.{v, u} R 
goal: CategoryTheory.CreatesLimitsOfSize.{v, u, v₂, v₁, u₂, u₁} R

full_name: CategoryTheory.monadicCreatesColimitOfPreservesColimit
code: /-- The forgetful functor from the Eilenberg-Moore category for a monad creates any colimit
which the monad itself preserves.
-/
noncomputable def monadicCreatesColimitOfPreservesColimit (R : D ⥤ C) (K : J ⥤ D)
    [MonadicRightAdjoint R] [PreservesColimit (K ⋙ R) (monadicLeftAdjoint R ⋙ R)]
    [PreservesColimit ((K ⋙ R) ⋙ monadicLeftAdjoint R ⋙ R) (monadicLeftAdjoint R ⋙ R)] :
      CreatesColimit K R 
goal: CategoryTheory.CreatesColimit K R

full_name: CategoryTheory.monadicCreatesColimitsOfShapeOfPreservesColimitsOfShape
code: /-- A monadic functor creates any colimits of shapes it preserves. -/
noncomputable def monadicCreatesColimitsOfShapeOfPreservesColimitsOfShape (R : D ⥤ C)
    [MonadicRightAdjoint R] [PreservesColimitsOfShape J R] : CreatesColimitsOfShape J R 
goal: CategoryTheory.CreatesColimitsOfShape J R

full_name: CategoryTheory.monadicCreatesColimitsOfPreservesColimits
code: /-- A monadic functor creates colimits if it preserves colimits. -/
noncomputable def monadicCreatesColimitsOfPreservesColimits (R : D ⥤ C) [MonadicRightAdjoint R]
    [PreservesColimitsOfSize.{v, u} R] : CreatesColimitsOfSize.{v, u} R 
goal: CategoryTheory.CreatesColimitsOfSize.{v, u, v₂, v₁, u₂, u₁} R

full_name: CategoryTheory.hasLimit_of_reflective
code: theorem hasLimit_of_reflective (F : J ⥤ D) (R : D ⥤ C) [HasLimit (F ⋙ R)] [Reflective R] :
    HasLimit F 
goal: CategoryTheory.Limits.HasLimit F

full_name: CategoryTheory.hasLimitsOfShape_of_reflective
code: /-- If `C` has limits of shape `J` then any reflective subcategory has limits of shape `J`. -/
theorem hasLimitsOfShape_of_reflective [HasLimitsOfShape J C] (R : D ⥤ C) [Reflective R] :
    HasLimitsOfShape J D 
goal: CategoryTheory.Limits.HasLimitsOfShape J D

full_name: CategoryTheory.hasLimits_of_reflective
code: /-- If `C` has limits then any reflective subcategory has limits. -/
theorem hasLimits_of_reflective (R : D ⥤ C) [HasLimitsOfSize.{v, u} C] [Reflective R] :
    HasLimitsOfSize.{v, u} D 
goal: CategoryTheory.Limits.HasLimitsOfSize.{v, u, v₂, u₂} D

full_name: CategoryTheory.hasColimitsOfShape_of_reflective
code: /-- If `C` has colimits of shape `J` then any reflective subcategory has colimits of shape `J`. -/
theorem hasColimitsOfShape_of_reflective (R : D ⥤ C) [Reflective R] [HasColimitsOfShape J C] :
    HasColimitsOfShape J D 
goal: CategoryTheory.Limits.HasColimitsOfShape J D

full_name: CategoryTheory.hasColimits_of_reflective
code: /-- If `C` has colimits then any reflective subcategory has colimits. -/
theorem hasColimits_of_reflective (R : D ⥤ C) [Reflective R] [HasColimitsOfSize.{v, u} C] :
    HasColimitsOfSize.{v, u} D 
goal: CategoryTheory.Limits.HasColimitsOfSize.{v, u, v₂, u₂} D

full_name: CategoryTheory.leftAdjointPreservesTerminalOfReflective
code: /-- The reflector always preserves terminal objects. Note this in general doesn't apply to any other
limit.
-/
noncomputable def leftAdjointPreservesTerminalOfReflective (R : D ⥤ C) [Reflective R] :
    PreservesLimitsOfShape (Discrete.{v} PEmpty) (monadicLeftAdjoint R) 
goal: CategoryTheory.Limits.PreservesLimitsOfShape (CategoryTheory.Discrete PEmpty.{v + 1})
  (CategoryTheory.monadicLeftAdjoint R)

full_name: CategoryTheory.Comonad.ForgetCreatesColimits'.γ_app
code: /-- (Impl) The natural transformation used to define the new cocone -/
@[simps]
def γ : D ⋙ T.forget ⟶ D ⋙ T.forget ⋙ ↑T  
goal: (CategoryTheory.Comonad.ForgetCreatesColimits'.γ D).app j = (D.obj j).a

full_name: CategoryTheory.Comonad.ForgetCreatesColimits'.γ
code: /-- (Impl) The natural transformation used to define the new cocone -/
@[simps]
def γ : D ⋙ T.forget ⟶ D ⋙ T.forget ⋙ ↑T  
goal: D.comp T.forget ⟶ D.comp (T.forget.comp T.toFunctor)

full_name: CategoryTheory.Comonad.ForgetCreatesColimits'.newCocone_ι_app
code: /-- (Impl) This new cocone is used to construct the coalgebra structure -/
@[simps! ι_app]
def newCocone : Cocone (D ⋙ forget T) 
goal: (CategoryTheory.Comonad.ForgetCreatesColimits'.newCocone D c).ι.app X =
  CategoryTheory.CategoryStruct.comp (D.obj X).a (T.map (c.ι.app X))

full_name: CategoryTheory.Comonad.ForgetCreatesColimits'.newCocone
code: /-- (Impl) This new cocone is used to construct the coalgebra structure -/
@[simps! ι_app]
def newCocone : Cocone (D ⋙ forget T) 
goal: CategoryTheory.Limits.Cocone (D.comp T.forget)

full_name: CategoryTheory.Comonad.ForgetCreatesColimits'.coconePoint_A
code: /-- The coalgebra structure which will be the point of the new colimit cone for `D`. -/
@[simps]
def coconePoint : Coalgebra T 
goal: (CategoryTheory.Comonad.ForgetCreatesColimits'.coconePoint D c t).A = c.pt

full_name: CategoryTheory.Comonad.ForgetCreatesColimits'.coconePoint
code: /-- The coalgebra structure which will be the point of the new colimit cone for `D`. -/
@[simps]
def coconePoint : Coalgebra T 
goal: T.Coalgebra

full_name: CategoryTheory.Comonad.ForgetCreatesColimits'.coconePoint_a
code: /-- The coalgebra structure which will be the point of the new colimit cone for `D`. -/
@[simps]
def coconePoint : Coalgebra T 
goal: (CategoryTheory.Comonad.ForgetCreatesColimits'.coconePoint D c t).a =
  t.desc (CategoryTheory.Comonad.ForgetCreatesColimits'.newCocone D c)

full_name: CategoryTheory.Comonad.ForgetCreatesColimits'.liftedCocone_pt
code: /-- (Impl) Construct the lifted cocone in `Coalgebra T` which will be colimiting. -/
@[simps]
def liftedCocone : Cocone D 
goal: (CategoryTheory.Comonad.ForgetCreatesColimits'.liftedCocone D c t).pt =
  CategoryTheory.Comonad.ForgetCreatesColimits'.coconePoint D c t

full_name: CategoryTheory.Comonad.ForgetCreatesColimits'.liftedCocone_ι_app_f
code: /-- (Impl) Construct the lifted cocone in `Coalgebra T` which will be colimiting. -/
@[simps]
def liftedCocone : Cocone D 
goal: ((CategoryTheory.Comonad.ForgetCreatesColimits'.liftedCocone D c t).ι.app j).f = c.ι.app j

full_name: CategoryTheory.Comonad.ForgetCreatesColimits'.liftedCocone
code: /-- (Impl) Construct the lifted cocone in `Coalgebra T` which will be colimiting. -/
@[simps]
def liftedCocone : Cocone D 
goal: CategoryTheory.Limits.Cocone D

full_name: CategoryTheory.Comonad.ForgetCreatesColimits'.liftedCoconeIsColimit_desc_f
code: /-- (Impl) Prove that the lifted cocone is colimiting. -/
@[simps]
def liftedCoconeIsColimit : IsColimit (liftedCocone D c t) 
goal: ((CategoryTheory.Comonad.ForgetCreatesColimits'.liftedCoconeIsColimit D c t).desc s).f = t.desc (T.forget.mapCocone s)

full_name: CategoryTheory.Comonad.ForgetCreatesColimits'.liftedCoconeIsColimit
code: /-- (Impl) Prove that the lifted cocone is colimiting. -/
@[simps]
def liftedCoconeIsColimit : IsColimit (liftedCocone D c t) 
goal: CategoryTheory.Limits.IsColimit (CategoryTheory.Comonad.ForgetCreatesColimits'.liftedCocone D c t)

full_name: CategoryTheory.Comonad.forgetCreatesColimit
code: /-- The forgetful functor from the Eilenberg-Moore category creates colimits. -/
noncomputable instance forgetCreatesColimit : CreatesColimitsOfSize (forget T) 
goal: CategoryTheory.CreatesColimitsOfSize.{u_1, u_2, v₁, v₁, max u₁ v₁, u₁} T.forget

full_name: CategoryTheory.Comonad.hasColimit_of_comp_forget_hasColimit
code: /-- If `D ⋙ forget T` has a colimit, then `D` has a colimit. -/
theorem hasColimit_of_comp_forget_hasColimit (D : J ⥤ Coalgebra T) [HasColimit (D ⋙ forget T)] :
    HasColimit D 
goal: CategoryTheory.Limits.HasColimit D

full_name: CategoryTheory.Comonad.ForgetCreatesLimits'.γ_app
code: /-- (Impl)
The natural transformation given by the coalgebra structure maps, used to construct a cone `c` with
point `limit (D ⋙ forget T)`.
 -/
@[simps]
def γ : D ⋙ forget T ⟶ (D ⋙ forget T) ⋙ ↑T 
goal: CategoryTheory.Comonad.ForgetCreatesLimits'.γ.app j = (D.obj j).a

full_name: CategoryTheory.Comonad.ForgetCreatesLimits'.γ
code: /-- (Impl)
The natural transformation given by the coalgebra structure maps, used to construct a cone `c` with
point `limit (D ⋙ forget T)`.
 -/
@[simps]
def γ : D ⋙ forget T ⟶ (D ⋙ forget T) ⋙ ↑T 
goal: D.comp T.forget ⟶ (D.comp T.forget).comp T.toFunctor

full_name: CategoryTheory.Comonad.ForgetCreatesLimits'.newCone
code: /-- (Impl)
A cone for the diagram `(D ⋙ forget T) ⋙ T` found by composing the natural transformation `γ`
with the limiting cone for `D ⋙ forget T`.
-/
@[simps]
def newCone : Cone ((D ⋙ forget T) ⋙ (T : C ⥤ C)) 
goal: CategoryTheory.Limits.Cone ((D.comp T.forget).comp T.toFunctor)

full_name: CategoryTheory.Comonad.ForgetCreatesLimits'.newCone_pt
code: /-- (Impl)
A cone for the diagram `(D ⋙ forget T) ⋙ T` found by composing the natural transformation `γ`
with the limiting cone for `D ⋙ forget T`.
-/
@[simps]
def newCone : Cone ((D ⋙ forget T) ⋙ (T : C ⥤ C)) 
goal: (CategoryTheory.Comonad.ForgetCreatesLimits'.newCone c).pt = c.pt

full_name: CategoryTheory.Comonad.ForgetCreatesLimits'.newCone_π
code: /-- (Impl)
A cone for the diagram `(D ⋙ forget T) ⋙ T` found by composing the natural transformation `γ`
with the limiting cone for `D ⋙ forget T`.
-/
@[simps]
def newCone : Cone ((D ⋙ forget T) ⋙ (T : C ⥤ C)) 
goal: (CategoryTheory.Comonad.ForgetCreatesLimits'.newCone c).π =
  CategoryTheory.CategoryStruct.comp c.π CategoryTheory.Comonad.ForgetCreatesLimits'.γ

full_name: CategoryTheory.Comonad.ForgetCreatesLimits'.lambda
code: /-- (Impl)
Define the map `λ : L ⟶ TL`, which will serve as the structure of the algebra on `L`, and
we will show is the limiting object. We use the cone constructed by `c` and the fact that
`T` preserves limits to produce this morphism.
-/
abbrev lambda : c.pt ⟶ ((T : C ⥤ C).mapCone c).pt 
goal: c.pt ⟶ (T.mapCone c).pt

full_name: CategoryTheory.Comonad.ForgetCreatesLimits'.commuting
code: /-- (Impl) The key property defining the map `λ : L ⟶ TL`. -/
theorem commuting (j : J) : lambda c t ≫ (T : C ⥤ C).map (c.π.app j) = c.π.app j ≫ (D.obj j).a 
goal: CategoryTheory.CategoryStruct.comp (CategoryTheory.Comonad.ForgetCreatesLimits'.lambda c t) (T.map (c.π.app j)) =
  CategoryTheory.CategoryStruct.comp (c.π.app j) (D.obj j).a

full_name: CategoryTheory.Comonad.ForgetCreatesLimits'.conePoint_a
code: /-- (Impl)
Construct the limiting coalgebra from the map `λ : L ⟶ TL` given by `lambda`. We are required to
show it satisfies the two coalgebra laws, which follow from the coalgebra laws for the image of `D`
and our `commuting` lemma.
-/
@[simps]
def conePoint : Coalgebra T 
goal: (CategoryTheory.Comonad.ForgetCreatesLimits'.conePoint c t).a = CategoryTheory.Comonad.ForgetCreatesLimits'.lambda c t

full_name: CategoryTheory.Comonad.ForgetCreatesLimits'.conePoint_A
code: /-- (Impl)
Construct the limiting coalgebra from the map `λ : L ⟶ TL` given by `lambda`. We are required to
show it satisfies the two coalgebra laws, which follow from the coalgebra laws for the image of `D`
and our `commuting` lemma.
-/
@[simps]
def conePoint : Coalgebra T 
goal: (CategoryTheory.Comonad.ForgetCreatesLimits'.conePoint c t).A = c.pt

full_name: CategoryTheory.Comonad.ForgetCreatesLimits'.conePoint
code: /-- (Impl)
Construct the limiting coalgebra from the map `λ : L ⟶ TL` given by `lambda`. We are required to
show it satisfies the two coalgebra laws, which follow from the coalgebra laws for the image of `D`
and our `commuting` lemma.
-/
@[simps]
def conePoint : Coalgebra T 
goal: T.Coalgebra

full_name: CategoryTheory.Comonad.ForgetCreatesLimits'.liftedCone_pt
code: /-- (Impl) Construct the lifted cone in `Coalgebra T` which will be limiting. -/
@[simps]
def liftedCone : Cone D 
goal: (CategoryTheory.Comonad.ForgetCreatesLimits'.liftedCone c t).pt =
  CategoryTheory.Comonad.ForgetCreatesLimits'.conePoint c t

full_name: CategoryTheory.Comonad.ForgetCreatesLimits'.liftedCone_π_app_f
code: /-- (Impl) Construct the lifted cone in `Coalgebra T` which will be limiting. -/
@[simps]
def liftedCone : Cone D 
goal: ((CategoryTheory.Comonad.ForgetCreatesLimits'.liftedCone c t).π.app j).f = c.π.app j

full_name: CategoryTheory.Comonad.ForgetCreatesLimits'.liftedCone
code: /-- (Impl) Construct the lifted cone in `Coalgebra T` which will be limiting. -/
@[simps]
def liftedCone : Cone D 
goal: CategoryTheory.Limits.Cone D

full_name: CategoryTheory.Comonad.ForgetCreatesLimits'.liftedConeIsLimit_lift_f
code: /-- (Impl) Prove that the lifted cone is limiting. -/
@[simps]
def liftedConeIsLimit : IsLimit (liftedCone c t) 
goal: ((CategoryTheory.Comonad.ForgetCreatesLimits'.liftedConeIsLimit c t).lift s).f = t.lift (T.forget.mapCone s)

full_name: CategoryTheory.Comonad.ForgetCreatesLimits'.liftedConeIsLimit
code: /-- (Impl) Prove that the lifted cone is limiting. -/
@[simps]
def liftedConeIsLimit : IsLimit (liftedCone c t) 
goal: CategoryTheory.Limits.IsLimit (CategoryTheory.Comonad.ForgetCreatesLimits'.liftedCone c t)

full_name: CategoryTheory.Comonad.forgetCreatesLimit
code: /-- The forgetful functor from the Eilenberg-Moore category for a comonad creates any limit
which the comonad itself preserves.
-/
noncomputable instance forgetCreatesLimit (D : J ⥤ Coalgebra T)
    [PreservesLimit (D ⋙ forget T) (T : C ⥤ C)]
    [PreservesLimit ((D ⋙ forget T) ⋙ ↑T) (T : C ⥤ C)] : CreatesLimit D (forget T) 
goal: CategoryTheory.CreatesLimit D T.forget

full_name: CategoryTheory.Comonad.forgetCreatesLimitsOfShape
code: noncomputable instance forgetCreatesLimitsOfShape [PreservesLimitsOfShape J (T : C ⥤ C)] :
    CreatesLimitsOfShape J (forget T) 
goal: CategoryTheory.CreatesLimitsOfShape J T.forget

full_name: CategoryTheory.Comonad.forgetCreatesLimits
code: noncomputable instance forgetCreatesLimits [PreservesLimitsOfSize.{v, u} (T : C ⥤ C)] :
    CreatesLimitsOfSize.{v, u} (forget T) 
goal: CategoryTheory.CreatesLimitsOfSize.{v, u, v₁, v₁, max u₁ v₁, u₁} T.forget

full_name: CategoryTheory.Comonad.forget_creates_limits_of_comonad_preserves
code: /-- For `D : J ⥤ Coalgebra T`, `D ⋙ forget T` has a limit, then `D` has a limit provided limits
of shape `J` are preserved by `T`.
-/
theorem forget_creates_limits_of_comonad_preserves [PreservesLimitsOfShape J (T : C ⥤ C)]
    (D : J ⥤ Coalgebra T) [HasLimit (D ⋙ forget T)] : HasLimit D 
goal: CategoryTheory.Limits.HasLimit D

full_name: CategoryTheory.comp_comparison_forget_hasColimit
code: instance comp_comparison_forget_hasColimit (F : J ⥤ D) (R : D ⥤ C) [ComonadicLeftAdjoint R]
    [HasColimit (F ⋙ R)] :
    HasColimit ((F ⋙ Comonad.comparison (comonadicAdjunction R)) ⋙ Comonad.forget _) 
goal: CategoryTheory.Limits.HasColimit
  ((F.comp (CategoryTheory.Comonad.comparison (CategoryTheory.comonadicAdjunction R))).comp
    (CategoryTheory.comonadicAdjunction R).toComonad.forget)

full_name: CategoryTheory.comp_comparison_hasColimit
code: instance comp_comparison_hasColimit (F : J ⥤ D) (R : D ⥤ C) [ComonadicLeftAdjoint R]
    [HasColimit (F ⋙ R)] : HasColimit (F ⋙ Comonad.comparison (comonadicAdjunction R)) 
goal: CategoryTheory.Limits.HasColimit (F.comp (CategoryTheory.Comonad.comparison (CategoryTheory.comonadicAdjunction R)))

full_name: CategoryTheory.comonadicCreatesColimits
code: /-- Any comonadic functor creates colimits. -/
noncomputable def comonadicCreatesColimits (R : D ⥤ C) [ComonadicLeftAdjoint R] :
    CreatesColimitsOfSize.{v, u} R 
goal: CategoryTheory.CreatesColimitsOfSize.{v, u, v₂, v₁, u₂, u₁} R

full_name: CategoryTheory.comonadicCreatesLimitOfPreservesLimit
code: /-- The forgetful functor from the Eilenberg-Moore category for a comonad creates any limit
which the comonad itself preserves.
-/
noncomputable def comonadicCreatesLimitOfPreservesLimit (R : D ⥤ C) (K : J ⥤ D)
    [ComonadicLeftAdjoint R] [PreservesLimit (K ⋙ R) (comonadicRightAdjoint R ⋙ R)]
    [PreservesLimit ((K ⋙ R) ⋙ comonadicRightAdjoint R ⋙ R) (comonadicRightAdjoint R ⋙ R)] :
      CreatesLimit K R 
goal: CategoryTheory.CreatesLimit K R

full_name: CategoryTheory.comonadicCreatesLimitsOfShapeOfPreservesLimitsOfShape
code: /-- A comonadic functor creates any limits of shapes it preserves. -/
noncomputable def comonadicCreatesLimitsOfShapeOfPreservesLimitsOfShape (R : D ⥤ C)
    [ComonadicLeftAdjoint R] [PreservesLimitsOfShape J R] : CreatesLimitsOfShape J R 
goal: CategoryTheory.CreatesLimitsOfShape J R

full_name: CategoryTheory.comonadicCreatesLimitsOfPreservesLimits
code: /-- A comonadic functor creates limits if it preserves limits. -/
noncomputable def comonadicCreatesLimitsOfPreservesLimits (R : D ⥤ C) [ComonadicLeftAdjoint R]
    [PreservesLimitsOfSize.{v, u} R] : CreatesLimitsOfSize.{v, u} R 
goal: CategoryTheory.CreatesLimitsOfSize.{v, u, v₂, v₁, u₂, u₁} R

full_name: CategoryTheory.hasColimit_of_coreflective
code: theorem hasColimit_of_coreflective (F : J ⥤ D) (R : D ⥤ C) [HasColimit (F ⋙ R)] [Coreflective R] :
    HasColimit F 
goal: CategoryTheory.Limits.HasColimit F

full_name: CategoryTheory.hasColimitsOfShape_of_coreflective
code: /-- If `C` has colimits of shape `J` then any coreflective subcategory has colimits of shape `J`. -/
theorem hasColimitsOfShape_of_coreflective [HasColimitsOfShape J C] (R : D ⥤ C) [Coreflective R] :
    HasColimitsOfShape J D 
goal: CategoryTheory.Limits.HasColimitsOfShape J D

full_name: CategoryTheory.hasColimits_of_coreflective
code: /-- If `C` has colimits then any coreflective subcategory has colimits. -/
theorem hasColimits_of_coreflective (R : D ⥤ C) [HasColimitsOfSize.{v, u} C] [Coreflective R] :
    HasColimitsOfSize.{v, u} D 
goal: CategoryTheory.Limits.HasColimitsOfSize.{v, u, v₂, u₂} D

full_name: CategoryTheory.hasLimitsOfShape_of_coreflective
code: /-- If `C` has limits of shape `J` then any coreflective subcategory has limits of shape `J`. -/
theorem hasLimitsOfShape_of_coreflective (R : D ⥤ C) [Coreflective R] [HasLimitsOfShape J C] :
    HasLimitsOfShape J D 
goal: CategoryTheory.Limits.HasLimitsOfShape J D

full_name: CategoryTheory.hasLimits_of_coreflective
code: /-- If `C` has limits then any coreflective subcategory has limits. -/
theorem hasLimits_of_coreflective (R : D ⥤ C) [Coreflective R] [HasLimitsOfSize.{v, u} C] :
    HasLimitsOfSize.{v, u} D 
goal: CategoryTheory.Limits.HasLimitsOfSize.{v, u, v₂, u₂} D

full_name: CategoryTheory.rightAdjointPreservesInitialOfCoreflective
code: /-- The coreflector always preserves initial objects. Note this in general doesn't apply to any
other colimit.
-/
noncomputable def rightAdjointPreservesInitialOfCoreflective (R : D ⥤ C) [Coreflective R] :
    PreservesColimitsOfShape (Discrete.{v} PEmpty) (comonadicRightAdjoint R) 
goal: CategoryTheory.Limits.PreservesColimitsOfShape (CategoryTheory.Discrete PEmpty.{v + 1})
  (CategoryTheory.comonadicRightAdjoint R)