Equalizers and coequalizers #
This file defines (co)equalizers as special cases of (co)limits.
An equalizer is the categorical generalization of the subobject {a ∈ A | f(a) = g(a)} known
from abelian groups or modules. It is a limit cone over the diagram formed by f
and g
.
A coequalizer is the dual concept.
Main definitions #
WalkingParallelPair
is the indexing category used for (co)equalizer_diagramsparallelPair
is a functor fromWalkingParallelPair
to our categoryC
.- a
fork
is a cone over a parallel pair.- there is really only one interesting morphism in a fork: the arrow from the vertex of the fork
to the domain of f and g. It is called
fork.ι
.
- there is really only one interesting morphism in a fork: the arrow from the vertex of the fork
to the domain of f and g. It is called
- an
equalizer
is now just alimit (parallelPair f g)
Each of these has a dual.
Main statements #
equalizer.ι_mono
states that every equalizer map is a monomorphismisIso_limit_cone_parallelPair_of_self
states that the identity on the domain off
is an equalizer off
andf
.
Implementation notes #
As with the other special shapes in the limits library, all the definitions here are given as
abbreviation
s of the general statements for limits, so all the simp
lemmas and theorems about
general limits can be used.
References #
The type of objects for the diagram indexing a (co)equalizer.
Instances For
Equations
- CategoryTheory.Limits.instDecidableEqWalkingParallelPair x✝ y✝ = if h : x✝.toCtorIdx = y✝.toCtorIdx then isTrue ⋯ else isFalse ⋯
The type family of morphisms for the diagram indexing a (co)equalizer.
- left : CategoryTheory.Limits.WalkingParallelPairHom CategoryTheory.Limits.WalkingParallelPair.zero CategoryTheory.Limits.WalkingParallelPair.one
- right : CategoryTheory.Limits.WalkingParallelPairHom CategoryTheory.Limits.WalkingParallelPair.zero CategoryTheory.Limits.WalkingParallelPair.one
- id (X : CategoryTheory.Limits.WalkingParallelPair) : CategoryTheory.Limits.WalkingParallelPairHom X X
Instances For
Equations
- CategoryTheory.Limits.instDecidableEqWalkingParallelPairHom = CategoryTheory.Limits.decEqWalkingParallelPairHom✝
Satisfying the inhabited linter
Composition of morphisms in the indexing diagram for (co)equalizers.
Equations
- One or more equations did not get rendered due to their size.
- (CategoryTheory.Limits.WalkingParallelPairHom.id x✝²).comp x✝ = x✝
Instances For
The functor WalkingParallelPair ⥤ WalkingParallelPairᵒᵖ
sending left to left and right to
right.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The equivalence WalkingParallelPair ⥤ WalkingParallelPairᵒᵖ
sending left to left and right to
right.
Equations
- One or more equations did not get rendered due to their size.
Instances For
parallelPair f g
is the diagram in C
consisting of the two morphisms f
and g
with
common domain and codomain.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Every functor indexing a (co)equalizer is naturally isomorphic (actually, equal) to a
parallelPair
Equations
Instances For
Construct a morphism between parallel pairs.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Construct a natural isomorphism between functors out of the walking parallel pair from its components.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Construct a natural isomorphism between parallelPair f g
and parallelPair f' g'
given
equalities f = f'
and g = g'
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A fork on f
and g
is just a Cone (parallelPair f g)
.
Equations
Instances For
A cofork on f
and g
is just a Cocone (parallelPair f g)
.
Equations
Instances For
A fork t
on the parallel pair f g : X ⟶ Y
consists of two morphisms
t.π.app zero : t.pt ⟶ X
and t.π.app one : t.pt ⟶ Y
. Of these, only the first one is interesting, and we give it the
shorter name Fork.ι t
.
Equations
- t.ι = t.π.app CategoryTheory.Limits.WalkingParallelPair.zero
Instances For
A cofork t
on the parallelPair f g : X ⟶ Y
consists of two morphisms
t.ι.app zero : X ⟶ t.pt
and t.ι.app one : Y ⟶ t.pt
. Of these, only the second one is
interesting, and we give it the shorter name Cofork.π t
.
Equations
- t.π = t.ι.app CategoryTheory.Limits.WalkingParallelPair.one
Instances For
A fork on f g : X ⟶ Y
is determined by the morphism ι : P ⟶ X
satisfying ι ≫ f = ι ≫ g
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A cofork on f g : X ⟶ Y
is determined by the morphism π : Y ⟶ P
satisfying
f ≫ π = g ≫ π
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
To check whether two maps are equalized by both maps of a fork, it suffices to check it for the first map
To check whether two maps are coequalized by both maps of a cofork, it suffices to check it for the second map
If s
is a limit fork over f
and g
, then a morphism k : W ⟶ X
satisfying
k ≫ f = k ≫ g
induces a morphism l : W ⟶ s.pt
such that l ≫ fork.ι s = k
.
Equations
- CategoryTheory.Limits.Fork.IsLimit.lift hs k h = hs.lift (CategoryTheory.Limits.Fork.ofι k h)
Instances For
If s
is a limit fork over f
and g
, then a morphism k : W ⟶ X
satisfying
k ≫ f = k ≫ g
induces a morphism l : W ⟶ s.pt
such that l ≫ fork.ι s = k
.
Equations
- CategoryTheory.Limits.Fork.IsLimit.lift' hs k h = ⟨CategoryTheory.Limits.Fork.IsLimit.lift hs k h, ⋯⟩
Instances For
If s
is a colimit cofork over f
and g
, then a morphism k : Y ⟶ W
satisfying
f ≫ k = g ≫ k
induces a morphism l : s.pt ⟶ W
such that cofork.π s ≫ l = k
.
Equations
- CategoryTheory.Limits.Cofork.IsColimit.desc hs k h = hs.desc (CategoryTheory.Limits.Cofork.ofπ k h)
Instances For
If s
is a colimit cofork over f
and g
, then a morphism k : Y ⟶ W
satisfying
f ≫ k = g ≫ k
induces a morphism l : s.pt ⟶ W
such that cofork.π s ≫ l = k
.
Equations
Instances For
This is a slightly more convenient method to verify that a fork is a limit cone. It only asks for a proof of facts that carry any mathematical content
Equations
- CategoryTheory.Limits.Fork.IsLimit.mk t lift fac uniq = { lift := lift, fac := ⋯, uniq := ⋯ }
Instances For
This is another convenient method to verify that a fork is a limit cone. It
only asks for a proof of facts that carry any mathematical content, and allows access to the
same s
for all parts.
Equations
- CategoryTheory.Limits.Fork.IsLimit.mk' t create = CategoryTheory.Limits.Fork.IsLimit.mk t (fun (s : CategoryTheory.Limits.Fork f g) => ↑(create s)) ⋯ ⋯
Instances For
This is a slightly more convenient method to verify that a cofork is a colimit cocone. It only asks for a proof of facts that carry any mathematical content
Equations
- CategoryTheory.Limits.Cofork.IsColimit.mk t desc fac uniq = { desc := desc, fac := ⋯, uniq := ⋯ }
Instances For
This is another convenient method to verify that a fork is a limit cone. It
only asks for a proof of facts that carry any mathematical content, and allows access to the
same s
for all parts.
Equations
- CategoryTheory.Limits.Cofork.IsColimit.mk' t create = CategoryTheory.Limits.Cofork.IsColimit.mk t (fun (s : CategoryTheory.Limits.Cofork f g) => ↑(create s)) ⋯ ⋯
Instances For
Noncomputably make a limit cone from the existence of unique factorizations.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Noncomputably make a colimit cocone from the existence of unique factorizations.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given a limit cone for the pair f g : X ⟶ Y
, for any Z
, morphisms from Z
to its point are in
bijection with morphisms h : Z ⟶ X
such that h ≫ f = h ≫ g
.
Further, this bijection is natural in Z
: see Fork.IsLimit.homIso_natural
.
This is a special case of IsLimit.homIso'
, often useful to construct adjunctions.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The bijection of Fork.IsLimit.homIso
is natural in Z
.
Given a colimit cocone for the pair f g : X ⟶ Y
, for any Z
, morphisms from the cocone point
to Z
are in bijection with morphisms h : Y ⟶ Z
such that f ≫ h = g ≫ h
.
Further, this bijection is natural in Z
: see Cofork.IsColimit.homIso_natural
.
This is a special case of IsColimit.homIso'
, often useful to construct adjunctions.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The bijection of Cofork.IsColimit.homIso
is natural in Z
.
This is a helper construction that can be useful when verifying that a category has all
equalizers. Given F : WalkingParallelPair ⥤ C
, which is really the same as
parallelPair (F.map left) (F.map right)
, and a fork on F.map left
and F.map right
,
we get a cone on F
.
If you're thinking about using this, have a look at hasEqualizers_of_hasLimit_parallelPair
,
which you may find to be an easier way of achieving your goal.
Equations
- One or more equations did not get rendered due to their size.
Instances For
This is a helper construction that can be useful when verifying that a category has all
coequalizers. Given F : WalkingParallelPair ⥤ C
, which is really the same as
parallelPair (F.map left) (F.map right)
, and a cofork on F.map left
and F.map right
,
we get a cocone on F
.
If you're thinking about using this, have a look at
hasCoequalizers_of_hasColimit_parallelPair
, which you may find to be an easier way of
achieving your goal.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given F : WalkingParallelPair ⥤ C
, which is really the same as
parallelPair (F.map left) (F.map right)
and a cone on F
, we get a fork on
F.map left
and F.map right
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given F : WalkingParallelPair ⥤ C
, which is really the same as
parallelPair (F.map left) (F.map right)
and a cocone on F
, we get a cofork on
F.map left
and F.map right
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Helper function for constructing morphisms between equalizer forks.
Equations
- CategoryTheory.Limits.Fork.mkHom k w = { hom := k, w := ⋯ }
Instances For
To construct an isomorphism between forks,
it suffices to give an isomorphism between the cone points
and check that it commutes with the ι
morphisms.
Equations
- CategoryTheory.Limits.Fork.ext i w = { hom := CategoryTheory.Limits.Fork.mkHom i.hom w, inv := CategoryTheory.Limits.Fork.mkHom i.inv ⋯, hom_inv_id := ⋯, inv_hom_id := ⋯ }
Instances For
Two forks of the form ofι
are isomorphic whenever their ι
's are equal.
Equations
Instances For
Every fork is isomorphic to one of the form Fork.of_ι _ _
.
Equations
- c.isoForkOfι = CategoryTheory.Limits.Fork.ext (id (CategoryTheory.Iso.refl c.pt)) ⋯
Instances For
Given two forks with isomorphic components in such a way that the natural diagrams commute, then if one is a limit, then the other one is as well.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Helper function for constructing morphisms between coequalizer coforks.
Equations
- CategoryTheory.Limits.Cofork.mkHom k w = { hom := k, w := ⋯ }
Instances For
To construct an isomorphism between coforks,
it suffices to give an isomorphism between the cocone points
and check that it commutes with the π
morphisms.
Equations
- CategoryTheory.Limits.Cofork.ext i w = { hom := CategoryTheory.Limits.Cofork.mkHom i.hom w, inv := CategoryTheory.Limits.Cofork.mkHom i.inv ⋯, hom_inv_id := ⋯, inv_hom_id := ⋯ }
Instances For
Every cofork is isomorphic to one of the form Cofork.ofπ _ _
.
Equations
- c.isoCoforkOfπ = CategoryTheory.Limits.Cofork.ext (id (CategoryTheory.Iso.refl c.pt)) ⋯
Instances For
HasEqualizer f g
represents a particular choice of limiting cone
for the parallel pair of morphisms f
and g
.
Equations
Instances For
If an equalizer of f
and g
exists, we can access an arbitrary choice of such by
saying equalizer f g
.
Equations
Instances For
If an equalizer of f
and g
exists, we can access the inclusion
equalizer f g ⟶ X
by saying equalizer.ι f g
.
Equations
Instances For
An equalizer cone for a parallel pair f
and g
Equations
Instances For
The equalizer built from equalizer.ι f g
is limiting.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A morphism k : W ⟶ X
satisfying k ≫ f = k ≫ g
factors through the equalizer of f
and g
via equalizer.lift : W ⟶ equalizer f g
.
Equations
Instances For
A morphism k : W ⟶ X
satisfying k ≫ f = k ≫ g
induces a morphism l : W ⟶ equalizer f g
satisfying l ≫ equalizer.ι f g = k
.
Equations
Instances For
Two maps into an equalizer are equal if they are equal when composed with the equalizer map.
An equalizer morphism is a monomorphism
The equalizer morphism in any limit cone is a monomorphism.
The identity determines a cone on the equalizer diagram of f
and g
if f = g
.
Equations
Instances For
The identity on X
is an equalizer of (f, g)
, if f = g
.
Equations
- CategoryTheory.Limits.isLimitIdFork h = CategoryTheory.Limits.Fork.IsLimit.mk (CategoryTheory.Limits.idFork h) (fun (s : CategoryTheory.Limits.Fork f g) => s.ι) ⋯ ⋯
Instances For
Every equalizer of (f, g)
, where f = g
, is an isomorphism.
The equalizer of (f, g)
, where f = g
, is an isomorphism.
Every equalizer of (f, f)
is an isomorphism.
An equalizer that is an epimorphism is an isomorphism.
Two morphisms are equal if there is a fork whose inclusion is epi.
If the equalizer of two morphisms is an epimorphism, then the two morphisms are equal.
The equalizer inclusion for (f, f)
is an isomorphism.
The equalizer of a morphism with itself is isomorphic to the source.
Equations
Instances For
HasCoequalizer f g
represents a particular choice of colimiting cocone
for the parallel pair of morphisms f
and g
.
Equations
Instances For
If a coequalizer of f
and g
exists, we can access an arbitrary choice of such by
saying coequalizer f g
.
Equations
Instances For
If a coequalizer of f
and g
exists, we can access the corresponding projection by
saying coequalizer.π f g
.
Equations
Instances For
An arbitrary choice of coequalizer cocone for a parallel pair f
and g
.
Equations
Instances For
The cofork built from coequalizer.π f g
is colimiting.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Any morphism k : Y ⟶ W
satisfying f ≫ k = g ≫ k
factors through the coequalizer of f
and g
via coequalizer.desc : coequalizer f g ⟶ W
.
Equations
Instances For
Any morphism k : Y ⟶ W
satisfying f ≫ k = g ≫ k
induces a morphism
l : coequalizer f g ⟶ W
satisfying coequalizer.π ≫ g = l
.
Equations
Instances For
Two maps from a coequalizer are equal if they are equal when composed with the coequalizer map
A coequalizer morphism is an epimorphism
The coequalizer morphism in any colimit cocone is an epimorphism.
The identity determines a cocone on the coequalizer diagram of f
and g
, if f = g
.
Equations
Instances For
The identity on Y
is a coequalizer of (f, g)
, where f = g
.
Equations
- CategoryTheory.Limits.isColimitIdCofork h = CategoryTheory.Limits.Cofork.IsColimit.mk (CategoryTheory.Limits.idCofork h) (fun (s : CategoryTheory.Limits.Cofork f g) => s.π) ⋯ ⋯
Instances For
Every coequalizer of (f, g)
, where f = g
, is an isomorphism.
The coequalizer of (f, g)
, where f = g
, is an isomorphism.
Every coequalizer of (f, f)
is an isomorphism.
A coequalizer that is a monomorphism is an isomorphism.
Two morphisms are equal if there is a cofork whose projection is mono.
If the coequalizer of two morphisms is a monomorphism, then the two morphisms are equal.
The coequalizer projection for (f, f)
is an isomorphism.
The coequalizer of a morphism with itself is isomorphic to the target.
Equations
Instances For
The comparison morphism for the equalizer of f,g
.
This is an isomorphism iff G
preserves the equalizer of f,g
; see
CategoryTheory/Limits/Preserves/Shapes/Equalizers.lean
Equations
Instances For
The comparison morphism for the coequalizer of f,g
.
Equations
Instances For
HasEqualizers
represents a choice of equalizer for every pair of morphisms
Equations
Instances For
HasCoequalizers
represents a choice of coequalizer for every pair of morphisms
Equations
Instances For
If C
has all limits of diagrams parallelPair f g
, then it has all equalizers
If C
has all colimits of diagrams parallelPair f g
, then it has all coequalizers
A split mono f
equalizes (retraction f ≫ f)
and (𝟙 Y)
.
Here we build the cone, and show in isSplitMonoEqualizes
that it is a limit cone.
Instances For
A split mono f
equalizes (retraction f ≫ f)
and (𝟙 Y)
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
We show that the converse to isSplitMonoEqualizes
is true:
Whenever f
equalizes (r ≫ f)
and (𝟙 Y)
, then r
is a retraction of f
.
Equations
- CategoryTheory.Limits.splitMonoOfEqualizer C hr h = { retraction := r, id := ⋯ }
Instances For
The fork obtained by postcomposing an equalizer fork with a monomorphism is an equalizer.
Equations
- One or more equations did not get rendered due to their size.
Instances For
An equalizer of an idempotent morphism and the identity is split mono.
Equations
- CategoryTheory.Limits.splitMonoOfIdempotentOfIsLimitFork C hf i = { retraction := i.lift (CategoryTheory.Limits.Fork.ofι f ⋯), id := ⋯ }
Instances For
The equalizer of an idempotent morphism and the identity is split mono.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A split epi f
coequalizes (f ≫ section_ f)
and (𝟙 X)
.
Here we build the cocone, and show in isSplitEpiCoequalizes
that it is a colimit cocone.
Instances For
A split epi f
coequalizes (f ≫ section_ f)
and (𝟙 X)
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
We show that the converse to isSplitEpiEqualizes
is true:
Whenever f
coequalizes (f ≫ s)
and (𝟙 X)
, then s
is a section of f
.
Equations
- CategoryTheory.Limits.splitEpiOfCoequalizer C hs h = { section_ := s, id := ⋯ }
Instances For
The cofork obtained by precomposing a coequalizer cofork with an epimorphism is a coequalizer.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A coequalizer of an idempotent morphism and the identity is split epi.
Equations
- CategoryTheory.Limits.splitEpiOfIdempotentOfIsColimitCofork C hf i = { section_ := i.desc (CategoryTheory.Limits.Cofork.ofπ f ⋯), id := ⋯ }
Instances For
The coequalizer of an idempotent morphism and the identity is split epi.
Equations
- One or more equations did not get rendered due to their size.