Documentation

Mathlib.Algebra.Category.Ring.Basic

Category instances for Semiring, Ring, CommSemiring, and CommRing. #

We introduce the bundled categories:

structure SemiRingCat :
Type (u + 1)

The category of semirings.

  • carrier : Type u

    The underlying type.

  • semiring : Semiring self
Instances For
    @[reducible, inline]

    The object in the category of R-algebras associated to a type equipped with the appropriate typeclasses. This is the preferred way to construct a term of SemiRingCat.

    Equations
    Instances For
      theorem SemiRingCat.coe_of (R : Type u) [Semiring R] :
      (of R) = R
      structure SemiRingCat.Hom (R : SemiRingCat) (S : SemiRingCat) :
      Type (max u_1 u_2)

      The type of morphisms in SemiRingCat.

      • hom : R →+* S

        The underlying ring hom.

      Instances For
        theorem SemiRingCat.Hom.ext {R : SemiRingCat} {S : SemiRingCat} {x y : R.Hom S} (hom : x.hom = y.hom) :
        x = y
        instance SemiRingCat.instCoeFunHomForallCarrier {R S : SemiRingCat} :
        CoeFun (R S) fun (x : R S) => RS
        Equations
        @[simp]
        theorem SemiRingCat.hom_comp {R S T : SemiRingCat} (f : R S) (g : S T) :
        (CategoryTheory.CategoryStruct.comp f g).hom = g.hom.comp f.hom
        theorem SemiRingCat.comp_apply {R S T : SemiRingCat} (f : R S) (g : S T) (r : R) :
        (CategoryTheory.CategoryStruct.comp f g).hom r = g.hom (f.hom r)
        theorem SemiRingCat.hom_ext {R S : SemiRingCat} {f g : R S} (hf : f.hom = g.hom) :
        f = g
        @[reducible, inline]
        abbrev SemiRingCat.ofHom {R S : Type u} [Semiring R] [Semiring S] (f : R →+* S) :
        of R of S

        Typecheck a RingHom as a morphism in SemiRingCat.

        Equations
        Instances For
          theorem SemiRingCat.hom_ofHom {R S : Type u} [Semiring R] [Semiring S] (f : R →+* S) :
          (ofHom f).hom = f
          @[simp]
          theorem SemiRingCat.ofHom_hom {R S : SemiRingCat} (f : R S) :
          ofHom f.hom = f
          @[simp]
          theorem SemiRingCat.ofHom_comp {R S T : Type u} [Semiring R] [Semiring S] [Semiring T] (f : R →+* S) (g : S →+* T) :
          theorem SemiRingCat.ofHom_apply {R S : Type u} [Semiring R] [Semiring S] (f : R →+* S) (r : R) :
          (ofHom f).hom r = f r
          @[simp]
          theorem SemiRingCat.inv_hom_apply {R S : SemiRingCat} (e : R S) (r : R) :
          e.inv.hom (e.hom.hom r) = r
          @[simp]
          theorem SemiRingCat.hom_inv_apply {R S : SemiRingCat} (e : R S) (s : S) :
          e.hom.hom (e.inv.hom s) = s
          Equations
          • One or more equations did not get rendered due to their size.

          This unification hint helps with problems of the form (forget ?C).obj R =?= carrier R'.

          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.

            Ring equivalence are isomorphisms in category of semirings

            Equations
            • e.toSemiRingCatIso = { hom := { hom := e }, inv := { hom := e.symm }, hom_inv_id := , inv_hom_id := }
            Instances For
              @[simp]
              theorem RingEquiv.toSemiRingCatIso_inv_hom {R S : Type u} [Semiring R] [Semiring S] (e : R ≃+* S) :
              e.toSemiRingCatIso.inv.hom = e.symm
              @[simp]
              theorem RingEquiv.toSemiRingCatIso_hom_hom {R S : Type u} [Semiring R] [Semiring S] (e : R ≃+* S) :
              e.toSemiRingCatIso.hom.hom = e
              structure RingCat :
              Type (u + 1)

              The category of semirings.

              • carrier : Type u

                The underlying type.

              • ring : Ring self
              Instances For
                @[reducible, inline]
                abbrev RingCat.of (R : Type u) [Ring R] :

                The object in the category of R-algebras associated to a type equipped with the appropriate typeclasses. This is the preferred way to construct a term of RingCat.

                Equations
                Instances For
                  theorem RingCat.coe_of (R : Type u) [Ring R] :
                  (of R) = R
                  theorem RingCat.of_carrier (R : RingCat) :
                  of R = R
                  structure RingCat.Hom (R : RingCat) (S : RingCat) :
                  Type (max u_1 u_2)

                  The type of morphisms in RingCat.

                  • hom : R →+* S

                    The underlying ring hom.

                  Instances For
                    theorem RingCat.Hom.ext {R : RingCat} {S : RingCat} {x y : R.Hom S} (hom : x.hom = y.hom) :
                    x = y
                    instance RingCat.instCoeFunHomForallCarrier {R S : RingCat} :
                    CoeFun (R S) fun (x : R S) => RS
                    Equations
                    @[simp]
                    theorem RingCat.hom_comp {R S T : RingCat} (f : R S) (g : S T) :
                    (CategoryTheory.CategoryStruct.comp f g).hom = g.hom.comp f.hom
                    theorem RingCat.comp_apply {R S T : RingCat} (f : R S) (g : S T) (r : R) :
                    (CategoryTheory.CategoryStruct.comp f g).hom r = g.hom (f.hom r)
                    theorem RingCat.hom_ext {R S : RingCat} {f g : R S} (hf : f.hom = g.hom) :
                    f = g
                    @[reducible, inline]
                    abbrev RingCat.ofHom {R S : Type u} [Ring R] [Ring S] (f : R →+* S) :
                    of R of S

                    Typecheck a RingHom as a morphism in RingCat.

                    Equations
                    Instances For
                      theorem RingCat.hom_ofHom {R S : Type u} [Ring R] [Ring S] (f : R →+* S) :
                      (ofHom f).hom = f
                      @[simp]
                      theorem RingCat.ofHom_hom {R S : RingCat} (f : R S) :
                      ofHom f.hom = f
                      @[simp]
                      theorem RingCat.ofHom_comp {R S T : Type u} [Ring R] [Ring S] [Ring T] (f : R →+* S) (g : S →+* T) :
                      theorem RingCat.ofHom_apply {R S : Type u} [Ring R] [Ring S] (f : R →+* S) (r : R) :
                      (ofHom f).hom r = f r
                      @[simp]
                      theorem RingCat.inv_hom_apply {R S : RingCat} (e : R S) (r : R) :
                      e.inv.hom (e.hom.hom r) = r
                      @[simp]
                      theorem RingCat.hom_inv_apply {R S : RingCat} (e : R S) (s : S) :
                      e.hom.hom (e.inv.hom s) = s
                      Equations
                      • One or more equations did not get rendered due to their size.

                      This unification hint helps with problems of the form (forget ?C).obj R =?= carrier R'.

                      An example where this is needed is in applying PresheafOfModules.Sheafify.app_eq_of_isLocallyInjective.

                      Equations
                      Instances For
                        theorem RingCat.forget_map {R S : RingCat} (f : R S) :
                        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.
                        def RingEquiv.toRingCatIso {R S : Type u} [Ring R] [Ring S] (e : R ≃+* S) :

                        Ring equivalence are isomorphisms in category of semirings

                        Equations
                        • e.toRingCatIso = { hom := { hom := e }, inv := { hom := e.symm }, hom_inv_id := , inv_hom_id := }
                        Instances For
                          @[simp]
                          theorem RingEquiv.toRingCatIso_hom_hom {R S : Type u} [Ring R] [Ring S] (e : R ≃+* S) :
                          e.toRingCatIso.hom.hom = e
                          @[simp]
                          theorem RingEquiv.toRingCatIso_inv_hom {R S : Type u} [Ring R] [Ring S] (e : R ≃+* S) :
                          e.toRingCatIso.inv.hom = e.symm
                          structure CommSemiRingCat :
                          Type (u + 1)

                          The category of semirings.

                          Instances For
                            @[reducible, inline]

                            The object in the category of R-algebras associated to a type equipped with the appropriate typeclasses. This is the preferred way to construct a term of CommSemiRingCat.

                            Equations
                            Instances For
                              theorem CommSemiRingCat.coe_of (R : Type u) [CommSemiring R] :
                              (of R) = R
                              structure CommSemiRingCat.Hom (R : CommSemiRingCat) (S : CommSemiRingCat) :
                              Type (max u_1 u_2)

                              The type of morphisms in CommSemiRingCat.

                              • hom : R →+* S

                                The underlying ring hom.

                              Instances For
                                theorem CommSemiRingCat.Hom.ext {R : CommSemiRingCat} {S : CommSemiRingCat} {x y : R.Hom S} (hom : x.hom = y.hom) :
                                x = y
                                instance CommSemiRingCat.instCoeFunHomForallCarrier {R S : CommSemiRingCat} :
                                CoeFun (R S) fun (x : R S) => RS
                                Equations
                                @[simp]
                                theorem CommSemiRingCat.hom_comp {R S T : CommSemiRingCat} (f : R S) (g : S T) :
                                (CategoryTheory.CategoryStruct.comp f g).hom = g.hom.comp f.hom
                                theorem CommSemiRingCat.comp_apply {R S T : CommSemiRingCat} (f : R S) (g : S T) (r : R) :
                                (CategoryTheory.CategoryStruct.comp f g).hom r = g.hom (f.hom r)
                                theorem CommSemiRingCat.hom_ext {R S : CommSemiRingCat} {f g : R S} (hf : f.hom = g.hom) :
                                f = g
                                @[reducible, inline]
                                abbrev CommSemiRingCat.ofHom {R S : Type u} [CommSemiring R] [CommSemiring S] (f : R →+* S) :
                                of R of S

                                Typecheck a RingHom as a morphism in CommSemiRingCat.

                                Equations
                                Instances For
                                  theorem CommSemiRingCat.hom_ofHom {R S : Type u} [CommSemiring R] [CommSemiring S] (f : R →+* S) :
                                  (ofHom f).hom = f
                                  @[simp]
                                  theorem CommSemiRingCat.ofHom_hom {R S : CommSemiRingCat} (f : R S) :
                                  ofHom f.hom = f
                                  @[simp]
                                  theorem CommSemiRingCat.ofHom_apply {R S : Type u} [CommSemiring R] [CommSemiring S] (f : R →+* S) (r : R) :
                                  (ofHom f).hom r = f r
                                  @[simp]
                                  theorem CommSemiRingCat.inv_hom_apply {R S : CommSemiRingCat} (e : R S) (r : R) :
                                  e.inv.hom (e.hom.hom r) = r
                                  @[simp]
                                  theorem CommSemiRingCat.hom_inv_apply {R S : CommSemiRingCat} (e : R S) (s : S) :
                                  e.hom.hom (e.inv.hom s) = s
                                  Equations
                                  • One or more equations did not get rendered due to their size.

                                  This unification hint helps with problems of the form (forget ?C).obj R =?= carrier R'.

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

                                    The forgetful functor from commutative rings to (multiplicative) commutative monoids.

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

                                    Ring equivalence are isomorphisms in category of semirings

                                    Equations
                                    • e.toCommSemiRingCatIso = { hom := { hom := e }, inv := { hom := e.symm }, hom_inv_id := , inv_hom_id := }
                                    Instances For
                                      @[simp]
                                      theorem RingEquiv.toCommSemiRingCatIso_hom_hom {R S : Type u} [CommSemiring R] [CommSemiring S] (e : R ≃+* S) :
                                      e.toCommSemiRingCatIso.hom.hom = e
                                      @[simp]
                                      theorem RingEquiv.toCommSemiRingCatIso_inv_hom {R S : Type u} [CommSemiring R] [CommSemiring S] (e : R ≃+* S) :
                                      e.toCommSemiRingCatIso.inv.hom = e.symm
                                      structure CommRingCat :
                                      Type (u + 1)

                                      The category of semirings.

                                      • carrier : Type u

                                        The underlying type.

                                      • commRing : CommRing self
                                      Instances For
                                        @[reducible, inline]

                                        The object in the category of R-algebras associated to a type equipped with the appropriate typeclasses. This is the preferred way to construct a term of CommRingCat.

                                        Equations
                                        Instances For
                                          theorem CommRingCat.coe_of (R : Type u) [CommRing R] :
                                          (of R) = R
                                          structure CommRingCat.Hom (R : CommRingCat) (S : CommRingCat) :
                                          Type (max u_1 u_2)

                                          The type of morphisms in CommRingCat.

                                          • hom : R →+* S

                                            The underlying ring hom.

                                          Instances For
                                            theorem CommRingCat.Hom.ext {R : CommRingCat} {S : CommRingCat} {x y : R.Hom S} (hom : x.hom = y.hom) :
                                            x = y
                                            instance CommRingCat.instCoeFunHomForallCarrier {R S : CommRingCat} :
                                            CoeFun (R S) fun (x : R S) => RS
                                            Equations
                                            @[simp]
                                            theorem CommRingCat.hom_comp {R S T : CommRingCat} (f : R S) (g : S T) :
                                            (CategoryTheory.CategoryStruct.comp f g).hom = g.hom.comp f.hom
                                            theorem CommRingCat.comp_apply {R S T : CommRingCat} (f : R S) (g : S T) (r : R) :
                                            (CategoryTheory.CategoryStruct.comp f g).hom r = g.hom (f.hom r)
                                            theorem CommRingCat.hom_ext {R S : CommRingCat} {f g : R S} (hf : f.hom = g.hom) :
                                            f = g
                                            @[reducible, inline]
                                            abbrev CommRingCat.ofHom {R S : Type u} [CommRing R] [CommRing S] (f : R →+* S) :
                                            of R of S

                                            Typecheck a RingHom as a morphism in CommRingCat.

                                            Equations
                                            Instances For
                                              theorem CommRingCat.hom_ofHom {R S : Type u} [CommRing R] [CommRing S] (f : R →+* S) :
                                              (ofHom f).hom = f
                                              @[simp]
                                              theorem CommRingCat.ofHom_hom {R S : CommRingCat} (f : R S) :
                                              ofHom f.hom = f
                                              @[simp]
                                              theorem CommRingCat.ofHom_comp {R S T : Type u} [CommRing R] [CommRing S] [CommRing T] (f : R →+* S) (g : S →+* T) :
                                              theorem CommRingCat.ofHom_apply {R S : Type u} [CommRing R] [CommRing S] (f : R →+* S) (r : R) :
                                              (ofHom f).hom r = f r
                                              @[simp]
                                              theorem CommRingCat.inv_hom_apply {R S : CommRingCat} (e : R S) (r : R) :
                                              e.inv.hom (e.hom.hom r) = r
                                              @[simp]
                                              theorem CommRingCat.hom_inv_apply {R S : CommRingCat} (e : R S) (s : S) :
                                              e.hom.hom (e.inv.hom s) = s
                                              Equations
                                              • One or more equations did not get rendered due to their size.

                                              This unification hint helps with problems of the form (forget ?C).obj R =?= carrier R'.

                                              An example where this is needed is in applying TopCat.Presheaf.restrictOpen to commutative rings.

                                              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.

                                                Ring equivalence are isomorphisms in category of semirings

                                                Equations
                                                • e.toCommRingCatIso = { hom := { hom := e }, inv := { hom := e.symm }, hom_inv_id := , inv_hom_id := }
                                                Instances For
                                                  @[simp]
                                                  theorem RingEquiv.toCommRingCatIso_hom_hom {R S : Type u} [CommRing R] [CommRing S] (e : R ≃+* S) :
                                                  e.toCommRingCatIso.hom.hom = e
                                                  @[simp]
                                                  theorem RingEquiv.toCommRingCatIso_inv_hom {R S : Type u} [CommRing R] [CommRing S] (e : R ≃+* S) :
                                                  e.toCommRingCatIso.inv.hom = e.symm

                                                  Build a RingEquiv from an isomorphism in the category SemiRingCat.

                                                  Equations
                                                  Instances For

                                                    Build a RingEquiv from an isomorphism in the category RingCat.

                                                    Equations
                                                    Instances For

                                                      Build a RingEquiv from an isomorphism in the category CommSemiRingCat.

                                                      Equations
                                                      Instances For

                                                        Build a RingEquiv from an isomorphism in the category CommRingCat.

                                                        Equations
                                                        Instances For
                                                          @[simp]
                                                          theorem CategoryTheory.Iso.semiRingCatIsoToRingEquiv_toRingHom {R S : SemiRingCat} (e : R S) :
                                                          e.semiRingCatIsoToRingEquiv = e.hom.hom
                                                          @[simp]
                                                          theorem CategoryTheory.Iso.ringCatIsoToRingEquiv_toRingHom {R S : RingCat} (e : R S) :
                                                          e.ringCatIsoToRingEquiv = e.hom.hom
                                                          @[simp]
                                                          theorem CategoryTheory.Iso.commSemiRingCatIsoToRingEquiv_toRingHom {R S : CommSemiRingCat} (e : R S) :
                                                          e.commSemiRingCatIsoToRingEquiv = e.hom.hom
                                                          @[simp]
                                                          theorem CategoryTheory.Iso.commRingCatIsoToRingEquiv_toRingHom {R S : CommRingCat} (e : R S) :
                                                          e.commRingCatIsoToRingEquiv = e.hom.hom
                                                          @[reducible, inline]
                                                          abbrev SemiRingCatMax :
                                                          Type ((max u1 u2) + 1)

                                                          An alias for SemiringCat.{max u v}, to deal around unification issues.

                                                          Equations
                                                          Instances For
                                                            @[reducible, inline]
                                                            abbrev RingCatMax :
                                                            Type ((max u1 u2) + 1)

                                                            An alias for RingCat.{max u v}, to deal around unification issues.

                                                            Equations
                                                            Instances For
                                                              @[reducible, inline]
                                                              abbrev CommSemiRingCatMax :
                                                              Type ((max u1 u2) + 1)

                                                              An alias for CommSemiRingCat.{max u v}, to deal around unification issues.

                                                              Equations
                                                              Instances For
                                                                @[reducible, inline]
                                                                abbrev CommRingCatMax :
                                                                Type ((max u1 u2) + 1)

                                                                An alias for CommRingCat.{max u v}, to deal around unification issues.

                                                                Equations
                                                                Instances For
                                                                  theorem RingCat.forget_map_apply {R S : RingCat} (f : R S) (x : (CategoryTheory.forget RingCat).obj R) :
                                                                  f x = f.hom x
                                                                  theorem CommRingCat.forget_map_apply {R S : CommRingCat} (f : R S) (x : (CategoryTheory.forget CommRingCat).obj R) :
                                                                  f x = f.hom x