Documentation

Mathlib.CategoryTheory.Limits.Shapes.Equalizers

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 #

Each of these has a dual.

Main statements #

Implementation notes #

As with the other special shapes in the limits library, all the definitions here are given as abbreviations 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

    parallelPair f g is the diagram in C consisting of the two morphisms f and g with common domain and codomain.

    Instances For

      Construct a morphism between parallel pairs.

      Instances For
        def CategoryTheory.Limits.parallelPair.eqOfHomEq {C : Type u} [CategoryTheory.Category.{v, u} C] {X : C} {Y : C} {f : X Y} {g : X Y} {f' : X Y} {g' : X Y} (hf : f = f') (hg : g = g') :

        Construct a natural isomorphism between parallelPair f g and parallelPair f' g' given equalities f = f' and g = g'.

        Instances For
          @[inline, reducible]
          abbrev CategoryTheory.Limits.Fork {C : Type u} [CategoryTheory.Category.{v, u} C] {X : C} {Y : C} (f : X Y) (g : X Y) :
          Type (max u v)

          A fork on f and g is just a Cone (parallelPair f g).

          Instances For
            @[inline, reducible]
            abbrev CategoryTheory.Limits.Cofork {C : Type u} [CategoryTheory.Category.{v, u} C] {X : C} {Y : C} (f : X Y) (g : X Y) :
            Type (max u v)

            A cofork on f and g is just a Cocone (parallelPair f g).

            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.

              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.

                Instances For

                  A fork on f g : X ⟶ Y is determined by the morphism ι : P ⟶ X satisfying ι ≫ f = ι ≫ g.

                  Instances For

                    A cofork on f g : X ⟶ Y is determined by the morphism π : Y ⟶ P satisfying f ≫ π = g ≫ π.

                    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.

                      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.

                        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.

                          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.

                            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

                              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.

                                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

                                  Instances For

                                    Noncomputably make a limit cone from the existence of unique factorizations.

                                    Instances For

                                      Noncomputably make a colimit cocone from the existence of unique factorizations.

                                      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.

                                        Instances For

                                          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.

                                          Instances For

                                            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.

                                            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.

                                              Instances For

                                                Helper function for constructing morphisms between equalizer forks.

                                                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.

                                                  Instances For

                                                    Helper function for constructing morphisms between coequalizer coforks.

                                                    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.

                                                      Instances For
                                                        @[inline, reducible]
                                                        abbrev CategoryTheory.Limits.HasEqualizer {C : Type u} [CategoryTheory.Category.{v, u} C] {X : C} {Y : C} (f : X Y) (g : X Y) :

                                                        HasEqualizer f g represents a particular choice of limiting cone for the parallel pair of morphisms f and g.

                                                        Instances For
                                                          @[inline, reducible]
                                                          noncomputable abbrev CategoryTheory.Limits.equalizer {C : Type u} [CategoryTheory.Category.{v, u} C] {X : C} {Y : C} (f : X Y) (g : X Y) [CategoryTheory.Limits.HasEqualizer f g] :
                                                          C

                                                          If an equalizer of f and g exists, we can access an arbitrary choice of such by saying equalizer f g.

                                                          Instances For
                                                            @[inline, reducible]

                                                            If an equalizer of f and g exists, we can access the inclusion equalizer f g ⟶ X by saying equalizer.ι f g.

                                                            Instances For
                                                              @[inline, reducible]

                                                              An equalizer cone for a parallel pair f and g

                                                              Instances For
                                                                @[inline, reducible]

                                                                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.

                                                                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.

                                                                  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.

                                                                    def CategoryTheory.Limits.idFork {C : Type u} [CategoryTheory.Category.{v, u} C] {X : C} {Y : C} {f : X Y} {g : X Y} (h : f = g) :

                                                                    The identity determines a cone on the equalizer diagram of f and g if f = g.

                                                                    Instances For

                                                                      The identity on X is an equalizer of (f, g), if f = g.

                                                                      Instances For

                                                                        Every equalizer of (f, g), where f = g, is an isomorphism.

                                                                        The equalizer of (f, g), where f = g, 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.

                                                                        Instances For
                                                                          @[inline, reducible]
                                                                          abbrev CategoryTheory.Limits.HasCoequalizer {C : Type u} [CategoryTheory.Category.{v, u} C] {X : C} {Y : C} (f : X Y) (g : X Y) :

                                                                          HasCoequalizer f g represents a particular choice of colimiting cocone for the parallel pair of morphisms f and g.

                                                                          Instances For
                                                                            @[inline, reducible]
                                                                            noncomputable abbrev CategoryTheory.Limits.coequalizer {C : Type u} [CategoryTheory.Category.{v, u} C] {X : C} {Y : C} (f : X Y) (g : X Y) [CategoryTheory.Limits.HasCoequalizer f g] :
                                                                            C

                                                                            If a coequalizer of f and g exists, we can access an arbitrary choice of such by saying coequalizer f g.

                                                                            Instances For
                                                                              @[inline, reducible]

                                                                              If a coequalizer of f and g exists, we can access the corresponding projection by saying coequalizer.π f g.

                                                                              Instances For
                                                                                @[inline, reducible]

                                                                                An arbitrary choice of coequalizer cocone for a parallel pair f and g.

                                                                                Instances For
                                                                                  @[inline, reducible]

                                                                                  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.

                                                                                  Instances For

                                                                                    Any morphism k : Y ⟶ W satisfying f ≫ k = g ≫ k induces a morphism l : coequalizer f g ⟶ W satisfying coequalizer.π ≫ g = l.

                                                                                    Instances For

                                                                                      Two maps from a coequalizer are equal if they are equal when composed with the coequalizer map

                                                                                      The coequalizer morphism in any colimit cocone is an epimorphism.

                                                                                      def CategoryTheory.Limits.idCofork {C : Type u} [CategoryTheory.Category.{v, u} C] {X : C} {Y : C} {f : X Y} {g : X Y} (h : f = g) :

                                                                                      The identity determines a cocone on the coequalizer diagram of f and g, if f = g.

                                                                                      Instances For

                                                                                        The identity on Y is a coequalizer of (f, g), where f = g.

                                                                                        Instances For

                                                                                          Every coequalizer of (f, g), where f = g, is an isomorphism.

                                                                                          The coequalizer of (f, g), where f = g, 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.

                                                                                          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

                                                                                            Instances For

                                                                                              The comparison morphism for the coequalizer of f,g.

                                                                                              Instances For
                                                                                                @[inline, reducible]

                                                                                                HasEqualizers represents a choice of equalizer for every pair of morphisms

                                                                                                Instances For
                                                                                                  @[inline, reducible]

                                                                                                  HasCoequalizers represents a choice of coequalizer for every pair of morphisms

                                                                                                  Instances For

                                                                                                    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).

                                                                                                      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).

                                                                                                          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.

                                                                                                            Instances For