@@ -10,9 +10,14 @@ import Mathlib.CategoryTheory.Localization.CalculusOfFractions
1010/-!
1111# The calculus of fractions deduced from an adjunction
1212
13- If `G ⊣ F` is an adjunction, and `F` is fully faithful,
14- then there is a left calculus of fractions for
15- the inverse image by `G` of the class of isomorphisms.
13+ If `G ⊣ F` is an adjunction, `F` is fully faithful,
14+ and `W` is a class of morphisms that is inverted by `G`
15+ and such that the morphism `adj.unit.app X` belongs to `W`
16+ for any object `X`, then `G` is a localization functor
17+ with respect to `W`. Moreover, if `W` is multiplicative,
18+ then `W` has a calculus of left fractions. This
19+ holds in particular if `W` is the inverse image of
20+ the class of isomorphisms by `G`.
1621
1722(The dual statement is also obtained.)
1823
@@ -25,36 +30,97 @@ open MorphismProperty
2530namespace Adjunction
2631
2732variable {C₁ C₂ : Type *} [Category C₁] [Category C₂]
28- {G : C₁ ⥤ C₂} {F : C₂ ⥤ C₁} [F.Full] [F.Faithful]
33+ {G : C₁ ⥤ C₂} {F : C₂ ⥤ C₁}
2934
30- lemma hasLeftCalculusOfFractions (adj : G ⊣ F) :
31- ((isomorphisms C₂).inverseImage G).HasLeftCalculusOfFractions where
35+ lemma hasLeftCalculusOfFractions (adj : G ⊣ F) (W : MorphismProperty C₁)
36+ [W.IsMultiplicative] (hW : W.IsInvertedBy G) (hW' : (W.functorCategory C₁) adj.unit) :
37+ W.HasLeftCalculusOfFractions where
3238 exists_leftFraction X Y φ := by
33- obtain ⟨W, s, _, f, rfl⟩ := φ.cases
34- have : IsIso (G.map s) := by assumption
39+ obtain ⟨T, s, _, f, rfl⟩ := φ.cases
40+ dsimp
41+ have := hW s (by assumption)
3542 exact ⟨{
3643 f := adj.unit.app X ≫ F.map (inv (G.map s)) ≫ F.map (G.map f)
3744 s := adj.unit.app Y
38- hs := by
39- simp only [inverseImage_iff, isomorphisms.iff]
40- infer_instance }, by
45+ hs := hW' Y}, by
4146 have := adj.unit.naturality s
4247 dsimp at this ⊢
4348 rw [reassoc_of% this, Functor.map_inv, IsIso.hom_inv_id_assoc, adj.unit_naturality]⟩
4449 ext X' X Y f₁ f₂ s _ h := by
45- have : IsIso (G.map s) := by assumption
46- refine ⟨_, adj.unit.app Y, ?_, ?_⟩
47- · simp only [inverseImage_iff, isomorphisms.iff]
48- infer_instance
49- · rw [← adj.unit_naturality f₁, ← adj.unit_naturality f₂]
50- congr 2
51- rw [← cancel_epi (G.map s), ← G.map_comp, ← G.map_comp, h]
52-
53- lemma hasRightCalculusOfFractions (adj : F ⊣ G) :
54- ((isomorphisms C₂).inverseImage G).HasRightCalculusOfFractions := by
55- suffices ((isomorphisms C₂).inverseImage G).op.HasLeftCalculusOfFractions from
56- inferInstanceAs ((isomorphisms C₂).inverseImage G).op.unop.HasRightCalculusOfFractions
57- simpa only [← isomorphisms_op] using adj.op.hasLeftCalculusOfFractions
50+ have := hW s (by assumption)
51+ refine ⟨_, adj.unit.app Y, hW' _, ?_⟩
52+ rw [← adj.unit_naturality f₁, ← adj.unit_naturality f₂]
53+ congr 2
54+ rw [← cancel_epi (G.map s), ← G.map_comp, ← G.map_comp, h]
55+
56+ lemma hasRightCalculusOfFractions (adj : F ⊣ G) (W : MorphismProperty C₁)
57+ [W.IsMultiplicative] (hW : W.IsInvertedBy G) (hW' : (W.functorCategory _) adj.counit) :
58+ W.HasRightCalculusOfFractions :=
59+ have := hasLeftCalculusOfFractions adj.op W.op hW.op (fun _ ↦ hW' _)
60+ inferInstanceAs W.op.unop.HasRightCalculusOfFractions
61+
62+ section
63+
64+ variable [F.Full] [F.Faithful]
65+
66+ lemma isLocalization_leftAdjoint
67+ (adj : G ⊣ F) (W : MorphismProperty C₁)
68+ (hW : W.IsInvertedBy G) (hW' : (W.functorCategory C₁) adj.unit) :
69+ G.IsLocalization W := by
70+ let Φ : W.Localization ⥤ C₂ := Localization.lift _ hW W.Q
71+ let e : W.Q ⋙ Φ ≅ G := by apply Localization.fac
72+ have : IsIso (Functor.whiskerRight adj.unit W.Q) := by
73+ rw [NatTrans.isIso_iff_isIso_app]
74+ intro X
75+ exact Localization.inverts W.Q W _ (hW' X)
76+ have : Localization.Lifting W.Q W (G ⋙ F ⋙ W.Q) (Φ ⋙ F ⋙ W.Q) :=
77+ ⟨(Functor.associator _ _ _).symm ≪≫ Functor.isoWhiskerRight e _⟩
78+ exact Functor.IsLocalization.of_equivalence_target W.Q W _
79+ (Equivalence.mk Φ (F ⋙ W.Q)
80+ (Localization.liftNatIso W.Q W W.Q (G ⋙ F ⋙ W.Q) _ _
81+ (W.Q.leftUnitor.symm ≪≫ asIso (Functor.whiskerRight adj.unit W.Q) ≪≫
82+ Functor.associator _ _ _))
83+ (Functor.associator _ _ _ ≪≫ Functor.isoWhiskerLeft _ e ≪≫ asIso adj.counit)) e
84+
85+ lemma isLocalization_rightAdjoint
86+ (adj : F ⊣ G) (W : MorphismProperty C₁)
87+ (hW : W.IsInvertedBy G) (hW' : (W.functorCategory C₁) adj.counit) :
88+ G.IsLocalization W := by
89+ simpa using isLocalization_leftAdjoint adj.op W.op hW.op (fun X ↦ hW' X.unop)
90+
91+ lemma functorCategory_inverseImage_isomorphisms_unit (adj : G ⊣ F) :
92+ ((isomorphisms C₂).inverseImage G).functorCategory C₁ adj.unit := by
93+ intro
94+ simp only [Functor.id_obj, Functor.comp_obj, inverseImage_iff, isomorphisms.iff]
95+ infer_instance
96+
97+ lemma functorCategory_inverseImage_isomorphisms_counit (adj : F ⊣ G) :
98+ ((isomorphisms C₂).inverseImage G).functorCategory C₁ adj.counit := by
99+ intro
100+ simp only [Functor.id_obj, Functor.comp_obj, inverseImage_iff, isomorphisms.iff]
101+ infer_instance
102+
103+ lemma isLocalization_leftAdjoint' (adj : G ⊣ F) :
104+ G.IsLocalization ((isomorphisms C₂).inverseImage G) :=
105+ adj.isLocalization_leftAdjoint _ (fun _ _ _ h ↦ h)
106+ adj.functorCategory_inverseImage_isomorphisms_unit
107+
108+ lemma isLocalization_rightAdjoint' (adj : F ⊣ G) :
109+ G.IsLocalization ((isomorphisms C₂).inverseImage G) :=
110+ adj.isLocalization_rightAdjoint _ (fun _ _ _ h ↦ h)
111+ adj.functorCategory_inverseImage_isomorphisms_counit
112+
113+ lemma hasLeftCalculusOfFractions' (adj : G ⊣ F) :
114+ ((isomorphisms C₂).inverseImage G).HasLeftCalculusOfFractions :=
115+ hasLeftCalculusOfFractions adj _ (fun _ _ _ h ↦ h)
116+ adj.functorCategory_inverseImage_isomorphisms_unit
117+
118+ lemma hasRightCalculusOfFractions' (adj : F ⊣ G) :
119+ ((isomorphisms C₂).inverseImage G).HasRightCalculusOfFractions :=
120+ hasRightCalculusOfFractions adj _ (fun _ _ _ h ↦ h)
121+ adj.functorCategory_inverseImage_isomorphisms_counit
122+
123+ end
58124
59125end Adjunction
60126
0 commit comments