Documentation

Mathlib.Algebra.Category.MonCat.Basic

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

We introduce the bundled categories:

structure AddMonCat :
Type (u + 1)

The category of additive groups and group morphisms.

Instances For
    structure MonCat :
    Type (u + 1)

    The category of groups and group 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 R.

          • 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
            structure MonCat.Hom (A B : MonCat) :

            The type of morphisms in MonCat R.

            • hom' : A →* B

              The underlying monoid homomorphism.

            Instances For
              theorem MonCat.Hom.ext {A B : MonCat} {x y : A.Hom B} (hom' : x.hom' = y.hom') :
              x = y
              Equations
              • One or more equations did not get rendered due to their size.
              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) :
                  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 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.ext {X Y : MonCat} {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 AddMonCat.hom_ext {M N : AddMonCat} {f g : M N} (hf : Hom.hom f = Hom.hom g) :
                        f = g
                        theorem MonCat.hom_ext {M N : MonCat} {f g : M N} (hf : Hom.hom f = Hom.hom g) :
                        f = g
                        @[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
                        • 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 groups and group morphisms.

                            Instances For
                              structure CommMonCat :
                              Type (u + 1)

                              The category of groups and group 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 R.

                                    • 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
                                      structure CommMonCat.Hom (A B : CommMonCat) :

                                      The type of morphisms in CommMonCat R.

                                      • hom' : A →* B

                                        The underlying monoid homomorphism.

                                      Instances For
                                        theorem CommMonCat.Hom.ext {A B : CommMonCat} {x y : A.Hom B} (hom' : x.hom' = y.hom') :
                                        x = y
                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        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) :
                                            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 AddCommMonCat.hom_ext {M N : AddCommMonCat} {f g : M N} (hf : Hom.hom f = Hom.hom g) :
                                                    f = g
                                                    theorem CommMonCat.hom_ext {M N : CommMonCat} {f g : M N} (hf : Hom.hom f = Hom.hom g) :
                                                    f = g
                                                    @[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
                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Equations
                                                    • One or more equations did not get rendered due to their size.

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

                                                        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
                                                                              • One or more equations did not get rendered due to their size.
                                                                              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
                                                                                • 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) => 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
                                                                                  • One or more equations did not get rendered due to their size.
                                                                                  Instances For
                                                                                    @[simp]