Skip to content

Commit 2ea340b

Browse files
committed
feat: localization of adjunctions between categories (#6235)
This PR shows that under suitable assumptions, adjunctions can be localized. Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
1 parent 0cacd20 commit 2ea340b

2 files changed

Lines changed: 126 additions & 0 deletions

File tree

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,6 +1044,7 @@ import Mathlib.CategoryTheory.Linear.Basic
10441044
import Mathlib.CategoryTheory.Linear.FunctorCategory
10451045
import Mathlib.CategoryTheory.Linear.LinearFunctor
10461046
import Mathlib.CategoryTheory.Linear.Yoneda
1047+
import Mathlib.CategoryTheory.Localization.Adjunction
10471048
import Mathlib.CategoryTheory.Localization.Construction
10481049
import Mathlib.CategoryTheory.Localization.Equivalence
10491050
import Mathlib.CategoryTheory.Localization.Opposite
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
/-
2+
Copyright (c) 2023 Joël Riou. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Joël Riou
5+
-/
6+
import Mathlib.CategoryTheory.CatCommSq
7+
import Mathlib.CategoryTheory.Localization.Predicate
8+
9+
/-!
10+
# Localization of adjunctions
11+
12+
In this file, we show that if we have an adjunction `adj : G ⊣ F` such that both
13+
functors `G : C₁ ⥤ C₂` and `F : C₂ ⥤ C₁` induce functors
14+
`G' : D₁ ⥤ D₂` and `F' : D₂ ⥤ D₁` on localized categories, i.e. that we
15+
have localization functors `L₁ : C₁ ⥤ D₁` and `L₂ : C₂ ⥤ D₂` with respect
16+
to morphism properties `W₁` and `W₂` respectively, and 2-commutative diagrams
17+
`[CatCommSq G L₁ L₂ G']` and `[CatCommSq F L₂ L₁ F']`, then we have an
18+
induced adjunction `adj.localization L₁ W₁ L₂ W₂ G' F' : G' ⊣ F'`.
19+
20+
-/
21+
22+
namespace CategoryTheory
23+
24+
open Localization Category
25+
26+
variable {C₁ C₂ D₁ D₂ : Type _} [Category C₁] [Category C₂] [Category D₁] [Category D₂]
27+
{G : C₁ ⥤ C₂} {F : C₂ ⥤ C₁} (adj : G ⊣ F)
28+
(L₁ : C₁ ⥤ D₁) (W₁ : MorphismProperty C₁) [L₁.IsLocalization W₁]
29+
(L₂ : C₂ ⥤ D₂) (W₂ : MorphismProperty C₂) [L₂.IsLocalization W₂]
30+
(G' : D₁ ⥤ D₂) (F' : D₂ ⥤ D₁)
31+
[CatCommSq G L₁ L₂ G'] [CatCommSq F L₂ L₁ F']
32+
33+
namespace Adjunction
34+
35+
namespace Localization
36+
37+
/-- Auxiliary definition of the unit morphism for the adjunction `Adjunction.localization` -/
38+
noncomputable def ε : 𝟭 D₁ ⟶ G' ⋙ F' := by
39+
letI : Lifting L₁ W₁ ((G ⋙ F) ⋙ L₁) (G' ⋙ F') :=
40+
Lifting.mk (CatCommSq.hComp G F L₁ L₂ L₁ G' F').iso'.symm
41+
exact Localization.liftNatTrans L₁ W₁ L₁ ((G ⋙ F) ⋙ L₁) (𝟭 D₁) (G' ⋙ F')
42+
(whiskerRight adj.unit L₁)
43+
44+
lemma ε_app (X₁ : C₁) :
45+
(ε adj L₁ W₁ L₂ G' F').app (L₁.obj X₁) =
46+
L₁.map (adj.unit.app X₁) ≫ (CatCommSq.iso F L₂ L₁ F').hom.app (G.obj X₁) ≫
47+
F'.map ((CatCommSq.iso G L₁ L₂ G').hom.app X₁) := by
48+
letI : Lifting L₁ W₁ ((G ⋙ F) ⋙ L₁) (G' ⋙ F') :=
49+
Lifting.mk (CatCommSq.hComp G F L₁ L₂ L₁ G' F').iso'.symm
50+
simp only [ε, liftNatTrans_app, Lifting.iso, Iso.symm,
51+
Functor.id_obj, Functor.comp_obj, Lifting.id_iso', Functor.rightUnitor_hom_app,
52+
whiskerRight_app, CatCommSq.hComp_iso'_hom_app, id_comp]
53+
54+
/-- Auxiliary definition of the counit morphism for the adjunction `Adjunction.localization` -/
55+
noncomputable def η : F' ⋙ G' ⟶ 𝟭 D₂ := by
56+
letI : Lifting L₂ W₂ ((F ⋙ G) ⋙ L₂) (F' ⋙ G') :=
57+
Lifting.mk (CatCommSq.hComp F G L₂ L₁ L₂ F' G').iso'.symm
58+
exact liftNatTrans L₂ W₂ ((F ⋙ G) ⋙ L₂) L₂ (F' ⋙ G') (𝟭 D₂) (whiskerRight adj.counit L₂)
59+
60+
lemma η_app (X₂ : C₂) :
61+
(η adj L₁ L₂ W₂ G' F').app (L₂.obj X₂) =
62+
G'.map ((CatCommSq.iso F L₂ L₁ F').inv.app X₂) ≫
63+
(CatCommSq.iso G L₁ L₂ G').inv.app (F.obj X₂) ≫
64+
L₂.map (adj.counit.app X₂) := by
65+
letI : Lifting L₂ W₂ ((F ⋙ G) ⋙ L₂) (F' ⋙ G') :=
66+
Lifting.mk (CatCommSq.hComp F G L₂ L₁ L₂ F' G').iso'.symm
67+
simp only [η, liftNatTrans_app, Lifting.iso, Iso.symm, CatCommSq.hComp_iso'_inv_app,
68+
whiskerRight_app, Lifting.id_iso', Functor.rightUnitor_inv_app, comp_id, assoc]
69+
70+
end Localization
71+
72+
/-- If `adj : G ⊣ F` is an adjunction between two categories `C₁` and `C₂` that
73+
are equipped with localization functors `L₁ : C₁ ⥤ D₁` and `L₂ : C₂ ⥤ D₂` with
74+
respect to `W₁ : MorphismProperty C₁` and `W₂ : MorphismProperty C₂`, and that
75+
the functors `F : C₂ ⥤ C₁` and `G : C₁ ⥤ C₂` induce functors `F' : D₂ ⥤ D₁`
76+
and `G' : D₁ ⥤ D₂` on the localized categories, then the adjunction `adj`
77+
induces an adjunction `G' ⊣ F'`. -/
78+
noncomputable def localization : G' ⊣ F' :=
79+
Adjunction.mkOfUnitCounit
80+
{ unit := Localization.ε adj L₁ W₁ L₂ G' F'
81+
counit := Localization.η adj L₁ L₂ W₂ G' F'
82+
left_triangle := by
83+
apply natTrans_ext L₁ W₁
84+
intro X₁
85+
have eq := congr_app adj.left_triangle X₁
86+
dsimp at eq
87+
rw [NatTrans.comp_app, NatTrans.comp_app, whiskerRight_app, Localization.ε_app,
88+
Functor.associator_hom_app, id_comp, whiskerLeft_app, G'.map_comp, G'.map_comp,
89+
assoc, assoc]
90+
erw [(Localization.η adj L₁ L₂ W₂ G' F').naturality, Localization.η_app,
91+
assoc, assoc, ← G'.map_comp_assoc, ← G'.map_comp_assoc, assoc, Iso.hom_inv_id_app,
92+
comp_id, (CatCommSq.iso G L₁ L₂ G').inv.naturality_assoc, ← L₂.map_comp_assoc, eq,
93+
L₂.map_id, id_comp, Iso.inv_hom_id_app]
94+
rfl
95+
right_triangle := by
96+
apply natTrans_ext L₂ W₂
97+
intro X₂
98+
have eq := congr_app adj.right_triangle X₂
99+
dsimp at eq
100+
rw [NatTrans.comp_app, NatTrans.comp_app, whiskerLeft_app, whiskerRight_app,
101+
Localization.η_app, Functor.associator_inv_app, id_comp, F'.map_comp, F'.map_comp]
102+
erw [← (Localization.ε _ _ _ _ _ _).naturality_assoc, Localization.ε_app,
103+
assoc, assoc, ← F'.map_comp_assoc, Iso.hom_inv_id_app, F'.map_id, id_comp,
104+
← NatTrans.naturality, ← L₁.map_comp_assoc, eq, L₁.map_id, id_comp,
105+
Iso.inv_hom_id_app]
106+
rfl }
107+
108+
@[simp]
109+
lemma localization_unit_app (X₁ : C₁) :
110+
(adj.localization L₁ W₁ L₂ W₂ G' F').unit.app (L₁.obj X₁) =
111+
L₁.map (adj.unit.app X₁) ≫ (CatCommSq.iso F L₂ L₁ F').hom.app (G.obj X₁) ≫
112+
F'.map ((CatCommSq.iso G L₁ L₂ G').hom.app X₁) := by
113+
apply Localization.ε_app
114+
115+
@[simp]
116+
lemma localization_counit_app (X₂ : C₂) :
117+
(adj.localization L₁ W₁ L₂ W₂ G' F').counit.app (L₂.obj X₂) =
118+
G'.map ((CatCommSq.iso F L₂ L₁ F').inv.app X₂) ≫
119+
(CatCommSq.iso G L₁ L₂ G').inv.app (F.obj X₂) ≫
120+
L₂.map (adj.counit.app X₂) := by
121+
apply Localization.η_app
122+
123+
end Adjunction
124+
125+
end CategoryTheory

0 commit comments

Comments
 (0)