Skip to content

Commit 05ddc5f

Browse files
committed
feat(CategoryTheory/Abelian): the inverse image of a Serre class by an exact functor (#22342)
We also define the (essential) image of a property of objects by a functor. `Functor.essImage` is also made an `ObjectProperty` instead of a `Set`. Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
1 parent 77e679b commit 05ddc5f

File tree

14 files changed

+126
-48
lines changed

14 files changed

+126
-48
lines changed

Mathlib/AlgebraicGeometry/AffineScheme.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def AffineScheme.ofHom {X Y : Scheme} [IsAffine X] [IsAffine Y] (f : X ⟶ Y) :
100100
AffineScheme.of X ⟶ AffineScheme.of Y :=
101101
f
102102

103-
theorem mem_Spec_essImage (X : Scheme) : X ∈ Scheme.Spec.essImage ↔ IsAffine X :=
103+
theorem mem_Spec_essImage (X : Scheme) : Scheme.Spec.essImage X ↔ IsAffine X :=
104104
fun h => ⟨Functor.essImage.unit_isIso h⟩,
105105
fun _ => ΓSpec.adjunction.mem_essImage_of_unit_isIso _⟩
106106

Mathlib/CategoryTheory/Abelian/SerreClass/Basic.lean

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,14 @@ and is closed under subobjects, quotients and extensions.
2727
2828
-/
2929

30-
universe v u
30+
universe v v' u u'
3131

3232
namespace CategoryTheory
3333

3434
open Limits ZeroObject
3535

3636
variable {C : Type u} [Category.{v} C] [Abelian C] (P : ObjectProperty C)
37+
{D : Type u'} [Category.{v'} D] [Abelian D]
3738

3839
namespace ObjectProperty
3940

@@ -64,6 +65,10 @@ lemma prop_X₂_of_exact {S : ShortComplex C} (hS : S.Exact)
6465
exact (P.prop_X₂_of_shortExact (hS.shortExact d)
6566
(P.prop_of_epi d.left.f' h₁) (P.prop_of_mono d.right.g' h₃) :)
6667

68+
instance (F : D ⥤ C) [PreservesFiniteLimits F]
69+
[PreservesFiniteColimits F] :
70+
(P.inverseImage F).IsSerreClass where
71+
6772
end ObjectProperty
6873

6974
end CategoryTheory

Mathlib/CategoryTheory/Adjunction/FullyFaithful.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ instance [L.Faithful] [L.Full] {Y : D} : IsIso (R.map (h.counit.app Y)) :=
189189
isIso_of_hom_comp_eq_id _ (h.right_triangle_components Y)
190190

191191
lemma isIso_counit_app_iff_mem_essImage [L.Faithful] [L.Full] {X : D} :
192-
IsIso (h.counit.app X) ↔ X ∈ L.essImage := by
192+
IsIso (h.counit.app X) ↔ L.essImage X := by
193193
constructor
194194
· intro
195195
exact ⟨R.obj X, ⟨asIso (h.counit.app X)⟩⟩
@@ -198,7 +198,7 @@ lemma isIso_counit_app_iff_mem_essImage [L.Faithful] [L.Full] {X : D} :
198198
infer_instance
199199

200200
lemma mem_essImage_of_counit_isIso (A : D)
201-
[IsIso (h.counit.app A)] : A ∈ L.essImage :=
201+
[IsIso (h.counit.app A)] : L.essImage A :=
202202
⟨R.obj A, ⟨asIso (h.counit.app A)⟩⟩
203203

204204
lemma isIso_counit_app_of_iso [L.Faithful] [L.Full] {X : D} {Y : C} (e : X ≅ L.obj Y) :
@@ -212,7 +212,7 @@ instance [R.Faithful] [R.Full] {X : C} : IsIso (L.map (h.unit.app X)) :=
212212
isIso_of_comp_hom_eq_id _ (h.left_triangle_components X)
213213

214214
lemma isIso_unit_app_iff_mem_essImage [R.Faithful] [R.Full] {Y : C} :
215-
IsIso (h.unit.app Y) ↔ Y ∈ R.essImage := by
215+
IsIso (h.unit.app Y) ↔ R.essImage Y := by
216216
constructor
217217
· intro
218218
exact ⟨L.obj Y, ⟨(asIso (h.unit.app Y)).symm⟩⟩
@@ -222,7 +222,7 @@ lemma isIso_unit_app_iff_mem_essImage [R.Faithful] [R.Full] {Y : C} :
222222

223223
/-- If `η_A` is an isomorphism, then `A` is in the essential image of `i`. -/
224224
theorem mem_essImage_of_unit_isIso (A : C)
225-
[IsIso (h.unit.app A)] : A ∈ R.essImage :=
225+
[IsIso (h.unit.app A)] : R.essImage A :=
226226
⟨L.obj A, ⟨(asIso (h.unit.app A)).symm⟩⟩
227227

228228
lemma isIso_unit_app_of_iso [R.Faithful] [R.Full] {X : D} {Y : C} (e : Y ≅ R.obj X) :

Mathlib/CategoryTheory/Adjunction/Reflective.lean

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ reflection of `A`, with the isomorphism as `η_A`.
8080
8181
(For any `B` in the reflective subcategory, we automatically have that `ε_B` is an iso.)
8282
-/
83-
theorem Functor.essImage.unit_isIso [Reflective i] {A : C} (h : A ∈ i.essImage) :
83+
theorem Functor.essImage.unit_isIso [Reflective i] {A : C} (h : i.essImage A) :
8484
IsIso ((reflectorAdjunction i).unit.app A) := by
8585
rwa [isIso_unit_app_iff_mem_essImage]
8686

8787
/-- If `η_A` is a split monomorphism, then `A` is in the reflective subcategory. -/
8888
theorem mem_essImage_of_unit_isSplitMono [Reflective i] {A : C}
89-
[IsSplitMono ((reflectorAdjunction i).unit.app A)] : A ∈ i.essImage := by
89+
[IsSplitMono ((reflectorAdjunction i).unit.app A)] : i.essImage A := by
9090
let η : 𝟭 C ⟶ reflector i ⋙ i := (reflectorAdjunction i).unit
9191
haveI : IsIso (η.app (i.obj ((reflector i).obj A))) :=
9292
Functor.essImage.unit_isIso ((i.obj_mem_essImage _))
@@ -126,7 +126,7 @@ This establishes there is a natural bijection `(A ⟶ B) ≃ (i.obj (L.obj A)
126126
from the point of view of objects in `D`, `A` and `i.obj (L.obj A)` look the same: specifically
127127
that `η.app A` is an isomorphism.
128128
-/
129-
def unitCompPartialBijective [Reflective i] (A : C) {B : C} (hB : B ∈ i.essImage) :
129+
def unitCompPartialBijective [Reflective i] (A : C) {B : C} (hB : i.essImage B) :
130130
(A ⟶ B) ≃ (i.obj ((reflector i).obj A) ⟶ B) :=
131131
calc
132132
(A ⟶ B) ≃ (A ⟶ i.obj (Functor.essImage.witness hB)) := Iso.homCongr (Iso.refl _) hB.getIso.symm
@@ -135,17 +135,17 @@ def unitCompPartialBijective [Reflective i] (A : C) {B : C} (hB : B ∈ i.essIma
135135
Iso.homCongr (Iso.refl _) (Functor.essImage.getIso hB)
136136

137137
@[simp]
138-
theorem unitCompPartialBijective_symm_apply [Reflective i] (A : C) {B : C} (hB : B ∈ i.essImage)
138+
theorem unitCompPartialBijective_symm_apply [Reflective i] (A : C) {B : C} (hB : i.essImage B)
139139
(f) : (unitCompPartialBijective A hB).symm f = (reflectorAdjunction i).unit.app A ≫ f := by
140140
simp [unitCompPartialBijective, unitCompPartialBijectiveAux_symm_apply]
141141

142142
theorem unitCompPartialBijective_symm_natural [Reflective i] (A : C) {B B' : C} (h : B ⟶ B')
143-
(hB : B ∈ i.essImage) (hB' : B' ∈ i.essImage) (f : i.obj ((reflector i).obj A) ⟶ B) :
143+
(hB : i.essImage B) (hB' : i.essImage B') (f : i.obj ((reflector i).obj A) ⟶ B) :
144144
(unitCompPartialBijective A hB').symm (f ≫ h) = (unitCompPartialBijective A hB).symm f ≫ h := by
145145
simp
146146

147147
theorem unitCompPartialBijective_natural [Reflective i] (A : C) {B B' : C} (h : B ⟶ B')
148-
(hB : B ∈ i.essImage) (hB' : B' ∈ i.essImage) (f : A ⟶ B) :
148+
(hB : i.essImage B) (hB' : i.essImage B') (f : A ⟶ B) :
149149
(unitCompPartialBijective A hB') (f ≫ h) = unitCompPartialBijective A hB f ≫ h := by
150150
rw [← Equiv.eq_symm_apply, unitCompPartialBijective_symm_natural A h, Equiv.symm_apply_apply]
151151

@@ -206,12 +206,12 @@ example [Coreflective j] {B : C} : IsIso ((coreflectorAdjunction j).counit.app (
206206

207207
variable {j}
208208

209-
lemma Functor.essImage.counit_isIso [Coreflective j] {A : D} (h : A ∈ j.essImage) :
209+
lemma Functor.essImage.counit_isIso [Coreflective j] {A : D} (h : j.essImage A) :
210210
IsIso ((coreflectorAdjunction j).counit.app A) := by
211211
rwa [isIso_counit_app_iff_mem_essImage]
212212

213213
lemma mem_essImage_of_counit_isSplitEpi [Coreflective j] {A : D}
214-
[IsSplitEpi ((coreflectorAdjunction j).counit.app A)] : A ∈ j.essImage := by
214+
[IsSplitEpi ((coreflectorAdjunction j).counit.app A)] : j.essImage A := by
215215
let ε : coreflector j ⋙ j ⟶ 𝟭 D := (coreflectorAdjunction j).counit
216216
haveI : IsIso (ε.app (j.obj ((coreflector j).obj A))) :=
217217
Functor.essImage.counit_isIso ((j.obj_mem_essImage _))

Mathlib/CategoryTheory/Closed/Ideal.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ variable (i) [ChosenFiniteProducts C] [CartesianClosed C]
4545
`B ∈ D` implies `A ⟹ B ∈ D` for all `A`.
4646
-/
4747
class ExponentialIdeal : Prop where
48-
exp_closed : ∀ {B}, B ∈ i.essImage → ∀ A, (A ⟹ B) ∈ i.essImage
48+
exp_closed : ∀ {B}, i.essImage B → ∀ A, i.essImage (A ⟹ B)
4949
attribute [nolint docBlame] ExponentialIdeal.exp_closed
5050

5151
/-- To show `i` is an exponential ideal it suffices to show that `A ⟹ iB` is "in" `D` for any `A` in
5252
`C` and `B` in `D`.
5353
-/
54-
theorem ExponentialIdeal.mk' (h : ∀ (B : D) (A : C), (A ⟹ i.obj B) ∈ i.essImage) :
54+
theorem ExponentialIdeal.mk' (h : ∀ (B : D) (A : C), i.essImage (A ⟹ i.obj B)) :
5555
ExponentialIdeal i :=
5656
fun hB A => by
5757
rcases hB with ⟨B', ⟨iB'⟩⟩

Mathlib/CategoryTheory/EssentialImage.lean

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Authors: Bhavik Mehta
55
-/
66
import Mathlib.CategoryTheory.NatIso
77
import Mathlib.CategoryTheory.FullSubcategory
8+
import Mathlib.CategoryTheory.ObjectProperty.ClosedUnderIsomorphisms
89

910
/-!
1011
# Essential image of a functor
@@ -37,34 +38,37 @@ isomorphic to an object in the image of the function `F.obj`. In other words, th
3738
under isomorphism of the function `F.obj`.
3839
This is the "non-evil" way of describing the image of a functor.
3940
-/
40-
def essImage (F : C ⥤ D) : Set D := fun Y => ∃ X : C, Nonempty (F.obj X ≅ Y)
41+
def essImage (F : C ⥤ D) : ObjectProperty D := fun Y => ∃ X : C, Nonempty (F.obj X ≅ Y)
4142

4243
/-- Get the witnessing object that `Y` is in the subcategory given by `F`. -/
43-
def essImage.witness {Y : D} (h : Y ∈ F.essImage) : C :=
44+
def essImage.witness {Y : D} (h : F.essImage Y) : C :=
4445
h.choose
4546

4647
/-- Extract the isomorphism between `F.obj h.witness` and `Y` itself. -/
4748
-- Porting note: in the next, the dot notation `h.witness` no longer works
48-
def essImage.getIso {Y : D} (h : Y ∈ F.essImage) : F.obj (essImage.witness h) ≅ Y :=
49+
def essImage.getIso {Y : D} (h : F.essImage Y) : F.obj (essImage.witness h) ≅ Y :=
4950
Classical.choice h.choose_spec
5051

5152
/-- Being in the essential image is a "hygienic" property: it is preserved under isomorphism. -/
52-
theorem essImage.ofIso {Y Y' : D} (h : Y ≅ Y') (hY : Y ∈ essImage F) : Y' ∈ essImage F :=
53+
theorem essImage.ofIso {Y Y' : D} (h : Y ≅ Y') (hY : essImage F Y) : essImage F Y' :=
5354
hY.imp fun _ => Nonempty.map (· ≪≫ h)
5455

56+
instance : F.essImage.IsClosedUnderIsomorphisms where
57+
of_iso e h := essImage.ofIso e h
58+
5559
/-- If `Y` is in the essential image of `F` then it is in the essential image of `F'` as long as
5660
`F ≅ F'`.
5761
-/
58-
theorem essImage.ofNatIso {F' : C ⥤ D} (h : F ≅ F') {Y : D} (hY : Y ∈ essImage F) :
59-
Y ∈ essImage F' :=
62+
theorem essImage.ofNatIso {F' : C ⥤ D} (h : F ≅ F') {Y : D} (hY : essImage F Y) :
63+
essImage F' Y :=
6064
hY.imp fun X => Nonempty.map fun t => h.symm.app X ≪≫ t
6165

6266
/-- Isomorphic functors have equal essential images. -/
6367
theorem essImage_eq_of_natIso {F' : C ⥤ D} (h : F ≅ F') : essImage F = essImage F' :=
6468
funext fun _ => propext ⟨essImage.ofNatIso h, essImage.ofNatIso h.symm⟩
6569

6670
/-- An object in the image is in the essential image. -/
67-
theorem obj_mem_essImage (F : D ⥤ C) (Y : D) : F.obj Y ∈ essImage F :=
71+
theorem obj_mem_essImage (F : D ⥤ C) (Y : D) : essImage F (F.obj Y) :=
6872
⟨Y, ⟨Iso.refl _⟩⟩
6973

7074
/-- The essential image of a functor, interpreted as a full subcategory of the target category. -/
@@ -113,7 +117,7 @@ image of `F`. In other words, for every `Y : D`, there is some `X : C` with `F.o
113117
@[stacks 001C]
114118
class EssSurj (F : C ⥤ D) : Prop where
115119
/-- All the objects of the target category are in the essential image. -/
116-
mem_essImage (Y : D) : Y ∈ F.essImage
120+
mem_essImage (Y : D) : F.essImage Y
117121

118122
instance EssSurj.toEssImage : EssSurj F.toEssImage where
119123
mem_essImage := fun ⟨_, hY⟩ =>

Mathlib/CategoryTheory/ObjectProperty/Basic.lean

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Joël Riou
55
-/
66
import Mathlib.CategoryTheory.Category.Basic
7+
import Mathlib.CategoryTheory.Functor.Basic
8+
import Mathlib.CategoryTheory.Iso
79

810
/-!
911
# Properties of objects in a category
@@ -20,12 +22,37 @@ regarding terms in `ObjectProperty C` when `C` is pretriangulated
2022
2123
-/
2224

23-
universe v u
25+
universe v v' u u'
2426

2527
namespace CategoryTheory
2628

2729
/-- A property of objects in a category `C` is a predicate `C → Prop`. -/
2830
@[nolint unusedArguments]
2931
abbrev ObjectProperty (C : Type u) [Category.{v} C] : Type u := C → Prop
3032

33+
namespace ObjectProperty
34+
35+
variable {C : Type u} {D : Type u'} [Category.{v} C] [Category.{v'} D]
36+
37+
/-- The inverse image of a property of objects by a functor. -/
38+
def inverseImage (P : ObjectProperty D) (F : C ⥤ D) : ObjectProperty C :=
39+
fun X ↦ P (F.obj X)
40+
41+
@[simp]
42+
lemma prop_inverseImage_iff (P : ObjectProperty D) (F : C ⥤ D) (X : C) :
43+
P.inverseImage F X ↔ P (F.obj X) := Iff.rfl
44+
45+
/-- The essential image of a property of objects by a functor. -/
46+
def map (P : ObjectProperty C) (F : C ⥤ D) : ObjectProperty D :=
47+
fun Y ↦ ∃ (X : C), P X ∧ Nonempty (F.obj X ≅ Y)
48+
49+
lemma prop_map_iff (P : ObjectProperty C) (F : C ⥤ D) (Y : D) :
50+
P.map F Y ↔ ∃ (X : C), P X ∧ Nonempty (F.obj X ≅ Y) := Iff.rfl
51+
52+
lemma prop_map_obj (P : ObjectProperty C) (F : C ⥤ D) {X : C} (hX : P X) :
53+
P.map F (F.obj X) :=
54+
⟨X, hX, ⟨Iso.refl _⟩⟩
55+
56+
end ObjectProperty
57+
3158
end CategoryTheory

Mathlib/CategoryTheory/ObjectProperty/ClosedUnderIsomorphisms.lean

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@ this file introduces the type class `P.IsClosedUnderIsomorphisms`.
1414
1515
-/
1616

17+
universe v v' u u'
18+
1719
namespace CategoryTheory
1820

19-
variable {C : Type*} [Category C] (P Q : ObjectProperty C)
21+
variable {C : Type u} [Category.{v} C] {D : Type u'} [Category.{v'} D]
22+
(P Q : ObjectProperty C)
2023

2124
namespace ObjectProperty
2225

@@ -73,6 +76,15 @@ instance : IsClosedUnderIsomorphisms (isoClosure P) where
7376
rintro X Y e ⟨Z, hZ, ⟨f⟩⟩
7477
exact ⟨Z, hZ, ⟨e.symm.trans f⟩⟩
7578

79+
instance (F : C ⥤ D) : IsClosedUnderIsomorphisms (P.map F) where
80+
of_iso := by
81+
rintro _ _ e ⟨X, hX, ⟨e'⟩⟩
82+
exact ⟨X, hX, ⟨e' ≪≫ e⟩⟩
83+
84+
instance (F : D ⥤ C) [P.IsClosedUnderIsomorphisms] :
85+
IsClosedUnderIsomorphisms (P.inverseImage F) where
86+
of_iso e hX := P.prop_of_iso (F.mapIso e) hX
87+
7688
end ObjectProperty
7789

7890
open ObjectProperty

Mathlib/CategoryTheory/ObjectProperty/ContainsZero.lean

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Joël Riou
55
-/
66
import Mathlib.CategoryTheory.ObjectProperty.ClosedUnderIsomorphisms
7-
import Mathlib.CategoryTheory.Limits.Shapes.ZeroObjects
7+
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Zero
88

99
/-!
1010
# Properties of objects which hold for a zero object
@@ -16,13 +16,13 @@ that `P` holds for all zero objects, as in some applications (e.g. triangulated
1616
1717
-/
1818

19-
universe v u
19+
universe v v' u u'
2020

2121
namespace CategoryTheory
2222

2323
open Limits ZeroObject
2424

25-
variable {C : Type u} [Category.{v} C]
25+
variable {C : Type u} [Category.{v} C] {D : Type u'} [Category.{v'} D]
2626

2727
namespace ObjectProperty
2828

@@ -54,6 +54,19 @@ instance [HasZeroObject C] : (⊤ : ObjectProperty C).ContainsZero where
5454
instance [HasZeroObject C] : ContainsZero (IsZero (C := C)) where
5555
exists_zero := ⟨0, isZero_zero C, isZero_zero C⟩
5656

57+
instance [P.ContainsZero] [HasZeroMorphisms C] [HasZeroMorphisms D]
58+
(F : C ⥤ D) [F.PreservesZeroMorphisms] : (P.map F).ContainsZero where
59+
exists_zero := by
60+
obtain ⟨Z, h₁, h₂⟩ := P.exists_prop_of_containsZero
61+
exact ⟨F.obj Z, F.map_isZero h₁, P.prop_map_obj F h₂⟩
62+
63+
instance [P.ContainsZero] [P.IsClosedUnderIsomorphisms]
64+
[HasZeroMorphisms C] [HasZeroMorphisms D]
65+
(F : D ⥤ C) [F.PreservesZeroMorphisms] [HasZeroObject D] :
66+
(P.inverseImage F).ContainsZero where
67+
exists_zero :=
68+
0, isZero_zero D, P.prop_of_isZero (F.map_isZero (isZero_zero D))⟩
69+
5770
end ObjectProperty
5871

5972
end CategoryTheory

Mathlib/CategoryTheory/ObjectProperty/EpiMono.lean

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ that `P` is closed under subobjects (resp. quotients).
1515
1616
-/
1717

18-
universe v u
18+
universe v v' u u'
1919

2020
namespace CategoryTheory
2121

2222
open Limits
2323

24-
variable {C : Type u} [Category.{v} C]
24+
variable {C : Type u} [Category.{v} C] {D : Type u'} [Category.{v'} D]
2525

2626
namespace ObjectProperty
2727

@@ -47,6 +47,10 @@ lemma prop_X₁_of_shortExact [HasZeroMorphisms C] {S : ShortComplex C} (hS : S.
4747
have := hS.mono_f
4848
exact P.prop_of_mono S.f h₂
4949

50+
instance (F : D ⥤ C) [F.PreservesMonomorphisms] :
51+
(P.inverseImage F).IsClosedUnderSubobjects where
52+
prop_of_mono f _ h := P.prop_of_mono (F.map f) h
53+
5054
end
5155

5256
section
@@ -69,6 +73,10 @@ lemma prop_X₃_of_shortExact [HasZeroMorphisms C] {S : ShortComplex C} (hS : S.
6973
have := hS.epi_g
7074
exact P.prop_of_epi S.g h₂
7175

76+
instance (F : D ⥤ C) [F.PreservesEpimorphisms] :
77+
(P.inverseImage F).IsClosedUnderQuotients where
78+
prop_of_epi f _ h := P.prop_of_epi (F.map f) h
79+
7280
end
7381

7482
instance : (⊤ : ObjectProperty C).IsClosedUnderSubobjects where

0 commit comments

Comments
 (0)