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

Commit 97265f9

Browse files
b-mehtakim-em
andcommitted
feat(category_theory/limits): dualise a limits result (#2940)
Add the dual of `is_limit.of_cone_equiv`. Co-authored-by: Scott Morrison <scott@tqft.net>
1 parent e205228 commit 97265f9

File tree

5 files changed

+50
-13
lines changed

5 files changed

+50
-13
lines changed

src/category_theory/adjunction/basic.lean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ is_right_adjoint.left R
4141
def right_adjoint (L : C ⥤ D) [is_left_adjoint L] : D ⥤ C :=
4242
is_left_adjoint.right L
4343

44+
/-- The adjunction associated to a functor known to be a left adjoint. -/
45+
def adjunction.of_left_adjoint (left : C ⥤ D) [is_left_adjoint left] :
46+
adjunction left (right_adjoint left) :=
47+
is_left_adjoint.adj
48+
/-- The adjunction associated to a functor known to be a right adjoint. -/
49+
def adjunction.of_right_adjoint (right : C ⥤ D) [is_right_adjoint right] :
50+
adjunction (left_adjoint right) right :=
51+
is_right_adjoint.adj
52+
4453
namespace adjunction
4554

4655
restate_axiom hom_equiv_unit'

src/category_theory/limits/cones.lean

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -257,12 +257,12 @@ by { fapply nat_iso.of_components, { intro s, fapply ext, refl, obviously }, obv
257257
def precompose_id : precompose (𝟙 F) ≅ 𝟭 (cocone F) :=
258258
by { fapply nat_iso.of_components, { intro s, fapply ext, refl, obviously }, obviously }
259259

260+
@[simps]
260261
def precompose_equivalence {G : J ⥤ C} (α : G ≅ F) : cocone F ≌ cocone G :=
261-
begin
262-
refine equivalence.mk (precompose α.hom) (precompose α.inv) _ _,
263-
{ symmetry, refine (precompose_comp _ _).symm.trans _, rw [iso.inv_hom_id], exact precompose_id },
264-
{ refine (precompose_comp _ _).symm.trans _, rw [iso.hom_inv_id], exact precompose_id }
265-
end
262+
{ functor := precompose α.hom,
263+
inverse := precompose α.inv,
264+
unit_iso := nat_iso.of_components (λ s, cocones.ext (iso.refl _) (by tidy)) (by tidy),
265+
counit_iso := nat_iso.of_components (λ s, cocones.ext (iso.refl _) (by tidy)) (by tidy) }
266266

267267
section
268268
variable (F)

src/category_theory/limits/limits.lean

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,16 +174,15 @@ def iso_unique_cone_morphism {t : cone F} :
174174
{ lift := λ s, (h s).default.hom,
175175
uniq' := λ s f w, congr_arg cone_morphism.hom ((h s).uniq ⟨f, w⟩) } }
176176

177-
-- TODO: this should actually hold for an adjunction between cone F and cone G, not just for
178-
-- equivalences
179177
/--
180178
Given two functors which have equivalent categories of cones, we can transport a limiting cone across
181179
the equivalence.
182180
-/
183-
def of_cone_equiv {D : Type u'} [category.{v} D] {G : K ⥤ D} (h : cone F ≌ cone G) {c : cone G} (t : is_limit c) :
184-
is_limit (h.inverse.obj c) :=
181+
def of_cone_equiv {D : Type u'} [category.{v} D] {G : K ⥤ D}
182+
(h : cone G ⥤ cone F) [is_right_adjoint h] {c : cone G} (t : is_limit c) :
183+
is_limit (h.obj c) :=
185184
mk_cone_morphism
186-
(λ s, h.to_adjunction.hom_equiv s c (t.lift_cone_morphism _))
185+
(λ s, (adjunction.of_right_adjoint h).hom_equiv s c (t.lift_cone_morphism _))
187186
(λ s m, (adjunction.eq_hom_equiv_apply _ _ _).2 t.uniq_cone_morphism )
188187

189188
namespace of_nat_iso
@@ -396,6 +395,17 @@ def iso_unique_cocone_morphism {t : cocone F} :
396395
{ desc := λ s, (h s).default.hom,
397396
uniq' := λ s f w, congr_arg cocone_morphism.hom ((h s).uniq ⟨f, w⟩) } }
398397

398+
/--
399+
Given two functors which have equivalent categories of cocones, we can transport a limiting cocone
400+
across the equivalence.
401+
-/
402+
def of_cocone_equiv {D : Type u'} [category.{v} D] {G : K ⥤ D}
403+
(h : cocone G ⥤ cocone F) [is_left_adjoint h] {c : cocone G} (t : is_colimit c) :
404+
is_colimit (h.obj c) :=
405+
mk_cocone_morphism
406+
(λ s, ((adjunction.of_left_adjoint h).hom_equiv c s).symm (t.desc_cocone_morphism _))
407+
(λ s m, (adjunction.hom_equiv_apply_eq _ _ _).1 t.uniq_cocone_morphism)
408+
399409
namespace of_nat_iso
400410
variables {X : C} (h : coyoneda.obj (op X) ≅ F.cocones)
401411

src/category_theory/limits/over.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ def has_over_limit_discrete_of_wide_pullback_limit {B : C} {J : Type v} (F : dis
167167
[has_limit (wide_pullback_diagram_of_diagram_over B F)] :
168168
has_limit F :=
169169
{ cone := _,
170-
is_limit := is_limit.of_cone_equiv (cones_equiv B F).symm (limit.is_limit (wide_pullback_diagram_of_diagram_over B F)) }
170+
is_limit := is_limit.of_cone_equiv
171+
(cones_equiv B F).functor (limit.is_limit (wide_pullback_diagram_of_diagram_over B F)) }
171172

172173
/-- Given a wide pullback in `C`, construct a product in `C/B`. -/
173174
def over_product_of_wide_pullback {J : Type v} [has_limits_of_shape.{v} (wide_pullback_shape J) C] {B : C} :

src/category_theory/limits/preserves.lean

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,10 @@ def preserves_limit_of_iso {K₁ K₂ : J ⥤ C} (F : C ⥤ D) (h : K₁ ≅ K
129129
preserves_limit K₂ F :=
130130
{ preserves := λ c t,
131131
begin
132-
have t' := is_limit.of_cone_equiv (cones.postcompose_equivalence h) t,
132+
have t' := is_limit.of_cone_equiv (cones.postcompose_equivalence h).inverse t,
133133
let hF := iso_whisker_right h F,
134-
have := is_limit.of_cone_equiv (cones.postcompose_equivalence hF).symm (preserves_limit.preserves t'),
134+
have := is_limit.of_cone_equiv (cones.postcompose_equivalence hF).functor
135+
(preserves_limit.preserves t'),
135136
apply is_limit.of_iso_limit this,
136137
refine cones.ext (iso.refl _) (λ j, _),
137138
dsimp,
@@ -145,6 +146,22 @@ def preserves_colimit_of_preserves_colimit_cocone {F : C ⥤ D} {t : cocone K}
145146
(h : is_colimit t) (hF : is_colimit (F.map_cocone t)) : preserves_colimit K F :=
146147
⟨λ t' h', is_colimit.of_iso_colimit hF (functor.map_iso _ (is_colimit.unique_up_to_iso h h'))⟩
147148

149+
/-- Transfer preservation of colimits along a natural isomorphism in the shape. -/
150+
def preserves_colimit_of_iso {K₁ K₂ : J ⥤ C} (F : C ⥤ D) (h : K₁ ≅ K₂) [preserves_colimit K₁ F] :
151+
preserves_colimit K₂ F :=
152+
{ preserves := λ c t,
153+
begin
154+
have t' := is_colimit.of_cocone_equiv (cocones.precompose_equivalence h).functor t,
155+
let hF := iso_whisker_right h F,
156+
have := is_colimit.of_cocone_equiv (cocones.precompose_equivalence hF).inverse
157+
(preserves_colimit.preserves t'),
158+
apply is_colimit.of_iso_colimit this,
159+
refine cocones.ext (iso.refl _) (λ j, _),
160+
dsimp,
161+
rw [← F.map_comp],
162+
simp,
163+
end }
164+
148165
/-
149166
A functor F : C → D reflects limits if whenever the image of a cone
150167
under F is a limit cone in D, the cone was already a limit cone in C.

0 commit comments

Comments
 (0)