Documentation

Mathlib.Algebra.Category.MonCat.Basic

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

We introduce the bundled categories:

def MonCat :
Type (u + 1)

The category of monoids and monoid morphisms.

Equations
Instances For
    def AddMonCat :
    Type (u + 1)

    The category of additive monoids and monoid morphisms.

    Equations
    Instances For
      @[reducible, inline]
      abbrev MonCat.AssocMonoidHom (M : Type u_1) (N : Type u_2) [Monoid M] [Monoid N] :
      Type (max u_1 u_2)

      MonoidHom doesn't actually assume associativity. This alias is needed to make the category theory machinery work.

      Equations
      Instances For
        @[reducible, inline]
        abbrev AddMonCat.AssocAddMonoidHom (M : Type u_1) (N : Type u_2) [AddMonoid M] [AddMonoid N] :
        Type (max u_1 u_2)

        AddMonoidHom doesn't actually assume associativity. This alias is needed to make the category theory machinery work.

        Equations
        Instances For
          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.
          Equations
          Equations
          instance MonCat.instMonoidα (X : MonCat) :
          Monoid X
          Equations
          • X.instMonoidα = X.str
          Equations
          • X.instMonoidα = X.str
          instance MonCat.instCoeFunHomForallαMonoid {X Y : MonCat} :
          CoeFun (X Y) fun (x : X Y) => XY
          Equations
          • MonCat.instCoeFunHomForallαMonoid = { coe := fun (f : X →* Y) => f }
          instance AddMonCat.instCoeFunHomForallαAddMonoid {X Y : AddMonCat} :
          CoeFun (X Y) fun (x : X Y) => XY
          Equations
          • AddMonCat.instCoeFunHomForallαAddMonoid = { coe := fun (f : X →+ Y) => f }
          instance MonCat.instFunLike (X Y : MonCat) :
          FunLike (X Y) X Y
          Equations
          instance AddMonCat.instFunLike (X Y : AddMonCat) :
          FunLike (X Y) X Y
          Equations
          instance MonCat.instMonoidHomClass (X Y : MonCat) :
          MonoidHomClass (X Y) X Y
          @[simp]
          theorem MonCat.coe_comp {X Y Z : MonCat} {f : X Y} {g : Y Z} :
          @[simp]
          theorem AddMonCat.coe_comp {X Y Z : AddMonCat} {f : X Y} {g : Y Z} :
          @[simp]
          theorem MonCat.forget_map {X Y : MonCat} (f : X Y) :
          @[simp]
          theorem AddMonCat.forget_map {X Y : AddMonCat} (f : X Y) :
          theorem AddMonCat.ext {X Y : AddMonCat} {f g : X Y} (w : ∀ (x : X), f x = g x) :
          f = g
          theorem MonCat.ext {X Y : MonCat} {f g : X Y} (w : ∀ (x : X), f x = g x) :
          f = g
          def MonCat.of (M : Type u) [Monoid M] :

          Construct a bundled MonCat from the underlying type and typeclass.

          Equations
          Instances For

            Construct a bundled AddMonCat from the underlying type and typeclass.

            Equations
            Instances For
              theorem MonCat.coe_of (R : Type u) [Monoid R] :
              (MonCat.of R) = R
              theorem AddMonCat.coe_of (R : Type u) [AddMonoid R] :
              (AddMonCat.of R) = R
              def MonCat.ofHom {X Y : Type u} [Monoid X] [Monoid Y] (f : X →* Y) :

              Typecheck a MonoidHom as a morphism in MonCat.

              Equations
              Instances For

                Typecheck an AddMonoidHom as a morphism in AddMonCat.

                Equations
                Instances For
                  @[simp]
                  theorem MonCat.ofHom_apply {X Y : Type u} [Monoid X] [Monoid Y] (f : X →* Y) (x : X) :
                  (MonCat.ofHom f) x = f x
                  @[simp]
                  theorem AddMonCat.ofHom_apply {X Y : Type u} [AddMonoid X] [AddMonoid Y] (f : X →+ Y) (x : X) :
                  (AddMonCat.ofHom f) x = f x
                  instance MonCat.instOneHom (X Y : MonCat) :
                  One (X Y)
                  Equations
                  instance AddMonCat.instZeroHom (X Y : AddMonCat) :
                  Zero (X Y)
                  Equations
                  @[simp]
                  theorem MonCat.oneHom_apply (X Y : MonCat) (x : X) :
                  1 x = 1
                  @[simp]
                  theorem AddMonCat.zeroHom_apply (X Y : AddMonCat) (x : X) :
                  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
                  instance MonCat.instGroupαMonoidOf {G : Type u_1} [Group G] :
                  Equations
                  • MonCat.instGroupαMonoidOf = inst✝
                  Equations
                  • AddMonCat.instGroupαAddMonoidOf = inst✝

                  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
                      @[simp]
                      theorem AddMonCat.uliftFunctor_map {x✝ x✝¹ : AddMonCat} (f : x✝ x✝¹) :
                      AddMonCat.uliftFunctor.map f = AddMonCat.ofHom (AddEquiv.ulift.symm.toAddMonoidHom.comp (AddMonoidHom.comp f AddEquiv.ulift.toAddMonoidHom))
                      @[simp]
                      theorem MonCat.uliftFunctor_map {x✝ x✝¹ : MonCat} (f : x✝ x✝¹) :
                      MonCat.uliftFunctor.map f = MonCat.ofHom (MulEquiv.ulift.symm.toMonoidHom.comp (MonoidHom.comp f MulEquiv.ulift.toMonoidHom))
                      def CommMonCat :
                      Type (u + 1)

                      The category of commutative monoids and monoid morphisms.

                      Equations
                      Instances For
                        def AddCommMonCat :
                        Type (u + 1)

                        The category of additive commutative monoids and monoid morphisms.

                        Equations
                        Instances For
                          Equations
                          • X.instCommMonoidα = X.str
                          Equations
                          • X.instCommMonoidα = X.str
                          instance CommMonCat.instCoeFunHomForallαCommMonoid {X Y : CommMonCat} :
                          CoeFun (X Y) fun (x : X Y) => XY
                          Equations
                          • CommMonCat.instCoeFunHomForallαCommMonoid = { coe := fun (f : X →* Y) => f }
                          instance AddCommMonCat.instCoeFunHomForallαAddCommMonoid {X Y : AddCommMonCat} :
                          CoeFun (X Y) fun (x : X Y) => XY
                          Equations
                          • AddCommMonCat.instCoeFunHomForallαAddCommMonoid = { coe := fun (f : X →+ Y) => f }
                          instance CommMonCat.instFunLike (X Y : CommMonCat) :
                          FunLike (X Y) X Y
                          Equations
                          • X.instFunLike Y = inferInstance
                          instance AddCommMonCat.instFunLike (X Y : AddCommMonCat) :
                          FunLike (X Y) X Y
                          Equations
                          • X.instFunLike Y = inferInstance
                          @[simp]
                          theorem CommMonCat.coe_comp {X Y Z : CommMonCat} {f : X Y} {g : Y Z} :
                          @[simp]
                          theorem AddCommMonCat.coe_comp {X Y Z : AddCommMonCat} {f : X Y} {g : Y Z} :
                          @[simp]
                          theorem CommMonCat.forget_map {X Y : CommMonCat} (f : X Y) :
                          theorem AddCommMonCat.ext {X Y : AddCommMonCat} {f g : X Y} (w : ∀ (x : X), f x = g x) :
                          f = g
                          theorem CommMonCat.ext {X Y : CommMonCat} {f g : X Y} (w : ∀ (x : X), f x = g x) :
                          f = g

                          Construct a bundled CommMonCat from the underlying type and typeclass.

                          Equations
                          Instances For

                            Construct a bundled AddCommMonCat from the underlying type and typeclass.

                            Equations
                            Instances For
                              theorem CommMonCat.coe_of (R : Type u) [CommMonoid R] :
                              (CommMonCat.of R) = R

                              Typecheck a MonoidHom as a morphism in CommMonCat.

                              Equations
                              Instances For

                                Typecheck an AddMonoidHom as a morphism in AddCommMonCat.

                                Equations
                                Instances For
                                  @[simp]
                                  theorem CommMonCat.ofHom_apply {X Y : Type u} [CommMonoid X] [CommMonoid Y] (f : X →* Y) (x : X) :
                                  @[simp]
                                  theorem AddCommMonCat.ofHom_apply {X Y : Type u} [AddCommMonoid X] [AddCommMonoid Y] (f : X →+ Y) (x : X) :

                                  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
                                      @[simp]
                                      theorem CommMonCat.uliftFunctor_map {x✝ x✝¹ : CommMonCat} (f : x✝ x✝¹) :
                                      CommMonCat.uliftFunctor.map f = CommMonCat.ofHom (MulEquiv.ulift.symm.toMonoidHom.comp (MonoidHom.comp f MulEquiv.ulift.toMonoidHom))
                                      @[simp]
                                      theorem AddCommMonCat.uliftFunctor_map {x✝ x✝¹ : AddCommMonCat} (f : x✝ x✝¹) :
                                      AddCommMonCat.uliftFunctor.map f = AddCommMonCat.ofHom (AddEquiv.ulift.symm.toAddMonoidHom.comp (AddMonoidHom.comp f AddEquiv.ulift.toAddMonoidHom))
                                      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
                                      • e.toMonCatIso = { hom := MonCat.ofHom e.toMonoidHom, inv := MonCat.ofHom e.symm.toMonoidHom, hom_inv_id := , inv_hom_id := }
                                      Instances For

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

                                        Equations
                                        Instances For
                                          @[simp]
                                          theorem AddEquiv.toAddMonCatIso_inv {X Y : Type u} [AddMonoid X] [AddMonoid Y] (e : X ≃+ Y) :
                                          e.toAddMonCatIso.inv = AddMonCat.ofHom e.symm.toAddMonoidHom
                                          @[simp]
                                          theorem AddEquiv.toAddMonCatIso_hom {X Y : Type u} [AddMonoid X] [AddMonoid Y] (e : X ≃+ Y) :
                                          e.toAddMonCatIso.hom = AddMonCat.ofHom e.toAddMonoidHom
                                          @[simp]
                                          theorem MulEquiv.toMonCatIso_inv {X Y : Type u} [Monoid X] [Monoid Y] (e : X ≃* Y) :
                                          e.toMonCatIso.inv = MonCat.ofHom e.symm.toMonoidHom
                                          @[simp]
                                          theorem MulEquiv.toMonCatIso_hom {X Y : Type u} [Monoid X] [Monoid Y] (e : X ≃* Y) :
                                          e.toMonCatIso.hom = MonCat.ofHom e.toMonoidHom

                                          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
                                              @[simp]
                                              theorem MulEquiv.toCommMonCatIso_hom {X Y : Type u} [CommMonoid X] [CommMonoid Y] (e : X ≃* Y) :
                                              e.toCommMonCatIso.hom = CommMonCat.ofHom e.toMonoidHom
                                              @[simp]
                                              theorem AddEquiv.toAddCommMonCatIso_inv {X Y : Type u} [AddCommMonoid X] [AddCommMonoid Y] (e : X ≃+ Y) :
                                              e.toAddCommMonCatIso.inv = AddCommMonCat.ofHom e.symm.toAddMonoidHom
                                              @[simp]
                                              theorem MulEquiv.toCommMonCatIso_inv {X Y : Type u} [CommMonoid X] [CommMonoid Y] (e : X ≃* Y) :
                                              e.toCommMonCatIso.inv = CommMonCat.ofHom e.symm.toMonoidHom
                                              @[simp]
                                              theorem AddEquiv.toAddCommMonCatIso_hom {X Y : Type u} [AddCommMonoid X] [AddCommMonoid Y] (e : X ≃+ Y) :
                                              e.toAddCommMonCatIso.hom = AddCommMonCat.ofHom e.toAddMonoidHom
                                              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
                                                      • mulEquivIsoMonCatIso = { hom := fun (e : X ≃* Y) => e.toMonCatIso, inv := fun (i : MonCat.of X MonCat.of Y) => i.monCatIsoToMulEquiv, hom_inv_id := , inv_hom_id := }
                                                      Instances For

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

                                                        Equations
                                                        • addEquivIsoAddMonCatIso = { hom := fun (e : X ≃+ Y) => e.toAddMonCatIso, inv := fun (i : AddMonCat.of X AddMonCat.of Y) => i.addMonCatIsoToAddEquiv, hom_inv_id := , inv_hom_id := }
                                                        Instances For

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

                                                          Equations
                                                          • mulEquivIsoCommMonCatIso = { hom := fun (e : X ≃* Y) => e.toCommMonCatIso, inv := fun (i : CommMonCat.of X CommMonCat.of Y) => i.commMonCatIsoToMulEquiv, hom_inv_id := , inv_hom_id := }
                                                          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

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

                                                              @[simp]
                                                              theorem MonoidHom.comp_id_monCat {G : MonCat} {H : Type u} [Monoid H] (f : G →* H) :
                                                              @[simp]
                                                              theorem AddMonoidHom.comp_id_monCat {G : AddMonCat} {H : Type u} [AddMonoid H] (f : G →+ H) :
                                                              @[simp]