Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 470ac77

Browse files
committed
feat(category_theory/monad): monadic functor really creates limits (#4931)
Show that a monadic functor `creates_limits`, and a partial result for colimits.
1 parent 9631594 commit 470ac77

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

src/category_theory/monad/limits.lean

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -259,16 +259,36 @@ instance comp_comparison_has_limit
259259
monad.has_limit_of_comp_forget_has_limit (F ⋙ monad.comparison R)
260260

261261
/-- Any monadic functor creates limits. -/
262-
lemma monadic_creates_limits (F : J ⥤ D) (R : D ⥤ C) [monadic_right_adjoint R] [has_limit (F ⋙ R)] :
263-
has_limit F :=
264-
adjunction.has_limit_of_comp_equivalence _ (monad.comparison R)
262+
def monadic_creates_limits (R : D ⥤ C) [monadic_right_adjoint R] :
263+
creates_limits R :=
264+
creates_limits_of_nat_iso (monad.comparison_forget R)
265+
266+
/-- A monadic functor creates any colimits of shapes it preserves. -/
267+
def monadic_creates_colimits_of_shape_of_preserves_colimits_of_shape (R : D ⥤ C)
268+
[monadic_right_adjoint R] [preserves_colimits_of_shape J R] : creates_colimits_of_shape J R :=
269+
begin
270+
have : preserves_colimits_of_shape J (left_adjoint R ⋙ R),
271+
{ apply category_theory.limits.comp_preserves_colimits_of_shape _ _,
272+
{ haveI := adjunction.left_adjoint_preserves_colimits (adjunction.of_right_adjoint R),
273+
apply_instance },
274+
apply_instance },
275+
resetI,
276+
apply creates_colimits_of_shape_of_nat_iso (monad.comparison_forget R),
277+
apply_instance,
278+
end
279+
280+
/-- A monadic functor creates colimits if it preserves colimits. -/
281+
def monadic_creates_colimits_of_preserves_colimits (R : D ⥤ C) [monadic_right_adjoint R]
282+
[preserves_colimits R] : creates_colimits R :=
283+
{ creates_colimits_of_shape := λ J 𝒥₁,
284+
by exactI monadic_creates_colimits_of_shape_of_preserves_colimits_of_shape _ }
265285

266286
section
267287

268-
/-- If C has limits then any reflective subcategory has limits -/
288+
/-- If C has limits then any reflective subcategory has limits. -/
269289
lemma has_limits_of_reflective (R : D ⥤ C) [has_limits C] [reflective R] : has_limits D :=
270-
{ has_limits_of_shape := λ J 𝒥, by exactI
271-
{ has_limit := λ F, monadic_creates_limits F R } }
290+
{ has_limits_of_shape := λ J 𝒥, by have := monadic_creates_limits R; exactI
291+
{ has_limit := λ F, has_limit_of_created F R } }
272292

273293
end
274294
end category_theory

0 commit comments

Comments
 (0)