Documentation

Mathlib.Algebra.Category.MonCat.Basic

Category instances for Monoid, AddMonoid, CommMonoid, and AddCommMonoid. #

We introduce the bundled categories:

along with the relevant forgetful functors between them.

structure AddMonCat :
Type (u + 1)

The category of additive monoids and monoid morphisms.

Instances For
    structure MonCat :
    Type (u + 1)

    The category of monoids and monoid morphisms.

    • carrier : Type u

      The underlying type.

    • str : Monoid self
    Instances For
      @[instance_reducible]
      Equations
      @[reducible, inline]
      abbrev MonCat.of (M : Type u) [Monoid M] :

      Construct a bundled MonCat from the underlying type and typeclass.

      Equations
      • M = { carrier := M, str := inst✝ }
      Instances For
        @[reducible, inline]
        abbrev AddMonCat.of (M : Type u) [AddMonoid M] :

        Construct a bundled AddMonCat from the underlying type and typeclass.

        Equations
        • M = { carrier := M, str := inst✝ }
        Instances For
          structure AddMonCat.Hom (A B : AddMonCat) :

          The type of morphisms in AddMonCat.

          • _mkInternal :: (
            • hom' : A →+ B

              The underlying monoid homomorphism.

          • )
          Instances For
            theorem AddMonCat.Hom.ext_iff {A B : AddMonCat} {x y : A.Hom B} :
            x = y x.hom' = y.hom'
            theorem AddMonCat.Hom.ext {A B : AddMonCat} {x y : A.Hom B} (hom' : x.hom' = y.hom') :
            x = y
            structure MonCat.Hom (A B : MonCat) :

            The type of morphisms in MonCat.

            • _mkInternal :: (
              • hom' : A →* B

                The underlying monoid homomorphism.

            • )
            Instances For
              theorem MonCat.Hom.ext_iff {A B : MonCat} {x y : A.Hom B} :
              x = y x.hom' = y.hom'
              theorem MonCat.Hom.ext {A B : MonCat} {x y : A.Hom B} (hom' : x.hom' = y.hom') :
              x = y
              @[instance_reducible]
              Equations
              • One or more equations did not get rendered due to their size.
              @[instance_reducible]
              Equations
              • One or more equations did not get rendered due to their size.
              @[instance_reducible]
              Equations
              • One or more equations did not get rendered due to their size.
              @[instance_reducible]
              Equations
              • One or more equations did not get rendered due to their size.
              @[reducible, inline]
              abbrev MonCat.Hom.hom {X Y : MonCat} (f : X.Hom Y) :
              X →* Y

              Turn a morphism in MonCat back into a MonoidHom.

              Equations
              Instances For
                @[reducible, inline]
                abbrev AddMonCat.Hom.hom {X Y : AddMonCat} (f : X.Hom Y) :
                X →+ Y

                Turn a morphism in AddMonCat back into an AddMonoidHom.

                Equations
                Instances For
                  @[reducible, inline]
                  abbrev MonCat.ofHom {X Y : Type u} [Monoid X] [Monoid Y] (f : X →* Y) :
                  X Y

                  Typecheck a MonoidHom as a morphism in MonCat.

                  Equations
                  Instances For
                    @[reducible, inline]
                    abbrev AddMonCat.ofHom {X Y : Type u} [AddMonoid X] [AddMonoid Y] (f : X →+ Y) :
                    X Y

                    Typecheck an AddMonoidHom as a morphism in AddMonCat.

                    Equations
                    Instances For
                      def MonCat.Hom.Simps.hom (X Y : MonCat) (f : X.Hom Y) :
                      X →* Y

                      Use the ConcreteCategory.hom projection for @[simps] lemmas.

                      Equations
                      Instances For
                        def AddMonCat.Hom.Simps.hom (X Y : AddMonCat) (f : X.Hom Y) :
                        X →+ Y

                        Use the ConcreteCategory.hom projection for @[simps] lemmas.

                        Equations
                        Instances For

                          The results below duplicate the ConcreteCategory simp lemmas, but we can keep them for dsimp.

                          theorem MonCat.ext {X Y : MonCat} {f g : X Y} (w : ∀ (x : X), (CategoryTheory.ConcreteCategory.hom f) x = (CategoryTheory.ConcreteCategory.hom g) x) :
                          f = g
                          theorem AddMonCat.ext {X Y : AddMonCat} {f g : X Y} (w : ∀ (x : X), (CategoryTheory.ConcreteCategory.hom f) x = (CategoryTheory.ConcreteCategory.hom g) x) :
                          f = g
                          theorem MonCat.coe_of (M : Type u) [Monoid M] :
                          M = M
                          theorem AddMonCat.coe_of (M : Type u) [AddMonoid M] :
                          M = M
                          @[simp]
                          theorem MonCat.hom_comp {M N T : MonCat} (f : M N) (g : N T) :
                          @[simp]
                          theorem AddMonCat.hom_comp {M N T : AddMonCat} (f : M N) (g : N T) :
                          theorem MonCat.hom_ext {M N : MonCat} {f g : M N} (hf : Hom.hom f = Hom.hom g) :
                          f = g
                          theorem AddMonCat.hom_ext {M N : AddMonCat} {f g : M N} (hf : Hom.hom f = Hom.hom g) :
                          f = g
                          theorem AddMonCat.hom_ext_iff {M N : AddMonCat} {f g : M N} :
                          theorem MonCat.hom_ext_iff {M N : MonCat} {f g : M N} :
                          @[simp]
                          theorem MonCat.hom_ofHom {M N : Type u} [Monoid M] [Monoid N] (f : M →* N) :
                          @[simp]
                          theorem AddMonCat.hom_ofHom {M N : Type u} [AddMonoid M] [AddMonoid N] (f : M →+ N) :
                          @[simp]
                          theorem MonCat.ofHom_hom {M N : MonCat} (f : M N) :
                          @[simp]
                          theorem AddMonCat.ofHom_hom {M N : AddMonCat} (f : M N) :
                          @[simp]
                          theorem MonCat.ofHom_comp {M N P : Type u} [Monoid M] [Monoid N] [Monoid P] (f : M →* N) (g : N →* P) :
                          @[simp]
                          theorem AddMonCat.ofHom_comp {M N P : Type u} [AddMonoid M] [AddMonoid N] [AddMonoid P] (f : M →+ N) (g : N →+ P) :
                          theorem MonCat.ofHom_apply {X Y : Type u} [Monoid X] [Monoid Y] (f : X →* Y) (x : X) :
                          theorem AddMonCat.ofHom_apply {X Y : Type u} [AddMonoid X] [AddMonoid Y] (f : X →+ Y) (x : X) :
                          @[instance_reducible]
                          Equations
                          @[instance_reducible]
                          Equations
                          @[instance_reducible]
                          instance MonCat.instOneHom (X Y : MonCat) :
                          One (X Y)
                          Equations
                          @[instance_reducible]
                          instance AddMonCat.instZeroHom (X Y : AddMonCat) :
                          Zero (X Y)
                          Equations
                          @[simp]
                          theorem MonCat.hom_one (X Y : MonCat) :
                          @[simp]
                          theorem AddMonCat.hom_zero (X Y : AddMonCat) :
                          theorem MonCat.oneHom_apply (X Y : MonCat) (x : X) :
                          (Hom.hom 1) x = 1
                          theorem AddMonCat.zeroHom_apply (X Y : AddMonCat) (x : X) :
                          (Hom.hom 0) x = 0
                          @[simp]
                          theorem MonCat.one_of {A : Type u_1} [Monoid A] :
                          1 = 1
                          @[simp]
                          theorem AddMonCat.zero_of {A : Type u_1} [AddMonoid A] :
                          0 = 0
                          @[simp]
                          theorem MonCat.mul_of {A : Type u_1} [Monoid A] (a b : A) :
                          a * b = a * b
                          @[simp]
                          theorem AddMonCat.add_of {A : Type u_1} [AddMonoid A] (a b : A) :
                          a + b = a + b

                          Universe lift functor for monoids.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For

                            Universe lift functor for additive monoids.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              structure AddCommMonCat :
                              Type (u + 1)

                              The category of additive commutative monoids and monoid morphisms.

                              Instances For
                                structure CommMonCat :
                                Type (u + 1)

                                The category of commutative monoids and monoid morphisms.

                                Instances For
                                  @[reducible, inline]

                                  Construct a bundled CommMonCat from the underlying type and typeclass.

                                  Equations
                                  • M = { carrier := M, str := inst✝ }
                                  Instances For
                                    @[reducible, inline]

                                    Construct a bundled AddCommMonCat from the underlying type and typeclass.

                                    Equations
                                    • M = { carrier := M, str := inst✝ }
                                    Instances For
                                      structure AddCommMonCat.Hom (A B : AddCommMonCat) :

                                      The type of morphisms in AddCommMonCat.

                                      • _mkInternal :: (
                                        • hom' : A →+ B

                                          The underlying monoid homomorphism.

                                      • )
                                      Instances For
                                        theorem AddCommMonCat.Hom.ext {A B : AddCommMonCat} {x y : A.Hom B} (hom' : x.hom' = y.hom') :
                                        x = y
                                        theorem AddCommMonCat.Hom.ext_iff {A B : AddCommMonCat} {x y : A.Hom B} :
                                        x = y x.hom' = y.hom'
                                        structure CommMonCat.Hom (A B : CommMonCat) :

                                        The type of morphisms in CommMonCat.

                                        • _mkInternal :: (
                                          • hom' : A →* B

                                            The underlying monoid homomorphism.

                                        • )
                                        Instances For
                                          theorem CommMonCat.Hom.ext_iff {A B : CommMonCat} {x y : A.Hom B} :
                                          x = y x.hom' = y.hom'
                                          theorem CommMonCat.Hom.ext {A B : CommMonCat} {x y : A.Hom B} (hom' : x.hom' = y.hom') :
                                          x = y
                                          @[instance_reducible]
                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          @[instance_reducible]
                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          @[instance_reducible]
                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          @[instance_reducible]
                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          @[reducible, inline]
                                          abbrev CommMonCat.Hom.hom {X Y : CommMonCat} (f : X.Hom Y) :
                                          X →* Y

                                          Turn a morphism in CommMonCat back into a MonoidHom.

                                          Equations
                                          Instances For
                                            @[reducible, inline]
                                            abbrev AddCommMonCat.Hom.hom {X Y : AddCommMonCat} (f : X.Hom Y) :
                                            X →+ Y

                                            Turn a morphism in AddCommMonCat back into an AddMonoidHom.

                                            Equations
                                            Instances For
                                              @[reducible, inline]
                                              abbrev CommMonCat.ofHom {X Y : Type u} [CommMonoid X] [CommMonoid Y] (f : X →* Y) :
                                              X Y

                                              Typecheck a MonoidHom as a morphism in CommMonCat.

                                              Equations
                                              Instances For
                                                @[reducible, inline]
                                                abbrev AddCommMonCat.ofHom {X Y : Type u} [AddCommMonoid X] [AddCommMonoid Y] (f : X →+ Y) :
                                                X Y

                                                Typecheck an AddMonoidHom as a morphism in AddCommMonCat.

                                                Equations
                                                Instances For
                                                  def CommMonCat.Hom.Simps.hom (X Y : CommMonCat) (f : X.Hom Y) :
                                                  X →* Y

                                                  Use the ConcreteCategory.hom projection for @[simps] lemmas.

                                                  Equations
                                                  Instances For
                                                    def AddCommMonCat.Hom.Simps.hom (X Y : AddCommMonCat) (f : X.Hom Y) :
                                                    X →+ Y

                                                    Use the ConcreteCategory.hom projection for @[simps] lemmas.

                                                    Equations
                                                    Instances For

                                                      The results below duplicate the ConcreteCategory simp lemmas, but we can keep them for dsimp.

                                                      theorem CommMonCat.ext {X Y : CommMonCat} {f g : X Y} (w : ∀ (x : X), (CategoryTheory.ConcreteCategory.hom f) x = (CategoryTheory.ConcreteCategory.hom g) x) :
                                                      f = g
                                                      @[simp]
                                                      theorem CommMonCat.hom_ext {M N : CommMonCat} {f g : M N} (hf : Hom.hom f = Hom.hom g) :
                                                      f = g
                                                      theorem AddCommMonCat.hom_ext {M N : AddCommMonCat} {f g : M N} (hf : Hom.hom f = Hom.hom g) :
                                                      f = g
                                                      theorem AddCommMonCat.hom_ext_iff {M N : AddCommMonCat} {f g : M N} :
                                                      theorem CommMonCat.hom_ext_iff {M N : CommMonCat} {f g : M N} :
                                                      @[simp]
                                                      theorem CommMonCat.hom_ofHom {M N : Type u} [CommMonoid M] [CommMonoid N] (f : M →* N) :
                                                      @[simp]
                                                      theorem AddCommMonCat.hom_ofHom {M N : Type u} [AddCommMonoid M] [AddCommMonoid N] (f : M →+ N) :
                                                      @[simp]
                                                      theorem CommMonCat.ofHom_hom {M N : CommMonCat} (f : M N) :
                                                      @[simp]
                                                      theorem AddCommMonCat.ofHom_hom {M N : AddCommMonCat} (f : M N) :
                                                      @[simp]
                                                      theorem CommMonCat.ofHom_comp {M N P : Type u} [CommMonoid M] [CommMonoid N] [CommMonoid P] (f : M →* N) (g : N →* P) :
                                                      theorem CommMonCat.coe_of (R : Type u) [CommMonoid R] :
                                                      R = R
                                                      theorem AddCommMonCat.coe_of (R : Type u) [AddCommMonoid R] :
                                                      R = R
                                                      @[instance_reducible]
                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      @[instance_reducible]
                                                      Equations
                                                      • One or more equations did not get rendered due to their size.

                                                      The forgetful functor from CommMonCat to MonCat is fully faithful.

                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      Instances For

                                                        The forgetful functor from AddCommMonCat to AddMonCat is fully faithful.

                                                        Equations
                                                        • One or more equations did not get rendered due to their size.
                                                        Instances For

                                                          Universe lift functor for commutative monoids.

                                                          Equations
                                                          • One or more equations did not get rendered due to their size.
                                                          Instances For

                                                            Universe lift functor for additive commutative monoids.

                                                            Equations
                                                            • One or more equations did not get rendered due to their size.
                                                            Instances For
                                                              def MulEquiv.toMonCatIso {X Y : Type u} [Monoid X] [Monoid Y] (e : X ≃* Y) :
                                                              X Y

                                                              Build an isomorphism in the category MonCat from a MulEquiv between Monoids.

                                                              Equations
                                                              Instances For
                                                                def AddEquiv.toAddMonCatIso {X Y : Type u} [AddMonoid X] [AddMonoid Y] (e : X ≃+ Y) :
                                                                X Y

                                                                Build an isomorphism in the category AddMonCat from an AddEquiv between AddMonoids.

                                                                Equations
                                                                Instances For
                                                                  def MulEquiv.toCommMonCatIso {X Y : Type u} [CommMonoid X] [CommMonoid Y] (e : X ≃* Y) :
                                                                  X Y

                                                                  Build an isomorphism in the category CommMonCat from a MulEquiv between CommMonoids.

                                                                  Equations
                                                                  Instances For
                                                                    def AddEquiv.toAddCommMonCatIso {X Y : Type u} [AddCommMonoid X] [AddCommMonoid Y] (e : X ≃+ Y) :
                                                                    X Y

                                                                    Build an isomorphism in the category AddCommMonCat from an AddEquiv between AddCommMonoids.

                                                                    Equations
                                                                    Instances For
                                                                      def CategoryTheory.Iso.monCatIsoToMulEquiv {X Y : MonCat} (i : X Y) :
                                                                      X ≃* Y

                                                                      Build a MulEquiv from an isomorphism in the category MonCat.

                                                                      Equations
                                                                      Instances For

                                                                        Build an AddEquiv from an isomorphism in the category AddMonCat.

                                                                        Equations
                                                                        Instances For

                                                                          Build a MulEquiv from an isomorphism in the category CommMonCat.

                                                                          Equations
                                                                          Instances For

                                                                            Build an AddEquiv from an isomorphism in the category AddCommMonCat.

                                                                            Equations
                                                                            Instances For
                                                                              def mulEquivIsoMonCatIso {X Y : Type u} [Monoid X] [Monoid Y] :
                                                                              X ≃* Y X Y

                                                                              multiplicative equivalences between Monoids are the same as (isomorphic to) isomorphisms in MonCat

                                                                              Equations
                                                                              Instances For
                                                                                def addEquivIsoAddMonCatIso {X Y : Type u} [AddMonoid X] [AddMonoid Y] :
                                                                                X ≃+ Y X Y

                                                                                additive equivalences between AddMonoids are the same as (isomorphic to) isomorphisms in AddMonCat

                                                                                Equations
                                                                                Instances For
                                                                                  def mulEquivIsoCommMonCatIso {X Y : Type u} [CommMonoid X] [CommMonoid Y] :
                                                                                  X ≃* Y X Y

                                                                                  multiplicative equivalences between CommMonoids are the same as (isomorphic to) isomorphisms in CommMonCat

                                                                                  Equations
                                                                                  Instances For

                                                                                    additive equivalences between AddCommMonoids are the same as (isomorphic to) isomorphisms in AddCommMonCat

                                                                                    Equations
                                                                                    • One or more equations did not get rendered due to their size.
                                                                                    Instances For

                                                                                      Ensure that forget₂ CommMonCat MonCat automatically reflects isomorphisms.

                                                                                      Ensure that forget₂ AddCommMonCat AddMonCat automatically reflects isomorphisms.

                                                                                      @[simp] lemmas for MonoidHom.comp and categorical identities.

                                                                                      The equivalence between AddMonCat and MonCat.

                                                                                      Equations
                                                                                      • One or more equations did not get rendered due to their size.
                                                                                      Instances For
                                                                                        @[simp]
                                                                                        theorem AddMonCat.equivalence_counitIso :
                                                                                        equivalence.counitIso = CategoryTheory.Iso.refl ({ obj := fun (X : MonCat) => (Additive X), map := fun {X Y : MonCat} (f : X Y) => ofHom (MonoidHom.toAdditive (MonCat.Hom.hom f)), map_id := equivalence._proof_3, map_comp := @equivalence._proof_4 }.comp { obj := fun (X : AddMonCat) => (Multiplicative X), map := fun {X Y : AddMonCat} (f : X Y) => MonCat.ofHom (AddMonoidHom.toMultiplicative (Hom.hom f)), map_id := equivalence._proof_1, map_comp := @equivalence._proof_2 })

                                                                                        The equivalence between AddCommMonCat and CommMonCat.

                                                                                        Equations
                                                                                        • One or more equations did not get rendered due to their size.
                                                                                        Instances For
                                                                                          @[simp]
                                                                                          theorem AddCommMonCat.equivalence_counitIso :
                                                                                          equivalence.counitIso = CategoryTheory.Iso.refl ({ obj := fun (X : CommMonCat) => (Additive X), map := fun {X Y : CommMonCat} (f : X Y) => ofHom (MonoidHom.toAdditive (CommMonCat.Hom.hom f)), map_id := equivalence._proof_3, map_comp := @equivalence._proof_4 }.comp { obj := fun (X : AddCommMonCat) => (Multiplicative X), map := fun {X Y : AddCommMonCat} (f : X Y) => CommMonCat.ofHom (AddMonoidHom.toMultiplicative (Hom.hom f)), map_id := equivalence._proof_1, map_comp := @equivalence._proof_2 })