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
      @[reducible, inline]
      abbrev MonCat.of (M : Type u) [Monoid M] :

      Construct a bundled MonCat from the underlying type and typeclass.

      Equations
        Instances For
          @[reducible, inline]
          abbrev AddMonCat.of (M : Type u) [AddMonoid M] :

          Construct a bundled AddMonCat from the underlying type and typeclass.

          Equations
            Instances For
              structure AddMonCat.Hom (A B : AddMonCat) :

              The type of morphisms in AddMonCat.

              • hom' : A →+ B

                The underlying monoid homomorphism.

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

                The type of morphisms in MonCat.

                • 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
                  @[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) :
                          of X of 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) :
                              of X of 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

                                      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] :
                                      (of M) = M
                                      theorem AddMonCat.coe_of (M : Type u) [AddMonoid M] :
                                      (of 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 MonCat.instOneHom (X Y : MonCat) :
                                      One (X Y)
                                      Equations
                                        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
                                            Instances For

                                              Universe lift functor for additive monoids.

                                              Equations
                                                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
                                                        Instances For
                                                          @[reducible, inline]

                                                          Construct a bundled AddCommMonCat from the underlying type and typeclass.

                                                          Equations
                                                            Instances For
                                                              structure AddCommMonCat.Hom (A B : AddCommMonCat) :

                                                              The type of morphisms in AddCommMonCat.

                                                              • hom' : A →+ B

                                                                The underlying monoid homomorphism.

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

                                                                The type of morphisms in CommMonCat.

                                                                • 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
                                                                  @[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) :
                                                                          of X of 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) :
                                                                              of X of 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 CommMonCat.hom_ext_iff {M N : CommMonCat} {f g : M N} :
                                                                                          theorem AddCommMonCat.hom_ext_iff {M N : AddCommMonCat} {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] :
                                                                                          (of R) = R
                                                                                          theorem AddCommMonCat.coe_of (R : Type u) [AddCommMonoid R] :
                                                                                          (of R) = R

                                                                                          The forgetful functor from CommMonCat to MonCat is fully faithful.

                                                                                          Equations
                                                                                            Instances For

                                                                                              Universe lift functor for commutative monoids.

                                                                                              Equations
                                                                                                Instances For

                                                                                                  Universe lift functor for additive commutative monoids.

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

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

                                                                                                      Equations
                                                                                                        Instances For

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

                                                                                                          Equations
                                                                                                            Instances For

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

                                                                                                              Equations
                                                                                                                Instances For

                                                                                                                  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

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

                                                                                                                                      Equations
                                                                                                                                        Instances For

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

                                                                                                                                          Equations
                                                                                                                                            Instances For

                                                                                                                                              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
                                                                                                                                                    Instances For

                                                                                                                                                      Ensure that forget₂ CommMonCat MonCat automatically reflects isomorphisms. We could have used CategoryTheory.HasForget.ReflectsIso alternatively.

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

                                                                                                                                                      @[deprecated "Proven by `simp only [MonCat.hom_id, comp_id]`" (since := "2025-01-28")]
                                                                                                                                                      @[deprecated "Proven by `simp only [MonCat.hom_id, comp_id]`" (since := "2025-01-28")]
                                                                                                                                                      @[deprecated "Proven by `simp only [MonCat.hom_id, id_comp]`" (since := "2025-01-28")]
                                                                                                                                                      @[deprecated "Proven by `simp only [MonCat.hom_id, id_comp]`" (since := "2025-01-28")]
                                                                                                                                                      @[deprecated "Proven by `simp only [CommMonCat.hom_id, comp_id]`" (since := "2025-01-28")]
                                                                                                                                                      @[deprecated "Proven by `simp only [CommMonCat.hom_id, comp_id]`" (since := "2025-01-28")]
                                                                                                                                                      @[deprecated "Proven by `simp only [CommMonCat.hom_id, id_comp]`" (since := "2025-01-28")]
                                                                                                                                                      @[deprecated "Proven by `simp only [CommMonCat.hom_id, id_comp]`" (since := "2025-01-28")]

                                                                                                                                                      The equivalence between AddMonCat and MonCat.

                                                                                                                                                      Equations
                                                                                                                                                        Instances For
                                                                                                                                                          @[simp]
                                                                                                                                                          theorem AddMonCat.equivalence_counitIso :
                                                                                                                                                          equivalence.counitIso = CategoryTheory.Iso.refl ({ obj := fun (X : MonCat) => of (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) => MonCat.of (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
                                                                                                                                                            Instances For