Limits and colimits in the category of algebras #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file shows that the forgetful functor forget T : algebra T ⥤ C
for a monad T : C ⥤ C
creates limits and creates any colimits which T
preserves.
This is used to show that algebra T
has any limits which C
has, and any colimits which C
has
and T
preserves.
This is generalised to the case of a monadic functor D ⥤ C
.
TODO #
Dualise for the category of coalgebras and comonadic left adjoints.
(Impl) The natural transformation used to define the new cone
Equations
- category_theory.monad.forget_creates_limits.γ D = {app := λ (j : J), (D.obj j).a, naturality' := _}
(Impl) This new cone is used to construct the algebra structure
Equations
The algebra structure which will be the apex of the new limit cone for D
.
Equations
- category_theory.monad.forget_creates_limits.cone_point D c t = {A := c.X, a := t.lift (category_theory.monad.forget_creates_limits.new_cone D c), unit' := _, assoc' := _}
(Impl) Construct the lifted cone in algebra T
which will be limiting.
Equations
- category_theory.monad.forget_creates_limits.lifted_cone D c t = {X := category_theory.monad.forget_creates_limits.cone_point D c t, π := {app := λ (j : J), {f := c.π.app j, h' := _}, naturality' := _}}
(Impl) Prove that the lifted cone is limiting.
The forgetful functor from the Eilenberg-Moore category creates limits.
Equations
- category_theory.monad.forget_creates_limits = {creates_limits_of_shape := λ (J : Type u_2) (𝒥 : category_theory.category J), {creates_limit := λ (D : J ⥤ T.algebra), category_theory.creates_limit_of_reflects_iso (λ (c : category_theory.limits.cone (D ⋙ T.forget)) (t : category_theory.limits.is_limit c), {to_liftable_cone := {lifted_cone := category_theory.monad.forget_creates_limits.lifted_cone D c t, valid_lift := category_theory.limits.cones.ext (category_theory.iso.refl (T.forget.map_cone (category_theory.monad.forget_creates_limits.lifted_cone D c t)).X) _}, makes_limit := category_theory.monad.forget_creates_limits.lifted_cone_is_limit D c t})}}
D ⋙ forget T
has a limit, then D
has a limit.
(Impl)
The natural transformation given by the algebra structure maps, used to construct a cocone c
with
apex colimit (D ⋙ forget T)
.
Equations
- category_theory.monad.forget_creates_colimits.γ = {app := λ (j : J), (D.obj j).a, naturality' := _}
(Impl)
A cocone for the diagram (D ⋙ forget T) ⋙ T
found by composing the natural transformation γ
with the colimiting cocone for D ⋙ forget T
.
Equations
(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.
(Impl) The key property defining the map λ : TL ⟶ L
.
(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.
Equations
- category_theory.monad.forget_creates_colimits.cocone_point c t = {A := c.X, a := category_theory.monad.forget_creates_colimits.lambda c t _inst_3, unit' := _, assoc' := _}
(Impl) Construct the lifted cocone in algebra T
which will be colimiting.
Equations
- category_theory.monad.forget_creates_colimits.lifted_cocone c t = {X := category_theory.monad.forget_creates_colimits.cocone_point c t _inst_4, ι := {app := λ (j : J), {f := c.ι.app j, h' := _}, naturality' := _}}
(Impl) Prove that the lifted cocone is colimiting.
Equations
- category_theory.monad.forget_creates_colimits.lifted_cocone_is_colimit c t = {desc := λ (s : category_theory.limits.cocone D), {f := t.desc (T.forget.map_cocone s), h' := _}, fac' := _, uniq' := _}
The forgetful functor from the Eilenberg-Moore category for a monad creates any colimit which the monad itself preserves.
Equations
- category_theory.monad.forget_creates_colimit D = category_theory.creates_colimit_of_reflects_iso (λ (c : category_theory.limits.cocone (D ⋙ T.forget)) (t : category_theory.limits.is_colimit c), {to_liftable_cocone := {lifted_cocone := {X := category_theory.monad.forget_creates_colimits.cocone_point c t _inst_4, ι := {app := λ (j : J), {f := c.ι.app j, h' := _}, naturality' := _}}, valid_lift := category_theory.limits.cocones.ext (category_theory.iso.refl (T.forget.map_cocone {X := category_theory.monad.forget_creates_colimits.cocone_point c t _inst_4, ι := {app := λ (j : J), {f := c.ι.app j, h' := _}, naturality' := _}}).X) _}, makes_colimit := category_theory.monad.forget_creates_colimits.lifted_cocone_is_colimit c t _inst_4})
Equations
Equations
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
.
Any monadic functor creates limits.
The forgetful functor from the Eilenberg-Moore category for a monad creates any colimit which the monad itself preserves.
A monadic functor creates any colimits of shapes it preserves.
A monadic functor creates colimits if it preserves colimits.
If C
has limits of shape J
then any reflective subcategory has limits of shape J
.
If C
has limits then any reflective subcategory has limits.
If C
has colimits of shape J
then any reflective subcategory has colimits of shape J
.
If C
has colimits then any reflective subcategory has colimits.
The reflector always preserves terminal objects. Note this in general doesn't apply to any other limit.
Equations
- category_theory.left_adjoint_preserves_terminal_of_reflective R = {preserves_limit := λ (K : category_theory.discrete pempty ⥤ C), let F : category_theory.discrete pempty ⥤ D := category_theory.functor.empty D in category_theory.limits.preserves_limit_of_iso_diagram (category_theory.left_adjoint R) ((F ⋙ R).empty_ext K)}