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

Commit e542154

Browse files
committed
feat(category_theory/full_subcategory): full_subcategory.map and full_subcategory.lift (#12335)
1 parent 51adf3a commit e542154

File tree

2 files changed

+68
-3
lines changed

2 files changed

+68
-3
lines changed

src/category_theory/full_subcategory.lean

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ form of D. This is used to set up several algebraic categories like
3434

3535
namespace category_theory
3636

37-
universes v u₁ u₂ -- morphism levels before object levels. See note [category_theory universes].
37+
universes v v₂ u₁ u₂ -- morphism levels before object levels. See note [category_theory universes].
3838

3939
section induced
4040

@@ -77,7 +77,7 @@ end induced
7777
section full_subcategory
7878
/- A full subcategory is the special case of an induced category with F = subtype.val. -/
7979

80-
variables {C : Type u} [category.{v} C]
80+
variables {C : Type u} [category.{v} C]
8181
variables (Z : C → Prop)
8282

8383
/--
@@ -105,6 +105,66 @@ induced_category.full subtype.val
105105
instance full_subcategory.faithful : faithful (full_subcategory_inclusion Z) :=
106106
induced_category.faithful subtype.val
107107

108+
variables {Z} {Z' : C → Prop}
109+
110+
/-- An implication of predicates `Z → Z'` induces a functor between full subcategories. -/
111+
@[simps]
112+
def full_subcategory.map (h : ∀ ⦃X⦄, Z X → Z' X) : {X // Z X} ⥤ {X // Z' X} :=
113+
{ obj := λ X, ⟨X.1, h X.2⟩,
114+
map := λ X Y f, f }
115+
116+
instance (h : ∀ ⦃X⦄, Z X → Z' X) : full (full_subcategory.map h) :=
117+
{ preimage := λ X Y f, f }
118+
119+
instance (h : ∀ ⦃X⦄, Z X → Z' X) : faithful (full_subcategory.map h) := {}
120+
121+
@[simp] lemma full_subcategory.map_inclusion (h : ∀ ⦃X⦄, Z X → Z' X) :
122+
full_subcategory.map h ⋙ full_subcategory_inclusion Z' = full_subcategory_inclusion Z :=
123+
rfl
124+
125+
section lift
126+
variables {D : Type u₂} [category.{v₂} D] (P Q : D → Prop)
127+
128+
/-- A functor which maps objects to objects satisfying a certain property induces a lift through
129+
the full subcategory of objects satisfying that property. -/
130+
@[simps]
131+
def full_subcategory.lift (F : C ⥤ D) (hF : ∀ X, P (F.obj X)) : C ⥤ {X // P X} :=
132+
{ obj := λ X, ⟨F.obj X, hF X⟩,
133+
map := λ X Y f, F.map f }
134+
135+
/-- Composing the lift of a functor through a full subcategory with the inclusion yields the
136+
original functor. Unfortunately, this is not true by definition, so we only get a natural
137+
isomorphism, but it is pointwise definitionally true, see
138+
`full_subcategory.inclusion_obj_lift_obj` and `full_subcategory.inclusion_map_lift_map`. -/
139+
def full_subcategory.lift_comp_inclusion (F : C ⥤ D) (hF : ∀ X, P (F.obj X)) :
140+
full_subcategory.lift P F hF ⋙ full_subcategory_inclusion P ≅ F :=
141+
nat_iso.of_components (λ X, iso.refl _) (by simp)
142+
143+
@[simp]
144+
lemma full_subcategory.inclusion_obj_lift_obj (F : C ⥤ D) (hF : ∀ X, P (F.obj X)) {X : C} :
145+
(full_subcategory_inclusion P).obj ((full_subcategory.lift P F hF).obj X) = F.obj X :=
146+
rfl
147+
148+
lemma full_subcategory.inclusion_map_lift_map (F : C ⥤ D) (hF : ∀ X, P (F.obj X)) {X Y : C}
149+
(f : X ⟶ Y) :
150+
(full_subcategory_inclusion P).map ((full_subcategory.lift P F hF).map f) = F.map f :=
151+
rfl
152+
153+
instance (F : C ⥤ D) (hF : ∀ X, P (F.obj X)) [faithful F] :
154+
faithful (full_subcategory.lift P F hF) :=
155+
faithful.of_comp_iso (full_subcategory.lift_comp_inclusion P F hF)
156+
157+
instance (F : C ⥤ D) (hF : ∀ X, P (F.obj X)) [full F] : full (full_subcategory.lift P F hF) :=
158+
full.of_comp_faithful_iso (full_subcategory.lift_comp_inclusion P F hF)
159+
160+
@[simp]
161+
lemma full_subcategory.lift_comp_map (F : C ⥤ D) (hF : ∀ X, P (F.obj X)) (h : ∀ ⦃X⦄, P X → Q X) :
162+
full_subcategory.lift P F hF ⋙ full_subcategory.map h =
163+
full_subcategory.lift Q F (λ X, h (hF X)) :=
164+
rfl
165+
166+
end lift
167+
108168
end full_subcategory
109169

110170
end category_theory

src/category_theory/functor/fully_faithful.lean

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,16 @@ lemma faithful.div_faithful (F : C ⥤ E) [faithful F] (G : D ⥤ E) [faithful G
221221
instance full.comp [full F] [full G] : full (F ⋙ G) :=
222222
{ preimage := λ _ _ f, F.preimage (G.preimage f) }
223223

224-
/-- If `F ⋙ G` is full and `G` is faithful, then `F` is full -/
224+
/-- If `F ⋙ G` is full and `G` is faithful, then `F` is full. -/
225225
def full.of_comp_faithful [full $ F ⋙ G] [faithful G] : full F :=
226226
{ preimage := λ X Y f, (F ⋙ G).preimage (G.map f),
227227
witness' := λ X Y f, G.map_injective ((F ⋙ G).image_preimage _) }
228228

229+
/-- If `F ⋙ G` is full and `G` is faithful, then `F` is full. -/
230+
def full.of_comp_faithful_iso {F : C ⥤ D} {G : D ⥤ E} {H : C ⥤ E} [full H] [faithful G]
231+
(h : F ⋙ G ≅ H) : full F :=
232+
@full.of_comp_faithful _ _ _ _ _ _ F G (full.of_iso h.symm) _
233+
229234
/--
230235
Given a natural isomorphism between `F ⋙ H` and `G ⋙ H` for a fully faithful functor `H`, we
231236
can 'cancel' it to give a natural iso between `F` and `G`.

0 commit comments

Comments
 (0)