Categorical images #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
We define the categorical image of f
as a factorisation f = e ≫ m
through a monomorphism m
,
so that m
factors through the m'
in any other such factorisation.
Main definitions #
-
A
mono_factorisation
is a factorisationf = e ≫ m
, wherem
is a monomorphism -
is_image F
means that a given mono factorisationF
has the universal property of the image. -
has_image f
means that there is some image factorization for the morphismf : X ⟶ Y
.- In this case,
image f
is some image object (selected with choice),image.ι f : image f ⟶ Y
is the monomorphismm
of the factorisation andfactor_thru_image f : X ⟶ image f
is the morphisme
.
- In this case,
-
has_images C
means that every morphism inC
has an image. -
Let
f : X ⟶ Y
andg : P ⟶ Q
be morphisms inC
, which we will represent as objects of the arrow categoryarrow C
. Thensq : f ⟶ g
is a commutative square inC
. Iff
andg
have images, thenhas_image_map sq
represents the fact that there is a morphismi : image f ⟶ image g
making the diagramX ----→ image f ----→ Y | | | | | | ↓ ↓ ↓ P ----→ image g ----→ Q
commute, where the top row is the image factorisation of
f
, the bottom row is the image factorisation ofg
, and the outer rectangle is the commutative squaresq
. -
If a category
has_images
, thenhas_image_maps
means that every commutative square admits an image map. -
If a category
has_images
, thenhas_strong_epi_images
means that the morphism to the image is always a strong epimorphism.
Main statements #
- When
C
has equalizers, the morphisme
appearing in an image factorisation is an epimorphism. - When
C
has strong epi images, then these images admit image maps.
Future work #
- TODO: coimages, and abelian categories.
- TODO: connect this with existing working in the group theory and ring theory libraries.
- I : C
- m : self.I ⟶ Y
- m_mono : category_theory.mono self.m
- e : X ⟶ self.I
- fac' : self.e ≫ self.m = f . "obviously"
A factorisation of a morphism f = e ≫ m
, with m
monic.
Instances for category_theory.limits.mono_factorisation
- category_theory.limits.mono_factorisation.has_sizeof_inst
- category_theory.limits.mono_factorisation.inhabited
The obvious factorisation of a monomorphism through itself.
Equations
The morphism m
in a factorisation f = e ≫ m
through a monomorphism is uniquely
determined.
Any mono factorisation of f
gives a mono factorisation of f ≫ g
when g
is a mono.
A mono factorisation of f ≫ g
, where g
is an isomorphism,
gives a mono factorisation of f
.
Any mono factorisation of f
gives a mono factorisation of g ≫ f
.
A mono factorisation of g ≫ f
, where g
is an isomorphism,
gives a mono factorisation of f
.
If f
and g
are isomorphic arrows, then a mono factorisation of f
gives a mono factorisation of g
- lift : Π (F' : category_theory.limits.mono_factorisation f), F.I ⟶ F'.I
- lift_fac' : (∀ (F' : category_theory.limits.mono_factorisation f), self.lift F' ≫ F'.m = F.m) . "obviously"
Data exhibiting that a given factorisation through a mono is initial.
Instances for category_theory.limits.is_image
- category_theory.limits.is_image.has_sizeof_inst
- category_theory.limits.is_image.inhabited
The trivial factorisation of a monomorphism satisfies the universal property.
Equations
- category_theory.limits.is_image.self f = {lift := λ (F' : category_theory.limits.mono_factorisation f), F'.e, lift_fac' := _}
Equations
Two factorisations through monomorphisms satisfying the universal property must factor through isomorphic objects.
Equations
- hF.iso_ext hF' = {hom := hF.lift F', inv := hF'.lift F, hom_inv_id' := _, inv_hom_id' := _}
If f
and g
are isomorphic arrows, then a mono factorisation of f
that is an image
gives a mono factorisation of g
that is an image
Equations
- hF.of_arrow_iso sq = {lift := λ (F' : category_theory.limits.mono_factorisation g.hom), hF.lift (F'.of_arrow_iso (category_theory.inv sq)), lift_fac' := _}
- F : category_theory.limits.mono_factorisation f
- is_image : category_theory.limits.is_image self.F
Data exhibiting that a morphism f
has an image.
Instances for category_theory.limits.image_factorisation
- category_theory.limits.image_factorisation.has_sizeof_inst
- category_theory.limits.image_factorisation.inhabited
Equations
- category_theory.limits.image_factorisation.inhabited f = {default := {F := category_theory.limits.mono_factorisation.self f _inst_2, is_image := category_theory.limits.is_image.self f _inst_2}}
If f
and g
are isomorphic arrows, then an image factorisation of f
gives an image factorisation of g
Equations
- F.of_arrow_iso sq = {F := F.F.of_arrow_iso sq _inst_2, is_image := F.is_image.of_arrow_iso sq _inst_2}
- exists_image : nonempty (category_theory.limits.image_factorisation f)
has_image f
means that there exists an image factorisation of f
.
Instances of this typeclass
- category_theory.limits.mono_has_image
- category_theory.limits.has_images.has_image
- category_theory.limits.category_theory.category_struct.comp.has_image
- category_theory.limits.has_image_iso_comp
- category_theory.limits.has_image_comp_iso
- category_theory.limits.hom.has_image
- category_theory.limits.has_image_zero
Some factorisation of f
through a monomorphism (selected with choice).
The witness of the universal property for the chosen factorisation of f
through
a monomorphism.
The categorical image of a morphism.
The inclusion of the image of a morphism into the target.
Instances for category_theory.limits.image.ι
The map from the source to the image of a morphism.
Equations
Instances for category_theory.limits.factor_thru_image
Rewrite in terms of the factor_thru_image
interface.
Any other factorisation of the morphism f
through a monomorphism receives a map from the
image.
Equations
Instances for category_theory.limits.image.lift
If has_image g
, then has_image (f ≫ g)
when f
is an isomorphism.
- has_image : ∀ {X Y : C} (f : X ⟶ Y), category_theory.limits.has_image f
has_images
asserts that every morphism has an image.
Instances of this typeclass
The image of a monomorphism is isomorphic to the source.
An equation between morphisms gives a comparison map between the images (which momentarily we prove is an iso).
Equations
- category_theory.limits.image.eq_to_hom h = category_theory.limits.image.lift {I := category_theory.limits.image f' _inst_3, m := category_theory.limits.image.ι f' _inst_3, m_mono := _, e := category_theory.limits.factor_thru_image f' _inst_3, fac' := _}
Instances for category_theory.limits.image.eq_to_hom
An equation between morphisms gives an isomorphism between the images.
As long as the category has equalizers,
the image inclusion maps commute with image.eq_to_iso
.
The comparison map image (f ≫ g) ⟶ image g
.
Equations
- category_theory.limits.image.pre_comp f g = category_theory.limits.image.lift {I := category_theory.limits.image g _inst_2, m := category_theory.limits.image.ι g _inst_2, m_mono := _, e := f ≫ category_theory.limits.factor_thru_image g, fac' := _}
Instances for category_theory.limits.image.pre_comp
image.pre_comp f g
is a monomorphism.
The two step comparison map
image (f ≫ (g ≫ h)) ⟶ image (g ≫ h) ⟶ image h
agrees with the one step comparison map
image (f ≫ (g ≫ h)) ≅ image ((f ≫ g) ≫ h) ⟶ image h
.
image.pre_comp f g
is an epimorphism when f
is an epimorphism
(we need C
to have equalizers to prove this).
image.pre_comp f g
is an isomorphism when f
is an isomorphism
(we need C
to have equalizers to prove this).
Postcomposing by an isomorphism induces an isomorphism on the image.
Equations
- category_theory.limits.image.comp_iso f g = {hom := category_theory.limits.image.lift (category_theory.limits.image.mono_factorisation (f ≫ g)).of_comp_iso, inv := category_theory.limits.image.lift ((category_theory.limits.image.mono_factorisation f).comp_mono g), hom_inv_id' := _, inv_hom_id' := _}
- map : category_theory.limits.image f.hom ⟶ category_theory.limits.image g.hom
- map_ι' : self.map ≫ category_theory.limits.image.ι g.hom = category_theory.limits.image.ι f.hom ≫ sq.right . "obviously"
An image map is a morphism image f → image g
fitting into a commutative square and satisfying
the obvious commutativity conditions.
Instances for category_theory.limits.image_map
- category_theory.limits.image_map.has_sizeof_inst
- category_theory.limits.inhabited_image_map
- category_theory.limits.image_map.subsingleton
Equations
- category_theory.limits.inhabited_image_map = {default := {map := 𝟙 (category_theory.limits.image f.hom), map_ι' := _}}
To give an image map for a commutative square with f
at the top and g
at the bottom, it
suffices to give a map between any mono factorisation of f
and any image factorisation of
g
.
Equations
- category_theory.limits.image_map.transport sq F hF' map_ι = {map := category_theory.limits.image.lift F ≫ map ≫ hF'.lift (category_theory.limits.image.mono_factorisation g.hom), map_ι' := _}
- has_image_map : nonempty (category_theory.limits.image_map sq)
has_image_map sq
means that there is an image_map
for the square sq
.
Obtain an image_map
from a has_image_map
instance.
The map on images induced by a commutative square.
Image maps for composable commutative squares induce an image map in the composite square.
Equations
- category_theory.limits.image_map_comp sq sq' = {map := category_theory.limits.image.map sq ≫ category_theory.limits.image.map sq', map_ι' := _}
The identity image f ⟶ image f
fits into the commutative square represented by the identity
morphism 𝟙 f
in the arrow category.
Equations
- category_theory.limits.image_map_id f = {map := 𝟙 (category_theory.limits.image f.hom), map_ι' := _}
- has_image_map : ∀ {f g : category_theory.arrow C} (st : f ⟶ g), category_theory.limits.has_image_map st
If a category has_image_maps
, then all commutative squares induce morphisms on images.
Instances of this typeclass
Instances of other typeclasses for category_theory.limits.has_image_maps
- category_theory.limits.has_image_maps.has_sizeof_inst
The functor from the arrow category of C
to C
itself that maps a morphism to its image
and a commutative square to the induced morphism on images.
Equations
- category_theory.limits.im = {obj := λ (f : category_theory.arrow C), category_theory.limits.image f.hom, map := λ (_x _x_1 : category_theory.arrow C) (st : _x ⟶ _x_1), category_theory.limits.image.map st, map_id' := _, map_comp' := _}
- to_mono_factorisation : category_theory.limits.mono_factorisation f
- e_strong_epi : category_theory.strong_epi self.to_mono_factorisation.e
A strong epi-mono factorisation is a decomposition f = e ≫ m
with e
a strong epimorphism
and m
a monomorphism.
Instances for category_theory.limits.strong_epi_mono_factorisation
- category_theory.limits.strong_epi_mono_factorisation.has_sizeof_inst
- category_theory.limits.strong_epi_mono_factorisation_inhabited
Satisfying the inhabited linter
Equations
- category_theory.limits.strong_epi_mono_factorisation_inhabited f = {default := {to_mono_factorisation := {I := Y, m := 𝟙 Y, m_mono := _, e := f, fac' := _}, e_strong_epi := _inst_2}}
A mono factorisation coming from a strong epi-mono factorisation always has the universal property of the image.
Equations
- F.to_mono_is_image = {lift := λ (G : category_theory.limits.mono_factorisation f), _.lift, lift_fac' := _}
- has_fac : ∀ {X Y : C} (f : X ⟶ Y), nonempty (category_theory.limits.strong_epi_mono_factorisation f)
A category has strong epi-mono factorisations if every morphism admits a strong epi-mono factorisation.
- strong_factor_thru_image : ∀ {X Y : C} (f : X ⟶ Y), category_theory.strong_epi (category_theory.limits.factor_thru_image f)
A category has strong epi images if it has all images and factor_thru_image f
is a strong
epimorphism for all f
.
If there is a single strong epi-mono factorisation of f
, then every image factorisation is a
strong epi-mono factorisation.
If we constructed our images from strong epi-mono factorisations, then these images are strong epi images.
A category with strong epi images has image maps.
If a category has images, equalizers and pullbacks, then images are automatically strong epi images.
If C
has strong epi mono factorisations, then the image is unique up to isomorphism, in that if
f
factors as a strong epi followed by a mono, this factorisation is essentially the image
factorisation.
Equations
- category_theory.limits.image.iso_strong_epi_mono e m comm = (category_theory.limits.strong_epi_mono_factorisation.mk {I := I', m := m, m_mono := _inst_4, e := e, fac' := comm}).to_mono_is_image.iso_ext (category_theory.limits.image.is_image f)