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.

  • carrier : Type u

    The underlying type.

  • semiring : Semiring self
@[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
theorem SemiRingCat.coe_of (R : Type u) [Semiring R] :
(of R) = R
structure SemiRingCat.Hom (R S : SemiRingCat) :

The type of morphisms in SemiRingCat.

  • hom' : R →+* S

    The underlying ring hom.

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

Turn a morphism in SemiRingCat back into a RingHom.

Equations
@[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
def SemiRingCat.Hom.Simps.hom (R S : SemiRingCat) (f : R.Hom S) :
R →+* S

Use the ConcreteCategory.hom projection for @[simps] lemmas.

Equations

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_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
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
structure RingCat :
Type (u + 1)

The category of rings.

  • carrier : Type u

    The underlying type.

  • ring : Ring self
@[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
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 S : RingCat) :

The type of morphisms in RingCat.

  • hom' : R →+* S

    The underlying ring hom.

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
@[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
def RingCat.Hom.Simps.hom (R S : RingCat) (f : R.Hom S) :
R →+* S

Use the ConcreteCategory.hom projection for @[simps] lemmas.

Equations

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_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
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
@[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.

@[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
theorem CommSemiRingCat.coe_of (R : Type u) [CommSemiring R] :
(of R) = R

The type of morphisms in CommSemiRingCat.

  • hom' : R →+* S

    The underlying ring hom.

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
@[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
def CommSemiRingCat.Hom.Simps.hom (R S : CommSemiRingCat) (f : R.Hom S) :
R →+* S

Use the ConcreteCategory.hom projection for @[simps] lemmas.

Equations

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

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

Equations
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
structure CommRingCat :
Type (u + 1)

The category of commutative rings.

  • carrier : Type u

    The underlying type.

  • commRing : CommRing self
@[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
theorem CommRingCat.coe_of (R : Type u) [CommRing R] :
(of R) = R
structure CommRingCat.Hom (R S : CommRingCat) :

The type of morphisms in CommRingCat.

  • hom' : R →+* S

    The underlying ring hom.

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

The underlying ring hom.

Equations
@[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
def CommRingCat.Hom.Simps.hom (R S : CommRingCat) (f : R.Hom S) :
R →+* S

Use the ConcreteCategory.hom projection for @[simps] lemmas.

Equations

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

Ring equivalence are isomorphisms in category of semirings

Equations

Build a RingEquiv from an isomorphism in the category RingCat.

Equations