Skip to content

Commit 118bff1

Browse files
committed
feat(CategoryTheory): right Bousfield localization (#32469)
This PR dualises definitions and basic results about `ObjectProperty.isLocal` and `MorphismProperty.isLocal`. The dual definitions are named `ObjectProperty.isColocal` and `MorphismProperty.isColocal`.
1 parent b6513d2 commit 118bff1

File tree

6 files changed

+223
-12
lines changed

6 files changed

+223
-12
lines changed

Mathlib/CategoryTheory/Localization/Adjunction.lean

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ Authors: Joël Riou
66
module
77

88
public import Mathlib.CategoryTheory.CatCommSq
9-
public import Mathlib.CategoryTheory.Localization.Predicate
9+
public import Mathlib.CategoryTheory.Localization.Opposite
1010
public import Mathlib.CategoryTheory.Adjunction.FullyFaithful
11+
public import Mathlib.CategoryTheory.Adjunction.Opposites
1112

1213
/-!
1314
# Localization of adjunctions
@@ -149,6 +150,14 @@ lemma isLocalization [F.Full] [F.Faithful] :
149150
apply Functor.IsLocalization.of_equivalence_target W.Q W G e
150151
(Localization.fac G hG W.Q)
151152

153+
include adj in
154+
/-- This is the dual statement to `Adjunction.isLocalization`. -/
155+
lemma isLocalization' [G.Full] [G.Faithful] :
156+
F.IsLocalization ((MorphismProperty.isomorphisms C₁).inverseImage F) := by
157+
rw [← Functor.IsLocalization.op_iff, MorphismProperty.op_inverseImage,
158+
MorphismProperty.op_isomorphisms]
159+
exact adj.op.isLocalization
160+
152161
end Adjunction
153162

154163
end CategoryTheory

Mathlib/CategoryTheory/Localization/Bousfield.lean

Lines changed: 133 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ When `G ⊣ F` is an adjunction with `F : C ⥤ D` fully faithful, then
2525
which then identifies to the inverse image by `G` of the class of
2626
isomorphisms in `C`.
2727
28+
The dual results are also obtained.
29+
2830
## References
2931
3032
* https://ncatlab.org/nlab/show/left+Bousfield+localization+of+model+categories
@@ -121,6 +123,91 @@ lemma galoisConnection_isLocal :
121123

122124
end
123125

126+
/-! ### Right Bousfield localization -/
127+
128+
section
129+
130+
variable (P : ObjectProperty C)
131+
132+
/-- Given `P : ObjectProperty C`, this is the class of morphisms `g : Y ⟶ Z`
133+
such that for all `X : C` such that `P X`, the postcomposition with `g` induces
134+
a bijection `(X ⟶ Y) ≃ (X ⟶ Z)`. (One of the applications of this notion
135+
is the right Bousfield localization of model categories.) -/
136+
def isColocal : MorphismProperty C := fun _ _ g =>
137+
∀ X, P X → Function.Bijective (fun (f : X ⟶ _) => f ≫ g)
138+
139+
variable {P} in
140+
/-- The bijection `(X ⟶ Y) ≃ (X ⟶ Z)` induced by `g : Y ⟶ Z` when `P.isColocal g`
141+
and `P X`. -/
142+
@[simps! apply]
143+
noncomputable def isColocal.homEquiv {Y Z : C} {g : Y ⟶ Z} (hg : P.isColocal g) (X : C) (hX : P X) :
144+
(X ⟶ Y) ≃ (X ⟶ Z) :=
145+
Equiv.ofBijective _ (hg X hX)
146+
147+
lemma isoClosure_isColocal : P.isoClosure.isColocal = P.isColocal := by
148+
ext Y Z g
149+
constructor
150+
· intro hg X hX
151+
exact hg _ (P.le_isoClosure _ hX)
152+
· rintro hg X ⟨X', hX', ⟨e⟩⟩
153+
constructor
154+
· intro f₁ f₂ eq
155+
rw [← cancel_epi e.inv]
156+
apply (hg _ hX').1
157+
simp [eq]
158+
· intro f
159+
obtain ⟨a, h⟩ := (hg _ hX').2 (e.inv ≫ f)
160+
exact ⟨e.hom ≫ a, by simp [h]⟩
161+
162+
instance : P.isColocal.IsMultiplicative where
163+
id_mem _ _ _ := by simpa [id_comp] using Function.bijective_id
164+
comp_mem f g hf hg X hX := by
165+
convert Function.Bijective.comp (hg X hX) (hf X hX)
166+
cat_disch
167+
168+
instance : P.isColocal.HasTwoOutOfThreeProperty where
169+
of_postcomp f g hg hfg X hX := by
170+
rw [← Function.Bijective.of_comp_iff' (hg X hX)]
171+
convert hfg X hX
172+
cat_disch
173+
of_precomp f g hf hfg X hX := by
174+
rw [← Function.Bijective.of_comp_iff _ (hf X hX)]
175+
convert hfg X hX
176+
cat_disch
177+
178+
lemma isColocal_of_isIso {X Y : C} (f : X ⟶ Y) [IsIso f] : P.isColocal f := fun Z _ => by
179+
constructor
180+
· intro g₁ g₂ _
181+
simpa only [← cancel_mono f]
182+
· intro g
183+
exact ⟨g ≫ inv f, by simp⟩
184+
185+
lemma isColocal_iff_isIso {X Y : C} (f : X ⟶ Y) (hX : P X) (hY : P Y) :
186+
P.isColocal f ↔ IsIso f := by
187+
constructor
188+
· intro hf
189+
obtain ⟨g, hg⟩ := (hf _ hY).2 (𝟙 Y)
190+
exact ⟨g, (hf _ hX).1 (by cat_disch), hg⟩
191+
· apply isColocal_of_isIso
192+
193+
instance : P.isColocal.RespectsIso where
194+
precomp f (_ : IsIso f) g hg := P.isColocal.comp_mem f g (isColocal_of_isIso _ f) hg
195+
postcomp f (_ : IsIso f) g hg := P.isColocal.comp_mem g f hg (isColocal_of_isIso _ f)
196+
197+
lemma le_isColocal_iff (P : ObjectProperty C) (W : MorphismProperty C) :
198+
W ≤ P.isColocal ↔ P ≤ W.isColocal :=
199+
fun h _ hZ _ _ _ hf ↦ h _ hf _ hZ,
200+
fun h _ _ _ hf _ hZ ↦ h _ hZ _ hf⟩
201+
202+
lemma galoisConnection_isColocal :
203+
GaloisConnection (OrderDual.toDual ∘ isColocal (C := C))
204+
(MorphismProperty.isColocal ∘ OrderDual.ofDual) :=
205+
le_isColocal_iff
206+
207+
end
208+
209+
/-! ### Bousfield localization and adjunctions -/
210+
124211
section
125212

126213
variable {F : C ⥤ D} {G : D ⥤ C} (adj : G ⊣ F) [F.Full] [F.Faithful]
@@ -135,17 +222,12 @@ lemma isLocal_adj_unit_app (X : D) : isLocal (· ∈ Set.range F.obj) (adj.unit.
135222

136223
lemma isLocal_iff_isIso_map {X Y : D} (f : X ⟶ Y) :
137224
isLocal (· ∈ Set.range F.obj) f ↔ IsIso (G.map f) := by
138-
rw [← (isLocal (· ∈ Set.range F.obj)).postcomp_iff _ _ (isLocal_adj_unit_app adj Y)]
139-
erw [adj.unit.naturality f]
140-
rw [(isLocal (· ∈ Set.range F.obj)).precomp_iff _ _ (isLocal_adj_unit_app adj X),
225+
have := adj.unit.naturality f
226+
dsimp at this
227+
rw [← (isLocal (· ∈ Set.range F.obj)).postcomp_iff _ _ (isLocal_adj_unit_app adj Y),
228+
this, (isLocal (· ∈ Set.range F.obj)).precomp_iff _ _ (isLocal_adj_unit_app adj X),
141229
isLocal_iff_isIso _ _ ⟨_, rfl⟩ ⟨_, rfl⟩]
142-
constructor
143-
· intro h
144-
dsimp at h
145-
exact isIso_of_fully_faithful F (G.map f)
146-
· intro
147-
rw [Functor.comp_map]
148-
infer_instance
230+
exact ⟨fun _ ↦ isIso_of_fully_faithful F (G.map f), fun _ ↦ inferInstance⟩
149231

150232
lemma isLocal_eq_inverseImage_isomorphisms :
151233
isLocal (· ∈ Set.range F.obj) = (MorphismProperty.isomorphisms _).inverseImage G := by
@@ -159,6 +241,39 @@ lemma isLocalization_isLocal : G.IsLocalization (isLocal (· ∈ Set.range F.obj
159241

160242
end
161243

244+
section
245+
246+
variable {F : C ⥤ D} {G : D ⥤ C} (adj : G ⊣ F) [G.Full] [G.Faithful]
247+
include adj
248+
249+
lemma isColocal_adj_counit_app (X : C) : isColocal (· ∈ Set.range G.obj) (adj.counit.app X) := by
250+
rintro _ ⟨Y, rfl⟩
251+
convert ((Functor.FullyFaithful.ofFullyFaithful G).homEquiv.symm.trans
252+
(adj.homEquiv Y X).symm).bijective using 1
253+
dsimp [Adjunction.homEquiv]
254+
cat_disch
255+
256+
lemma isColocal_iff_isIso_map {X Y : C} (f : X ⟶ Y) :
257+
isColocal (· ∈ Set.range G.obj) f ↔ IsIso (F.map f) := by
258+
have := adj.counit.naturality f
259+
dsimp at this
260+
rw [← (isColocal _).precomp_iff _ _ (isColocal_adj_counit_app adj X),
261+
← this, (isColocal _).postcomp_iff _ _ (isColocal_adj_counit_app adj Y),
262+
isColocal_iff_isIso _ _ ⟨_, rfl⟩ ⟨_, rfl⟩]
263+
exact ⟨fun _ ↦ isIso_of_fully_faithful G (F.map f), fun _ ↦ inferInstance⟩
264+
265+
lemma isColocal_eq_inverseImage_isomorphisms :
266+
isColocal (· ∈ Set.range G.obj) = (MorphismProperty.isomorphisms _).inverseImage F := by
267+
ext P₁ P₂ f
268+
rw [isColocal_iff_isIso_map adj]
269+
rfl
270+
271+
lemma isLocalization_isColocal : F.IsLocalization (isColocal (· ∈ Set.range G.obj)) := by
272+
rw [isColocal_eq_inverseImage_isomorphisms adj]
273+
exact adj.isLocalization'
274+
275+
end
276+
162277
end ObjectProperty
163278

164279
open Localization
@@ -171,6 +286,14 @@ lemma MorphismProperty.le_isLocal_isLocal (W : MorphismProperty C) :
171286
W ≤ W.isLocal.isLocal := by
172287
rw [ObjectProperty.le_isLocal_iff]
173288

289+
lemma ObjectProperty.le_isColocal_isColocal (P : ObjectProperty C) :
290+
P ≤ P.isColocal.isColocal := by
291+
rw [← le_isColocal_iff]
292+
293+
lemma MorphismProperty.le_isColocal_isColocal (W : MorphismProperty C) :
294+
W ≤ W.isColocal.isColocal := by
295+
rw [ObjectProperty.le_isColocal_iff]
296+
174297
@[deprecated (since := "2025-11-20")] alias ObjectProperty.le_isLocal_W :=
175298
ObjectProperty.le_isLocal_isLocal
176299
@[deprecated (since := "2025-11-20")] alias MorphismProperty.le_leftBousfieldW_isLocal :=

Mathlib/CategoryTheory/Localization/Opposite.lean

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,13 @@ instance IsLocalization.unop (L : Cᵒᵖ ⥤ Dᵒᵖ) (W : MorphismProperty C
7272
infer_instance)
7373

7474
@[simp]
75-
lemma op_iff (L : C ⥤ D) (W : MorphismProperty C) :
75+
lemma IsLocalization.op_iff (L : C ⥤ D) (W : MorphismProperty C) :
7676
L.op.IsLocalization W.op ↔ L.IsLocalization W :=
7777
fun _ ↦ inferInstanceAs (L.op.unop.IsLocalization W.op.unop),
7878
fun _ ↦ inferInstance⟩
7979

80+
@[deprecated (since := "2025-12-10")] alias op_iff := IsLocalization.op_iff
81+
8082
end Functor
8183

8284
namespace Localization

Mathlib/CategoryTheory/MorphismProperty/Basic.lean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ def inverseImage (P : MorphismProperty D) (F : C ⥤ D) : MorphismProperty C :=
118118
lemma inverseImage_iff (P : MorphismProperty D) (F : C ⥤ D) {X Y : C} (f : X ⟶ Y) :
119119
P.inverseImage F f ↔ P (F.map f) := by rfl
120120

121+
@[simp]
122+
lemma op_inverseImage (P : MorphismProperty D) (F : C ⥤ D) :
123+
(P.inverseImage F).op = P.op.inverseImage F.op := rfl
124+
121125
/-- The (strict) image of a `MorphismProperty C` by a functor `C ⥤ D` -/
122126
inductive strictMap (P : MorphismProperty C) (F : C ⥤ D) : MorphismProperty D where
123127
| map {X Y : C} {f : X ⟶ Y} (hf : P f) : strictMap _ _ (F.map f)
@@ -263,6 +267,11 @@ def monomorphisms : MorphismProperty C := fun _ _ f => Mono f
263267
/-- The `MorphismProperty C` satisfied by epimorphisms in `C`. -/
264268
def epimorphisms : MorphismProperty C := fun _ _ f => Epi f
265269

270+
@[simp]
271+
lemma op_isomorphisms : (isomorphisms C).op = isomorphisms Cᵒᵖ := by
272+
ext
273+
apply isIso_unop_iff
274+
266275
section
267276

268277
variable {C}

Mathlib/CategoryTheory/ObjectProperty/Local.lean

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module
77

88
public import Mathlib.CategoryTheory.ObjectProperty.ClosedUnderIsomorphisms
99
public import Mathlib.CategoryTheory.ObjectProperty.LimitsOfShape
10+
public import Mathlib.CategoryTheory.ObjectProperty.ColimitsOfShape
1011
public import Mathlib.CategoryTheory.MorphismProperty.Basic
1112

1213
/-!
@@ -19,6 +20,8 @@ the precomposition with `f` gives a bijection `(Y ⟶ Z) ≃ (X ⟶ Z)`.
1920
part of a Galois connection, with "dual" construction
2021
`ObjectProperty.isLocal : ObjectProperty C → MorphismProperty C`.)
2122
23+
We also introduce the dual notion `W.isColocal : ObjectProperty C`.
24+
2225
-/
2326

2427
@[expose] public section
@@ -48,12 +51,31 @@ lemma isLocal_iff (Z : C) :
4851
W.isLocal Z ↔ ∀ ⦃X Y : C⦄ (f : X ⟶ Y),
4952
W f → Function.Bijective (fun (g : _ ⟶ Z) ↦ f ≫ g) := Iff.rfl
5053

54+
/-- Given `W : MorphismProperty C`, this is the property of `W`-colocal objects, i.e.
55+
the objects `X` such that for any `g : Y ⟶ Z` such that `W g` holds, the postcomposition
56+
with `g` gives a bijection `(X ⟶ Y) ≃ (X ⟶ Z)`.
57+
(See the file `Mathlib/CategoryTheory/Localization/Bousfield.lean` for the "dual" construction
58+
`ObjectProperty.isColocal : ObjectProperty C → MorphismProperty C`.) -/
59+
def isColocal : ObjectProperty C :=
60+
fun X ↦ ∀ ⦃Y Z : C⦄ (g : Y ⟶ Z),
61+
W g → Function.Bijective (fun (f : X ⟶ _) ↦ f ≫ g)
62+
63+
lemma isColocal_iff (X : C) :
64+
W.isColocal X ↔ ∀ ⦃Y Z : C⦄ (g : Y ⟶ Z),
65+
W g → Function.Bijective (fun (f : X ⟶ Y) ↦ f ≫ g) := Iff.rfl
66+
5167
instance : W.isLocal.IsClosedUnderIsomorphisms where
5268
of_iso {Z Z'} e hZ X Y f hf := by
5369
rw [← Function.Bijective.of_comp_iff _ (Iso.homToEquiv e).bijective]
5470
convert (Iso.homToEquiv e).bijective.comp (hZ f hf) using 1
5571
aesop
5672

73+
instance : W.isColocal.IsClosedUnderIsomorphisms where
74+
of_iso {X X'} e hX Y Z g hg := by
75+
rw [← Function.Bijective.of_comp_iff _ (Iso.homFromEquiv e).bijective]
76+
convert (Iso.homFromEquiv e).bijective.comp (hX g hg) using 1
77+
aesop
78+
5779
instance (J : Type u') [Category.{v'} J] :
5880
W.isLocal.IsClosedUnderLimitsOfShape J where
5981
limitsOfShape_le := fun Z ⟨p⟩ X Y f hf ↦ by
@@ -66,6 +88,18 @@ instance (J : Type u') [Category.{v'} J] :
6688
(by simp [reassoc_of% h, h, p.w a]) }),
6789
p.isLimit.hom_ext (fun j ↦ by simp [p.isLimit.fac, h])⟩
6890

91+
instance (J : Type u') [Category.{v'} J] :
92+
W.isColocal.IsClosedUnderColimitsOfShape J where
93+
colimitsOfShape_le := fun X ⟨p⟩ Y Z g hg ↦ by
94+
refine ⟨fun f₁ f₂ h ↦ p.isColimit.hom_ext
95+
(fun j ↦ (p.prop_diag_obj j g hg).1 (by simp [h])), fun f ↦ ?_⟩
96+
choose app h using fun j ↦ (p.prop_diag_obj j g hg).2 (p.ι.app j ≫ f)
97+
exact ⟨p.isColimit.desc (Cocone.mk _
98+
{ app := app
99+
naturality _ _ a := (p.prop_diag_obj _ g hg).1
100+
(by simp [h]) }),
101+
p.isColimit.hom_ext (fun j ↦ by simp [p.isColimit.fac_assoc, h])⟩
102+
69103
end MorphismProperty
70104

71105
end CategoryTheory

Mathlib/CategoryTheory/Triangulated/Orthogonal.lean

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,23 @@ lemma isLocal_trW [P.IsTriangulated] :
8383
α (hY _ (P.le_shift _ _ hX₃))
8484
exact ⟨β, rfl⟩
8585

86+
lemma isColocal_trW [P.IsTriangulated] :
87+
P.trW.isColocal = P.leftOrthogonal := by
88+
ext X
89+
refine ⟨fun hX Y f hY ↦ ?_, fun hX Y₂ Y₃ h hh ↦ ?_⟩
90+
· exact (hX _ (trW.mk P (contractible_distinguished₂ Y) (P.le_shift _ _ hY))).injective (by simp)
91+
· rw [trW_iff'] at hh
92+
obtain ⟨Y₁, f, g, hT, hY₁⟩ := hh
93+
refine ⟨?_, fun α ↦ ?_⟩
94+
· suffices ∀ (α : X ⟶ Y₂), α ≫ h = 0 → α = 0 from fun α₁ α₂ hα ↦ by
95+
simpa [sub_eq_zero] using this (α₁ - α₂) (by simpa [sub_eq_zero])
96+
intro α hα
97+
obtain ⟨β, rfl⟩ := Triangle.coyoneda_exact₂ _ hT α hα
98+
simp [hX β hY₁]
99+
· obtain ⟨β, rfl⟩ := Triangle.coyoneda_exact₂ _ (rot_of_distTriang _ hT)
100+
α (hX _ (P.le_shift _ _ hY₁))
101+
exact ⟨β, rfl⟩
102+
86103
variable {P} in
87104
lemma rightOrthogonal.map_bijective_of_isTriangulated
88105
[P.IsTriangulated] [IsTriangulated C] {Y : C} (hY : P.rightOrthogonal Y)
@@ -100,6 +117,23 @@ lemma rightOrthogonal.map_bijective_of_isTriangulated
100117
rw [hφ, ← cancel_epi (L.map φ.s), MorphismProperty.RightFraction.map_s_comp_map,
101118
← hα, Functor.map_comp]
102119

120+
variable {P} in
121+
lemma leftOrthogonal.map_bijective_of_isTriangulated
122+
[P.IsTriangulated] [IsTriangulated C] {X : C} (hX : P.leftOrthogonal X)
123+
(L : C ⥤ D) [L.IsLocalization P.trW] (Y : C) :
124+
Function.Bijective (L.map : (X ⟶ Y) → _) := by
125+
rw [← isColocal_trW] at hX
126+
refine ⟨fun f₁ f₂ hf ↦ ?_, fun g ↦ ?_⟩
127+
· rw [MorphismProperty.map_eq_iff_postcomp L P.trW] at hf
128+
obtain ⟨Z, s, hs, eq⟩ := hf
129+
exact (hX _ hs).1 eq
130+
· obtain ⟨φ, hφ⟩ := Localization.exists_leftFraction L P.trW g
131+
have := Localization.inverts L P.trW φ.s φ.hs
132+
obtain ⟨α, hα⟩ := (hX _ φ.hs).2 φ.f
133+
refine ⟨α, ?_⟩
134+
rw [hφ, ← cancel_mono (L.map φ.s), MorphismProperty.LeftFraction.map_comp_map_s,
135+
← hα, Functor.map_comp]
136+
103137
end ObjectProperty
104138

105139
end CategoryTheory

0 commit comments

Comments
 (0)