Documentation

Mathlib.Algebra.Category.Ring.Basic

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

We introduce the bundled categories:

along with the relevant forgetful functors between them.

structure SemiRingCat :
Type (u + 1)

The category of semirings.

  • of :: (
    • carrier : Type u

      The underlying type.

    • semiring : Semiring self
  • )
Instances For
    theorem SemiRingCat.coe_of (R : Type u) [Semiring R] :
    { carrier := R, semiring := inst✝ } = R
    theorem SemiRingCat.of_carrier (R : SemiRingCat) :
    { carrier := R, semiring := R.semiring } = R
    structure SemiRingCat.Hom (R S : SemiRingCat) :

    The type of morphisms in SemiRingCat.

    • hom' : R →+* S

      The underlying ring hom.

    Instances For
      theorem SemiRingCat.Hom.ext {R S : SemiRingCat} {x y : R.Hom S} (hom' : x.hom' = y.hom') :
      x = y
      theorem SemiRingCat.Hom.ext_iff {R S : SemiRingCat} {x y : R.Hom S} :
      x = y x.hom' = y.hom'
      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 SemiRingCat.Hom.hom {R S : SemiRingCat} (f : R.Hom S) :
      R →+* S

      Turn a morphism in SemiRingCat back into a RingHom.

      Equations
      Instances For
        @[reducible, inline]
        abbrev SemiRingCat.ofHom {R S : Type u} [Semiring R] [Semiring S] (f : R →+* S) :
        { carrier := R, semiring := inst✝ } { carrier := S, semiring := inst✝¹ }

        Typecheck a RingHom as a morphism in SemiRingCat.

        Equations
        Instances For
          def SemiRingCat.Hom.Simps.hom (R S : SemiRingCat) (f : R.Hom S) :
          R →+* S

          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.

            @[simp]
            theorem SemiRingCat.hom_ext {R S : SemiRingCat} {f g : R S} (hf : Hom.hom f = Hom.hom g) :
            f = g
            theorem SemiRingCat.hom_ext_iff {R S : SemiRingCat} {f g : R S} :
            @[simp]
            theorem SemiRingCat.hom_ofHom {R S : Type u} [Semiring R] [Semiring S] (f : R →+* S) :
            @[simp]
            theorem SemiRingCat.ofHom_hom {R S : SemiRingCat} (f : R S) :
            @[simp]
            theorem SemiRingCat.ofHom_id {R : Type u} [Semiring R] :
            ofHom (RingHom.id R) = CategoryTheory.CategoryStruct.id { carrier := R, semiring := inst✝ }
            @[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) :

            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.
              def RingEquiv.toSemiRingCatIso {R S : Type u} [Semiring R] [Semiring S] (e : R ≃+* S) :
              { carrier := R, semiring := inst✝ } { carrier := S, semiring := inst✝¹ }

              Ring equivalences are isomorphisms in category of semirings

              Equations
              Instances For
                structure RingCat :
                Type (u + 1)

                The category of rings.

                • of :: (
                  • carrier : Type u

                    The underlying type.

                  • ring : Ring self
                • )
                Instances For
                  theorem RingCat.coe_of (R : Type u) [Ring R] :
                  { carrier := R, ring := inst✝ } = R
                  theorem RingCat.of_carrier (R : RingCat) :
                  { carrier := R, ring := R.ring } = R
                  structure RingCat.Hom (R S : RingCat) :

                  The type of morphisms in RingCat.

                  • hom' : R →+* S

                    The underlying ring hom.

                  Instances For
                    theorem RingCat.Hom.ext {R S : RingCat} {x y : R.Hom S} (hom' : x.hom' = y.hom') :
                    x = y
                    theorem RingCat.Hom.ext_iff {R S : RingCat} {x y : R.Hom S} :
                    x = y x.hom' = y.hom'
                    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 RingCat.Hom.hom {R S : RingCat} (f : R.Hom S) :
                    R →+* S

                    Turn a morphism in RingCat back into a RingHom.

                    Equations
                    Instances For
                      @[reducible, inline]
                      abbrev RingCat.ofHom {R S : Type u} [Ring R] [Ring S] (f : R →+* S) :
                      { carrier := R, ring := inst✝ } { carrier := S, ring := inst✝¹ }

                      Typecheck a RingHom as a morphism in RingCat.

                      Equations
                      Instances For
                        def RingCat.Hom.Simps.hom (R S : RingCat) (f : R.Hom S) :
                        R →+* S

                        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.

                          @[simp]
                          theorem RingCat.hom_comp {R S T : RingCat} (f : R S) (g : S T) :
                          theorem RingCat.hom_ext {R S : RingCat} {f g : R S} (hf : Hom.hom f = Hom.hom g) :
                          f = g
                          theorem RingCat.hom_ext_iff {R S : RingCat} {f g : R S} :
                          @[simp]
                          theorem RingCat.hom_ofHom {R S : Type u} [Ring R] [Ring S] (f : R →+* S) :
                          @[simp]
                          theorem RingCat.ofHom_hom {R S : RingCat} (f : R S) :
                          @[simp]
                          theorem RingCat.ofHom_id {R : Type u} [Ring R] :
                          ofHom (RingHom.id R) = CategoryTheory.CategoryStruct.id { carrier := R, ring := inst✝ }
                          @[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) :

                          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
                            Equations
                            • One or more equations did not get rendered due to their size.

                            The forgetful functor from RingCat to SemiRingCat is fully faithful.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              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) :
                              { carrier := R, ring := inst✝ } { carrier := S, ring := inst✝¹ }

                              Ring equivalences are isomorphisms in category of rings

                              Equations
                              Instances For
                                @[simp]
                                theorem RingEquiv.toRingCatIso_inv {R S : Type u} [Ring R] [Ring S] (e : R ≃+* S) :
                                @[simp]
                                theorem RingEquiv.toRingCatIso_hom {R S : Type u} [Ring R] [Ring S] (e : R ≃+* S) :
                                structure CommSemiRingCat :
                                Type (u + 1)

                                The category of commutative semirings.

                                Instances For
                                  theorem CommSemiRingCat.coe_of (R : Type u) [CommSemiring R] :
                                  { carrier := R, commSemiring := inst✝ } = R
                                  theorem CommSemiRingCat.of_carrier (R : CommSemiRingCat) :
                                  { carrier := R, commSemiring := R.commSemiring } = R

                                  The type of morphisms in CommSemiRingCat.

                                  • hom' : R →+* S

                                    The underlying ring hom.

                                  Instances For
                                    theorem CommSemiRingCat.Hom.ext {R S : CommSemiRingCat} {x y : R.Hom S} (hom' : x.hom' = y.hom') :
                                    x = y
                                    theorem CommSemiRingCat.Hom.ext_iff {R S : CommSemiRingCat} {x y : R.Hom S} :
                                    x = y x.hom' = y.hom'
                                    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 CommSemiRingCat.Hom.hom {R S : CommSemiRingCat} (f : R.Hom S) :
                                    R →+* S

                                    Turn a morphism in CommSemiRingCat back into a RingHom.

                                    Equations
                                    Instances For
                                      @[reducible, inline]
                                      abbrev CommSemiRingCat.ofHom {R S : Type u} [CommSemiring R] [CommSemiring S] (f : R →+* S) :
                                      { carrier := R, commSemiring := inst✝ } { carrier := S, commSemiring := inst✝¹ }

                                      Typecheck a RingHom as a morphism in CommSemiRingCat.

                                      Equations
                                      Instances For
                                        def CommSemiRingCat.Hom.Simps.hom (R S : CommSemiRingCat) (f : R.Hom S) :
                                        R →+* S

                                        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 CommSemiRingCat.hom_ext {R S : CommSemiRingCat} {f g : R S} (hf : Hom.hom f = Hom.hom g) :
                                          f = g
                                          @[simp]
                                          theorem CommSemiRingCat.hom_ofHom {R S : Type u} [CommSemiring R] [CommSemiring S] (f : R →+* S) :
                                          @[simp]
                                          theorem CommSemiRingCat.ofHom_hom {R S : CommSemiRingCat} (f : R S) :
                                          @[simp]
                                          theorem CommSemiRingCat.ofHom_id {R : Type u} [CommSemiring R] :
                                          ofHom (RingHom.id R) = CategoryTheory.CategoryStruct.id { carrier := R, commSemiring := inst✝ }

                                          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 CommSemiRingCat to SemiRingCat is fully faithful.

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

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

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              def RingEquiv.toCommSemiRingCatIso {R S : Type u} [CommSemiring R] [CommSemiring S] (e : R ≃+* S) :
                                              { carrier := R, commSemiring := inst✝ } { carrier := S, commSemiring := inst✝¹ }

                                              Ring equivalences are isomorphisms in category of commutative semirings

                                              Equations
                                              Instances For
                                                structure CommRingCat :
                                                Type (u + 1)

                                                The category of commutative rings.

                                                • of :: (
                                                  • carrier : Type u

                                                    The underlying type.

                                                  • commRing : CommRing self
                                                • )
                                                Instances For
                                                  theorem CommRingCat.coe_of (R : Type u) [CommRing R] :
                                                  { carrier := R, commRing := inst✝ } = R
                                                  theorem CommRingCat.of_carrier (R : CommRingCat) :
                                                  { carrier := R, commRing := R.commRing } = R
                                                  structure CommRingCat.Hom (R S : CommRingCat) :

                                                  The type of morphisms in CommRingCat.

                                                  • hom' : R →+* S

                                                    The underlying ring hom.

                                                  Instances For
                                                    theorem CommRingCat.Hom.ext_iff {R S : CommRingCat} {x y : R.Hom S} :
                                                    x = y x.hom' = y.hom'
                                                    theorem CommRingCat.Hom.ext {R S : CommRingCat} {x y : R.Hom S} (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 CommRingCat.Hom.hom {R S : CommRingCat} (f : R.Hom S) :
                                                    R →+* S

                                                    The underlying ring hom.

                                                    Equations
                                                    Instances For
                                                      @[reducible, inline]
                                                      abbrev CommRingCat.ofHom {R S : Type u} [CommRing R] [CommRing S] (f : R →+* S) :
                                                      { carrier := R, commRing := inst✝ } { carrier := S, commRing := inst✝¹ }

                                                      Typecheck a RingHom as a morphism in CommRingCat.

                                                      Equations
                                                      Instances For
                                                        def CommRingCat.Hom.Simps.hom (R S : CommRingCat) (f : R.Hom S) :
                                                        R →+* S

                                                        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.

                                                          @[simp]
                                                          theorem CommRingCat.hom_ext {R S : CommRingCat} {f g : R S} (hf : Hom.hom f = Hom.hom g) :
                                                          f = g
                                                          theorem CommRingCat.hom_ext_iff {R S : CommRingCat} {f g : R S} :
                                                          @[simp]
                                                          theorem CommRingCat.hom_ofHom {R S : Type u} [CommRing R] [CommRing S] (f : R →+* S) :
                                                          @[simp]
                                                          theorem CommRingCat.ofHom_hom {R S : CommRingCat} (f : R S) :
                                                          @[simp]
                                                          theorem CommRingCat.ofHom_id {R : Type u} [CommRing R] :
                                                          ofHom (RingHom.id R) = CategoryTheory.CategoryStruct.id { carrier := R, commRing := inst✝ }
                                                          @[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) :

                                                          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.

                                                            The forgetful functor from CommRingCat to RingCat is fully faithful.

                                                            Equations
                                                            • One or more equations did not get rendered due to their size.
                                                            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.
                                                              def RingEquiv.toCommRingCatIso {R S : Type u} [CommRing R] [CommRing S] (e : R ≃+* S) :
                                                              { carrier := R, commRing := inst✝ } { carrier := S, commRing := inst✝¹ }

                                                              Ring equivalences are isomorphisms in category of commutative rings

                                                              Equations
                                                              Instances For

                                                                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 CommRingCat.

                                                                    Equations
                                                                    Instances For