The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V26. Homological algebra

Mathlib.Algebra.Category.Ring.Basic

196 declarations. Mathlib docs · Source

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

We introduce the bundled categories:

  • SemiRingCat
  • RingCat
  • CommSemiRingCat
  • CommRingCat

along with the relevant forgetful functors between them.

The results below duplicate the ConcreteCategory simp lemmas, but we can keep them for dsimp.

The results below duplicate the ConcreteCategory simp lemmas, but we can keep them for dsimp.

The results below duplicate the ConcreteCategory simp lemmas, but we can keep them for dsimp.

The results below duplicate the ConcreteCategory simp lemmas, but we can keep them for dsimp.

def CommRingCat.ctorIdx E1 #

CommRingCat → ℕ

theorem CommSemiRingCat.of.injEq E0 #

∀ (carrier : Type u) [commSemiring : CommSemiring carrier] (carrier_1 : Type u)
  (commSemiring_1 : CommSemiring carrier_1),
  (↧carrier = ↧carrier_1) = (carrier = carrier_1 ∧ commSemiring ≍ commSemiring_1)

theorem SemiRingCat.of.inj E1 #

∀ {carrier : Type u} {semiring : Semiring carrier} {carrier_1 : Type u} {semiring_1 : Semiring carrier_1},
  ↧carrier = ↧carrier_1 → carrier = carrier_1 ∧ semiring ≍ semiring_1

theorem SemiRingCat.of.injEq E0 #

∀ (carrier : Type u) [semiring : Semiring carrier] (carrier_1 : Type u) (semiring_1 : Semiring carrier_1),
  (↧carrier = ↧carrier_1) = (carrier = carrier_1 ∧ semiring ≍ semiring_1)

def RingCat.ctorIdx E1 #

RingCat → ℕ

def SemiRingCat.Hom.ctorIdx E1 #

{R S : SemiRingCat} → R.Hom S → ℕ

theorem CommSemiRingCat.of.inj E1 #

∀ {carrier : Type u} {commSemiring : CommSemiring carrier} {carrier_1 : Type u}
  {commSemiring_1 : CommSemiring carrier_1}, ↧carrier = ↧carrier_1 → carrier = carrier_1 ∧ commSemiring ≍ commSemiring_1

theorem CommRingCat.of.inj E1 #

∀ {carrier : Type u} {commRing : CommRing carrier} {carrier_1 : Type u} {commRing_1 : CommRing carrier_1},
  ↧carrier = ↧carrier_1 → carrier = carrier_1 ∧ commRing ≍ commRing_1

def RingCat.Hom.ctorIdx E1 #

{R S : RingCat} → R.Hom S → ℕ

def CommRingCat.Hom.ctorIdx E1 #

{R S : CommRingCat} → R.Hom S → ℕ

def CommSemiRingCat.ctorIdx E1 #

CommSemiRingCat → ℕ

theorem RingCat.of.injEq E0 #

∀ (carrier : Type u) [ring : Ring carrier] (carrier_1 : Type u) (ring_1 : Ring carrier_1),
  (↧carrier = ↧carrier_1) = (carrier = carrier_1 ∧ ring ≍ ring_1)

def SemiRingCat.ctorIdx E1 #

SemiRingCat → ℕ

def CommSemiRingCat.Hom.ctorIdx E1 #

{R S : CommSemiRingCat} → R.Hom S → ℕ

theorem RingCat.of.inj E1 #

∀ {carrier : Type u} {ring : Ring carrier} {carrier_1 : Type u} {ring_1 : Ring carrier_1},
  ↧carrier = ↧carrier_1 → carrier = carrier_1 ∧ ring ≍ ring_1

theorem CommRingCat.of.injEq E0 #

∀ (carrier : Type u) [commRing : CommRing carrier] (carrier_1 : Type u) (commRing_1 : CommRing carrier_1),
  (↧carrier = ↧carrier_1) = (carrier = carrier_1 ∧ commRing ≍ commRing_1)

structure SemiRingCat E1 #

Type (u + 1)

The category of semirings.

ctor SemiRingCat.of E0 #

(carrier : Type u) → [semiring : Semiring carrier] → SemiRingCat

The object in the category of semirings associated to a type equipped with the appropriate typeclasses.

abbrev SemiRingCat.carrier E1 #

SemiRingCat → Type u

The underlying type.

instance SemiRingCat.semiring E0 #

(self : SemiRingCat) → Semiring ↑self

def SemiRingCat.delabOf E1 #

Lean.PrettyPrinter.Delaborator.Delab

This prints SemiRingCat.of R as ↧R, and in particular prevents it being printed as { carrier := R, semiring := ... } by delabStructureInstance.

instance SemiRingCat.instCoeSortType E0 #

CoeSort SemiRingCat (Type u)

theorem SemiRingCat.coe_of E0 #

∀ (R : Type u) [inst : Semiring R], ↑↧R = R

theorem SemiRingCat.of_carrier E1 #

∀ (R : SemiRingCat), ↧↑R = R

structure SemiRingCat.Hom E1 #

SemiRingCat → SemiRingCat → Type u

The type of morphisms in SemiRingCat.

theorem SemiRingCat.Hom.ext E1 #

∀ {R S : SemiRingCat} {x y : R.Hom S}, x.hom' = y.hom' → x = y

theorem SemiRingCat.Hom.ext_iff E0 #

∀ {R S : SemiRingCat} {x y : R.Hom S}, x = y ↔ x.hom' = y.hom'

abbrev SemiRingCat.Hom.hom' E1 #

{R S : SemiRingCat} → R.Hom S → ↑R →+* ↑S

The underlying ring hom.

instance SemiRingCat.instCategory E0 #

CategoryTheory.Category.{u_1, u_1 + 1} SemiRingCat

instance SemiRingCat.instConcreteCategoryRingHomCarrier E0 #

CategoryTheory.ConcreteCategory SemiRingCat fun R S ↦ ↑R →+* ↑S

abbrev SemiRingCat.Hom.hom E1 #

{R S : SemiRingCat} → R.Hom S → ↑R →+* ↑S

Turn a morphism in SemiRingCat back into a RingHom.

abbrev SemiRingCat.ofHom E1 #

{R S : Type u} → [inst : Semiring R] → [inst_1 : Semiring S] → (R →+* S) → (↧R ⟶ ↧S)

Typecheck a RingHom as a morphism in SemiRingCat.

def SemiRingCat.Hom.Simps.hom E1 #

(R S : SemiRingCat) → R.Hom S → ↑R →+* ↑S

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

theorem SemiRingCat.hom_id E0 #

∀ {R : SemiRingCat}, SemiRingCat.Hom.hom (CategoryTheory.CategoryStruct.id R) = RingHom.id ↑R

theorem SemiRingCat.id_apply E0 #

∀ (R : SemiRingCat) (r : ↑R), (CategoryTheory.ConcreteCategory.hom (CategoryTheory.CategoryStruct.id R)) r = r

theorem SemiRingCat.hom_comp E0 #

∀ {R S T : SemiRingCat} (f : R ⟶ S) (g : S ⟶ T),
  SemiRingCat.Hom.hom (CategoryTheory.CategoryStruct.comp f g) = (SemiRingCat.Hom.hom g).comp (SemiRingCat.Hom.hom f)

theorem SemiRingCat.comp_apply E0 #

∀ {R S T : SemiRingCat} (f : R ⟶ S) (g : S ⟶ T) (r : ↑R),
  (CategoryTheory.ConcreteCategory.hom (CategoryTheory.CategoryStruct.comp f g)) r =
    (CategoryTheory.ConcreteCategory.hom g) ((CategoryTheory.ConcreteCategory.hom f) r)

theorem SemiRingCat.hom_ext E1 #

∀ {R S : SemiRingCat} {f g : R ⟶ S}, SemiRingCat.Hom.hom f = SemiRingCat.Hom.hom g → f = g

theorem SemiRingCat.hom_ext_iff E0 #

∀ {R S : SemiRingCat} {f g : R ⟶ S}, f = g ↔ SemiRingCat.Hom.hom f = SemiRingCat.Hom.hom g

theorem SemiRingCat.hom_ofHom E0 #

∀ {R S : Type u} [inst : Semiring R] [inst_1 : Semiring S] (f : R →+* S), SemiRingCat.Hom.hom (SemiRingCat.ofHom f) = f

theorem SemiRingCat.ofHom_hom E0 #

∀ {R S : SemiRingCat} (f : R ⟶ S), SemiRingCat.ofHom (SemiRingCat.Hom.hom f) = f

theorem SemiRingCat.ofHom_id E0 #

∀ {R : Type u} [inst : Semiring R], SemiRingCat.ofHom (RingHom.id R) = CategoryTheory.CategoryStruct.id ↧R

theorem SemiRingCat.ofHom_comp E0 #

∀ {R S T : Type u} [inst : Semiring R] [inst_1 : Semiring S] [inst_2 : Semiring T] (f : R →+* S) (g : S →+* T),
  SemiRingCat.ofHom (g.comp f) = CategoryTheory.CategoryStruct.comp (SemiRingCat.ofHom f) (SemiRingCat.ofHom g)

theorem SemiRingCat.ofHom_apply E0 #

∀ {R S : Type u} [inst : Semiring R] [inst_1 : Semiring S] (f : R →+* S) (r : R),
  (CategoryTheory.ConcreteCategory.hom (SemiRingCat.ofHom f)) r = f r

theorem SemiRingCat.inv_hom_apply E0 #

∀ {R S : SemiRingCat} (e : R ≅ S) (r : ↑R),
  (CategoryTheory.ConcreteCategory.hom e.inv) ((CategoryTheory.ConcreteCategory.hom e.hom) r) = r

theorem SemiRingCat.hom_inv_apply E0 #

∀ {R S : SemiRingCat} (e : R ≅ S) (s : ↑S),
  (CategoryTheory.ConcreteCategory.hom e.hom) ((CategoryTheory.ConcreteCategory.hom e.inv) s) = s

instance SemiRingCat.instInhabited E0 #

Inhabited SemiRingCat

def SemiRingCat.forget_obj_eq_coe E0 #

SemiRingCat → SemiRingCat → Prop

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

instance SemiRingCat.instSemiringObjForgetRingHomCarrier E0 #

{R : SemiRingCat} → Semiring ((CategoryTheory.forget SemiRingCat).obj R)

instance SemiRingCat.hasForgetToMonCat E0 #

CategoryTheory.HasForget₂ SemiRingCat MonCat

instance SemiRingCat.hasForgetToAddCommMonCat E0 #

CategoryTheory.HasForget₂ SemiRingCat AddCommMonCat

theorem SemiRingCat.forget₂_monCat_map E0 #

∀ {R S : SemiRingCat} (f : R ⟶ S) (x : ↑((CategoryTheory.forget₂ SemiRingCat MonCat).obj R)),
  (CategoryTheory.ConcreteCategory.hom ((CategoryTheory.forget₂ SemiRingCat MonCat).map f)) x =
    (CategoryTheory.ConcreteCategory.hom f) x

theorem SemiRingCat.forget₂_addCommMonCat_map E0 #

∀ {R S : SemiRingCat} (f : R ⟶ S) (x : ↑((CategoryTheory.forget₂ SemiRingCat AddCommMonCat).obj R)),
  (CategoryTheory.ConcreteCategory.hom ((CategoryTheory.forget₂ SemiRingCat AddCommMonCat).map f)) x =
    (CategoryTheory.ConcreteCategory.hom f) x

def RingEquiv.toSemiRingCatIso E1 #

{R S : Type u} → [inst : Semiring R] → [inst_1 : Semiring S] → R ≃+* S → (↧R ≅ ↧S)

Ring equivalences are isomorphisms in category of semirings

theorem RingEquiv.toSemiRingCatIso_hom E0 #

∀ {R S : Type u} [inst : Semiring R] [inst_1 : Semiring S] (e : R ≃+* S), e.toSemiRingCatIso.hom = SemiRingCat.ofHom ↑e

theorem RingEquiv.toSemiRingCatIso_inv E0 #

∀ {R S : Type u} [inst : Semiring R] [inst_1 : Semiring S] (e : R ≃+* S),
  e.toSemiRingCatIso.inv = SemiRingCat.ofHom ↑e.symm

instance SemiRingCat.forgetReflectIsos E0 #

(CategoryTheory.forget SemiRingCat).ReflectsIsomorphisms

structure RingCat E3 #

Type (u + 1)

The category of rings.

ctor RingCat.of E0 #

(carrier : Type u) → [ring : Ring carrier] → RingCat

The object in the category of rings associated to a type equipped with the appropriate typeclasses.

abbrev RingCat.carrier E1 #

RingCat → Type u

The underlying type.

instance RingCat.ring E0 #

(self : RingCat) → Ring ↑self

def RingCat.delabOf E1 #

Lean.PrettyPrinter.Delaborator.Delab

This prints RingCat.of R as ↧R, and in particular prevents it being printed as { carrier := R, ring := ... } by delabStructureInstance.

instance RingCat.instCoeSortType E0 #

CoeSort RingCat (Type u)

theorem RingCat.coe_of E0 #

∀ (R : Type u) [inst : Ring R], ↑↧R = R

theorem RingCat.of_carrier E1 #

∀ (R : RingCat), ↧↑R = R

structure RingCat.Hom E1 #

RingCat → RingCat → Type u

The type of morphisms in RingCat.

theorem RingCat.Hom.ext_iff E0 #

∀ {R S : RingCat} {x y : R.Hom S}, x = y ↔ x.hom' = y.hom'

theorem RingCat.Hom.ext E1 #

∀ {R S : RingCat} {x y : R.Hom S}, x.hom' = y.hom' → x = y

abbrev RingCat.Hom.hom' E1 #

{R S : RingCat} → R.Hom S → ↑R →+* ↑S

The underlying ring hom.

instance RingCat.instCategory E0 #

CategoryTheory.Category.{u_1, u_1 + 1} RingCat

instance RingCat.instConcreteCategoryRingHomCarrier E0 #

CategoryTheory.ConcreteCategory RingCat fun R S ↦ ↑R →+* ↑S

abbrev RingCat.Hom.hom E1 #

{R S : RingCat} → R.Hom S → ↑R →+* ↑S

Turn a morphism in RingCat back into a RingHom.

abbrev RingCat.ofHom E1 #

{R S : Type u} → [inst : Ring R] → [inst_1 : Ring S] → (R →+* S) → (↧R ⟶ ↧S)

Typecheck a RingHom as a morphism in RingCat.

def RingCat.Hom.Simps.hom E1 #

(R S : RingCat) → R.Hom S → ↑R →+* ↑S

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

theorem RingCat.hom_id E0 #

∀ {R : RingCat}, RingCat.Hom.hom (CategoryTheory.CategoryStruct.id R) = RingHom.id ↑R

theorem RingCat.id_apply E0 #

∀ (R : RingCat) (r : ↑R), (CategoryTheory.ConcreteCategory.hom (CategoryTheory.CategoryStruct.id R)) r = r

theorem RingCat.hom_comp E0 #

∀ {R S T : RingCat} (f : R ⟶ S) (g : S ⟶ T),
  RingCat.Hom.hom (CategoryTheory.CategoryStruct.comp f g) = (RingCat.Hom.hom g).comp (RingCat.Hom.hom f)

theorem RingCat.comp_apply E0 #

∀ {R S T : RingCat} (f : R ⟶ S) (g : S ⟶ T) (r : ↑R),
  (CategoryTheory.ConcreteCategory.hom (CategoryTheory.CategoryStruct.comp f g)) r =
    (CategoryTheory.ConcreteCategory.hom g) ((CategoryTheory.ConcreteCategory.hom f) r)

theorem RingCat.hom_ext E1 #

∀ {R S : RingCat} {f g : R ⟶ S}, RingCat.Hom.hom f = RingCat.Hom.hom g → f = g

theorem RingCat.hom_ext_iff E0 #

∀ {R S : RingCat} {f g : R ⟶ S}, f = g ↔ RingCat.Hom.hom f = RingCat.Hom.hom g

theorem RingCat.hom_ofHom E0 #

∀ {R S : Type u} [inst : Ring R] [inst_1 : Ring S] (f : R →+* S), RingCat.Hom.hom (RingCat.ofHom f) = f

theorem RingCat.ofHom_hom E0 #

∀ {R S : RingCat} (f : R ⟶ S), RingCat.ofHom (RingCat.Hom.hom f) = f

theorem RingCat.ofHom_id E0 #

∀ {R : Type u} [inst : Ring R], RingCat.ofHom (RingHom.id R) = CategoryTheory.CategoryStruct.id ↧R

theorem RingCat.ofHom_comp E0 #

∀ {R S T : Type u} [inst : Ring R] [inst_1 : Ring S] [inst_2 : Ring T] (f : R →+* S) (g : S →+* T),
  RingCat.ofHom (g.comp f) = CategoryTheory.CategoryStruct.comp (RingCat.ofHom f) (RingCat.ofHom g)

theorem RingCat.ofHom_apply E0 #

∀ {R S : Type u} [inst : Ring R] [inst_1 : Ring S] (f : R →+* S) (r : R),
  (CategoryTheory.ConcreteCategory.hom (RingCat.ofHom f)) r = f r

theorem RingCat.inv_hom_apply E0 #

∀ {R S : RingCat} (e : R ≅ S) (r : ↑R),
  (CategoryTheory.ConcreteCategory.hom e.inv) ((CategoryTheory.ConcreteCategory.hom e.hom) r) = r

theorem RingCat.hom_inv_apply E0 #

∀ {R S : RingCat} (e : R ≅ S) (s : ↑S),
  (CategoryTheory.ConcreteCategory.hom e.hom) ((CategoryTheory.ConcreteCategory.hom e.inv) s) = s

instance RingCat.instInhabited E0 #

Inhabited RingCat

def RingCat.forget_obj_eq_coe E0 #

RingCat → RingCat → Prop

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.

instance RingCat.instRingObjForgetRingHomCarrier E0 #

{R : RingCat} → Ring ((CategoryTheory.forget RingCat).obj R)

instance RingCat.hasForgetToSemiRingCat E0 #

CategoryTheory.HasForget₂ RingCat SemiRingCat

theorem RingCat.forget₂_map E0 #

∀ {R S : RingCat} (f : R ⟶ S) (x : ↑((CategoryTheory.forget₂ RingCat SemiRingCat).obj R)),
  (CategoryTheory.ConcreteCategory.hom ((CategoryTheory.forget₂ RingCat SemiRingCat).map f)) x =
    (CategoryTheory.ConcreteCategory.hom f) x

def RingCat.fullyFaithfulForget₂ToSemiRingCat E1 #

(CategoryTheory.forget₂ RingCat SemiRingCat).FullyFaithful

The forgetful functor from RingCat to SemiRingCat is fully faithful.

instance RingCat.instFullSemiRingCatForget₂RingHomCarrierCarrier E0 #

(CategoryTheory.forget₂ RingCat SemiRingCat).Full

instance RingCat.hasForgetToAddCommGrp E0 #

CategoryTheory.HasForget₂ RingCat AddCommGrpCat

def RingEquiv.toRingCatIso E1 #

{R S : Type u} → [inst : Ring R] → [inst_1 : Ring S] → R ≃+* S → (↧R ≅ ↧S)

Ring equivalences are isomorphisms in category of rings

theorem RingEquiv.toRingCatIso_inv E0 #

∀ {R S : Type u} [inst : Ring R] [inst_1 : Ring S] (e : R ≃+* S), e.toRingCatIso.inv = RingCat.ofHom ↑e.symm

theorem RingEquiv.toRingCatIso_hom E0 #

∀ {R S : Type u} [inst : Ring R] [inst_1 : Ring S] (e : R ≃+* S), e.toRingCatIso.hom = RingCat.ofHom ↑e

instance RingCat.forgetReflectIsos E0 #

(CategoryTheory.forget RingCat).ReflectsIsomorphisms

structure CommSemiRingCat E1 #

Type (u + 1)

The category of commutative semirings.

ctor CommSemiRingCat.of E0 #

(carrier : Type u) → [commSemiring : CommSemiring carrier] → CommSemiRingCat

The object in the category of commutative semirings associated to a type equipped with the appropriate typeclasses.

abbrev CommSemiRingCat.carrier E1 #

CommSemiRingCat → Type u

The underlying type.

instance CommSemiRingCat.commSemiring E0 #

(self : CommSemiRingCat) → CommSemiring ↑self

def CommSemiRingCat.delabOf E1 #

Lean.PrettyPrinter.Delaborator.Delab

This prints CommSemiRingCat.of R as ↧R, and in particular prevents it being printed as { carrier := R, commSemiring := ... } by delabStructureInstance.

instance CommSemiRingCat.instCoeSortType E0 #

CoeSort CommSemiRingCat (Type u)

theorem CommSemiRingCat.coe_of E0 #

∀ (R : Type u) [inst : CommSemiring R], ↑↧R = R

theorem CommSemiRingCat.of_carrier E1 #

∀ (R : CommSemiRingCat), ↧↑R = R

structure CommSemiRingCat.Hom E1 #

CommSemiRingCat → CommSemiRingCat → Type u

The type of morphisms in CommSemiRingCat.

theorem CommSemiRingCat.Hom.ext_iff E0 #

∀ {R S : CommSemiRingCat} {x y : R.Hom S}, x = y ↔ x.hom' = y.hom'

theorem CommSemiRingCat.Hom.ext E1 #

∀ {R S : CommSemiRingCat} {x y : R.Hom S}, x.hom' = y.hom' → x = y

abbrev CommSemiRingCat.Hom.hom' E1 #

{R S : CommSemiRingCat} → R.Hom S → ↑R →+* ↑S

The underlying ring hom.

instance CommSemiRingCat.instCategory E0 #

CategoryTheory.Category.{u_1, u_1 + 1} CommSemiRingCat

instance CommSemiRingCat.instConcreteCategoryRingHomCarrier E0 #

CategoryTheory.ConcreteCategory CommSemiRingCat fun R S ↦ ↑R →+* ↑S

abbrev CommSemiRingCat.Hom.hom E1 #

{R S : CommSemiRingCat} → R.Hom S → ↑R →+* ↑S

Turn a morphism in CommSemiRingCat back into a RingHom.

abbrev CommSemiRingCat.ofHom E1 #

{R S : Type u} → [inst : CommSemiring R] → [inst_1 : CommSemiring S] → (R →+* S) → (↧R ⟶ ↧S)

Typecheck a RingHom as a morphism in CommSemiRingCat.

def CommSemiRingCat.Hom.Simps.hom E1 #

(R S : CommSemiRingCat) → R.Hom S → ↑R →+* ↑S

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

theorem CommSemiRingCat.hom_id E0 #

∀ {R : CommSemiRingCat}, CommSemiRingCat.Hom.hom (CategoryTheory.CategoryStruct.id R) = RingHom.id ↑R

theorem CommSemiRingCat.id_apply E0 #

∀ (R : CommSemiRingCat) (r : ↑R), (CategoryTheory.ConcreteCategory.hom (CategoryTheory.CategoryStruct.id R)) r = r

theorem CommSemiRingCat.hom_comp E0 #

∀ {R S T : CommSemiRingCat} (f : R ⟶ S) (g : S ⟶ T),
  CommSemiRingCat.Hom.hom (CategoryTheory.CategoryStruct.comp f g) =
    (CommSemiRingCat.Hom.hom g).comp (CommSemiRingCat.Hom.hom f)

theorem CommSemiRingCat.comp_apply E0 #

∀ {R S T : CommSemiRingCat} (f : R ⟶ S) (g : S ⟶ T) (r : ↑R),
  (CategoryTheory.ConcreteCategory.hom (CategoryTheory.CategoryStruct.comp f g)) r =
    (CategoryTheory.ConcreteCategory.hom g) ((CategoryTheory.ConcreteCategory.hom f) r)

theorem CommSemiRingCat.hom_ext_iff E0 #

∀ {R S : CommSemiRingCat} {f g : R ⟶ S}, f = g ↔ CommSemiRingCat.Hom.hom f = CommSemiRingCat.Hom.hom g

theorem CommSemiRingCat.hom_ext E1 #

∀ {R S : CommSemiRingCat} {f g : R ⟶ S}, CommSemiRingCat.Hom.hom f = CommSemiRingCat.Hom.hom g → f = g

theorem CommSemiRingCat.hom_ofHom E0 #

∀ {R S : Type u} [inst : CommSemiring R] [inst_1 : CommSemiring S] (f : R →+* S),
  CommSemiRingCat.Hom.hom (CommSemiRingCat.ofHom f) = f

theorem CommSemiRingCat.ofHom_hom E0 #

∀ {R S : CommSemiRingCat} (f : R ⟶ S), CommSemiRingCat.ofHom (CommSemiRingCat.Hom.hom f) = f

theorem CommSemiRingCat.ofHom_id E0 #

∀ {R : Type u} [inst : CommSemiring R], CommSemiRingCat.ofHom (RingHom.id R) = CategoryTheory.CategoryStruct.id ↧R

theorem CommSemiRingCat.ofHom_comp E0 #

∀ {R S T : Type u} [inst : CommSemiring R] [inst_1 : CommSemiring S] [inst_2 : CommSemiring T] (f : R →+* S)
  (g : S →+* T),
  CommSemiRingCat.ofHom (g.comp f) =
    CategoryTheory.CategoryStruct.comp (CommSemiRingCat.ofHom f) (CommSemiRingCat.ofHom g)

theorem CommSemiRingCat.ofHom_apply E0 #

∀ {R S : Type u} [inst : CommSemiring R] [inst_1 : CommSemiring S] (f : R →+* S) (r : R),
  (CategoryTheory.ConcreteCategory.hom (CommSemiRingCat.ofHom f)) r = f r

theorem CommSemiRingCat.inv_hom_apply E0 #

∀ {R S : CommSemiRingCat} (e : R ≅ S) (r : ↑R),
  (CategoryTheory.ConcreteCategory.hom e.inv) ((CategoryTheory.ConcreteCategory.hom e.hom) r) = r

theorem CommSemiRingCat.hom_inv_apply E0 #

∀ {R S : CommSemiRingCat} (e : R ≅ S) (s : ↑S),
  (CategoryTheory.ConcreteCategory.hom e.hom) ((CategoryTheory.ConcreteCategory.hom e.inv) s) = s

instance CommSemiRingCat.instInhabited E0 #

Inhabited CommSemiRingCat

def CommSemiRingCat.forget_obj_eq_coe E0 #

CommSemiRingCat → CommSemiRingCat → Prop

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

instance CommSemiRingCat.instCommSemiringObjForgetRingHomCarrier E0 #

{R : CommSemiRingCat} → CommSemiring ((CategoryTheory.forget CommSemiRingCat).obj R)

instance CommSemiRingCat.hasForgetToSemiRingCat E0 #

CategoryTheory.HasForget₂ CommSemiRingCat SemiRingCat

def CommSemiRingCat.fullyFaithfulForget₂ToSemiRingCat E1 #

(CategoryTheory.forget₂ CommSemiRingCat SemiRingCat).FullyFaithful

The forgetful functor from CommSemiRingCat to SemiRingCat is fully faithful.

instance CommSemiRingCat.instFullSemiRingCatForget₂RingHomCarrierCarrier E0 #

(CategoryTheory.forget₂ CommSemiRingCat SemiRingCat).Full

instance CommSemiRingCat.hasForgetToCommMonCat E0 #

CategoryTheory.HasForget₂ CommSemiRingCat CommMonCat

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

def RingEquiv.toCommSemiRingCatIso E1 #

{R S : Type u} → [inst : CommSemiring R] → [inst_1 : CommSemiring S] → R ≃+* S → (↧R ≅ ↧S)

Ring equivalences are isomorphisms in category of commutative semirings

theorem RingEquiv.toCommSemiRingCatIso_inv E0 #

∀ {R S : Type u} [inst : CommSemiring R] [inst_1 : CommSemiring S] (e : R ≃+* S),
  e.toCommSemiRingCatIso.inv = CommSemiRingCat.ofHom ↑e.symm

theorem RingEquiv.toCommSemiRingCatIso_hom E0 #

∀ {R S : Type u} [inst : CommSemiring R] [inst_1 : CommSemiring S] (e : R ≃+* S),
  e.toCommSemiRingCatIso.hom = CommSemiRingCat.ofHom ↑e

instance CommSemiRingCat.forgetReflectIsos E0 #

(CategoryTheory.forget CommSemiRingCat).ReflectsIsomorphisms

structure CommRingCat E3 #

Type (u + 1)

The category of commutative rings.

ctor CommRingCat.of E0 #

(carrier : Type u) → [commRing : CommRing carrier] → CommRingCat

The object in the category of commutative rings associated to a type equipped with the appropriate typeclasses.

abbrev CommRingCat.carrier E1 #

CommRingCat → Type u

The underlying type.

instance CommRingCat.commRing E0 #

(self : CommRingCat) → CommRing ↑self

def CommRingCat.delabOf E1 #

Lean.PrettyPrinter.Delaborator.Delab

This prints CommRingCat.of R as ↧R, and in particular prevents it being printed as { carrier := R, commRing := ... } by delabStructureInstance.

instance CommRingCat.instCoeSortType E0 #

CoeSort CommRingCat (Type u)

theorem CommRingCat.coe_of E0 #

∀ (R : Type u) [inst : CommRing R], ↑↧R = R

theorem CommRingCat.of_carrier E1 #

∀ (R : CommRingCat), ↧↑R = R

structure CommRingCat.Hom E1 #

CommRingCat → CommRingCat → Type u

The type of morphisms in CommRingCat.

theorem CommRingCat.Hom.ext_iff E0 #

∀ {R S : CommRingCat} {x y : R.Hom S}, x = y ↔ x.hom' = y.hom'

theorem CommRingCat.Hom.ext E1 #

∀ {R S : CommRingCat} {x y : R.Hom S}, x.hom' = y.hom' → x = y

abbrev CommRingCat.Hom.hom' E1 #

{R S : CommRingCat} → R.Hom S → ↑R →+* ↑S

The underlying ring hom.

instance CommRingCat.instCategory E0 #

CategoryTheory.Category.{u_1, u_1 + 1} CommRingCat

instance CommRingCat.instConcreteCategoryRingHomCarrier E0 #

CategoryTheory.ConcreteCategory CommRingCat fun R S ↦ ↑R →+* ↑S

abbrev CommRingCat.Hom.hom E1 #

{R S : CommRingCat} → R.Hom S → ↑R →+* ↑S

The underlying ring hom.

abbrev CommRingCat.ofHom E1 #

{R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → (↧R ⟶ ↧S)

Typecheck a RingHom as a morphism in CommRingCat.

def CommRingCat.Hom.Simps.hom E1 #

(R S : CommRingCat) → R.Hom S → ↑R →+* ↑S

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

theorem CommRingCat.hom_id E0 #

∀ {R : CommRingCat}, CommRingCat.Hom.hom (CategoryTheory.CategoryStruct.id R) = RingHom.id ↑R

theorem CommRingCat.id_apply E0 #

∀ (R : CommRingCat) (r : ↑R), (CategoryTheory.ConcreteCategory.hom (CategoryTheory.CategoryStruct.id R)) r = r

theorem CommRingCat.hom_comp E0 #

∀ {R S T : CommRingCat} (f : R ⟶ S) (g : S ⟶ T),
  CommRingCat.Hom.hom (CategoryTheory.CategoryStruct.comp f g) = (CommRingCat.Hom.hom g).comp (CommRingCat.Hom.hom f)

theorem CommRingCat.comp_apply E0 #

∀ {R S T : CommRingCat} (f : R ⟶ S) (g : S ⟶ T) (r : ↑R),
  (CategoryTheory.ConcreteCategory.hom (CategoryTheory.CategoryStruct.comp f g)) r =
    (CategoryTheory.ConcreteCategory.hom g) ((CategoryTheory.ConcreteCategory.hom f) r)

theorem CommRingCat.hom_ext E1 #

∀ {R S : CommRingCat} {f g : R ⟶ S}, CommRingCat.Hom.hom f = CommRingCat.Hom.hom g → f = g

theorem CommRingCat.hom_ext_iff E0 #

∀ {R S : CommRingCat} {f g : R ⟶ S}, f = g ↔ CommRingCat.Hom.hom f = CommRingCat.Hom.hom g

theorem CommRingCat.hom_ofHom E0 #

∀ {R S : Type u} [inst : CommRing R] [inst_1 : CommRing S] (f : R →+* S), CommRingCat.Hom.hom (CommRingCat.ofHom f) = f

theorem CommRingCat.ofHom_hom E0 #

∀ {R S : CommRingCat} (f : R ⟶ S), CommRingCat.ofHom (CommRingCat.Hom.hom f) = f

theorem CommRingCat.ofHom_id E0 #

∀ {R : Type u} [inst : CommRing R], CommRingCat.ofHom (RingHom.id R) = CategoryTheory.CategoryStruct.id ↧R

theorem CommRingCat.ofHom_comp E0 #

∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),
  CommRingCat.ofHom (g.comp f) = CategoryTheory.CategoryStruct.comp (CommRingCat.ofHom f) (CommRingCat.ofHom g)

theorem CommRingCat.ofHom_apply E0 #

∀ {R S : Type u} [inst : CommRing R] [inst_1 : CommRing S] (f : R →+* S) (r : R),
  (CategoryTheory.ConcreteCategory.hom (CommRingCat.ofHom f)) r = f r

theorem CommRingCat.inv_hom_apply E0 #

∀ {R S : CommRingCat} (e : R ≅ S) (r : ↑R),
  (CategoryTheory.ConcreteCategory.hom e.inv) ((CategoryTheory.ConcreteCategory.hom e.hom) r) = r

theorem CommRingCat.hom_inv_apply E0 #

∀ {R S : CommRingCat} (e : R ≅ S) (s : ↑S),
  (CategoryTheory.ConcreteCategory.hom e.hom) ((CategoryTheory.ConcreteCategory.hom e.inv) s) = s

instance CommRingCat.instInhabited E0 #

Inhabited CommRingCat

def CommRingCat.forget_obj_eq_coe E0 #

CommRingCat → CommRingCat → Prop

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.

instance CommRingCat.instCommRingObjForgetRingHomCarrier E0 #

{R : CommRingCat} → CommRing ((CategoryTheory.forget CommRingCat).obj R)

instance CommRingCat.hasForgetToRingCat E0 #

CategoryTheory.HasForget₂ CommRingCat RingCat

def CommRingCat.fullyFaithfulForget₂ToRingCat E1 #

(CategoryTheory.forget₂ CommRingCat RingCat).FullyFaithful

The forgetful functor from CommRingCat to RingCat is fully faithful.

instance CommRingCat.instFullRingCatForget₂RingHomCarrierCarrier E0 #

(CategoryTheory.forget₂ CommRingCat RingCat).Full

theorem CommRingCat.forgetToRingCat_map_hom E0 #

∀ {R S : CommRingCat} (f : R ⟶ S),
  RingCat.Hom.hom ((CategoryTheory.forget₂ CommRingCat RingCat).map f) = CommRingCat.Hom.hom f

theorem CommRingCat.forgetToRingCat_obj E0 #

∀ {R : CommRingCat}, ↑((CategoryTheory.forget₂ CommRingCat RingCat).obj R) = ↑R

instance CommRingCat.hasForgetToAddCommMonCat E0 #

CategoryTheory.HasForget₂ CommRingCat CommSemiRingCat

theorem CommRingCat.commMon_forget₂_obj_coe E0 #

∀ (M : CommRingCat), ↑(CategoryTheory.HasForget₂.forget₂.obj M) = ↑M

instance CommRingCat.instHasForget₂RingHomCarrierCommMonCatMonoidHomCarrier E0 #

CategoryTheory.HasForget₂ CommRingCat CommMonCat

theorem CommRingCat.commMon_forget₂_map E0 #

∀ {X Y : CommRingCat} (f : X ⟶ Y), CategoryTheory.HasForget₂.forget₂.map f = CommMonCat.ofHom ↑(CommRingCat.Hom.hom f)

def RingEquiv.toCommRingCatIso E1 #

{R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → R ≃+* S → (↧R ≅ ↧S)

Ring equivalences are isomorphisms in category of commutative rings

theorem RingEquiv.toCommRingCatIso_inv E0 #

∀ {R S : Type u} [inst : CommRing R] [inst_1 : CommRing S] (e : R ≃+* S),
  e.toCommRingCatIso.inv = CommRingCat.ofHom ↑e.symm

theorem RingEquiv.toCommRingCatIso_hom E0 #

∀ {R S : Type u} [inst : CommRing R] [inst_1 : CommRing S] (e : R ≃+* S), e.toCommRingCatIso.hom = CommRingCat.ofHom ↑e

instance CommRingCat.forgetReflectIsos E0 #

(CategoryTheory.forget CommRingCat).ReflectsIsomorphisms

def CategoryTheory.Iso.semiRingCatIsoToRingEquiv E1 #

{R S : SemiRingCat} → (R ≅ S) → ↑R ≃+* ↑S

Build a RingEquiv from an isomorphism in the category SemiRingCat.

def CategoryTheory.Iso.ringCatIsoToRingEquiv E1 #

{R S : RingCat} → (R ≅ S) → ↑R ≃+* ↑S

Build a RingEquiv from an isomorphism in the category RingCat.

def CategoryTheory.Iso.commSemiRingCatIsoToRingEquiv E1 #

{R S : CommSemiRingCat} → (R ≅ S) → ↑R ≃+* ↑S

Build a RingEquiv from an isomorphism in the category CommSemiRingCat.

def CategoryTheory.Iso.commRingCatIsoToRingEquiv E1 #

{R S : CommRingCat} → (R ≅ S) → ↑R ≃+* ↑S

Build a RingEquiv from an isomorphism in the category CommRingCat.

theorem CategoryTheory.Iso.semiRingCatIsoToRingEquiv_toRingHom E0 #

∀ {R S : SemiRingCat} (e : R ≅ S), ↑e.semiRingCatIsoToRingEquiv = SemiRingCat.Hom.hom e.hom

theorem CategoryTheory.Iso.ringCatIsoToRingEquiv_toRingHom E0 #

∀ {R S : RingCat} (e : R ≅ S), ↑e.ringCatIsoToRingEquiv = RingCat.Hom.hom e.hom

theorem CategoryTheory.Iso.commSemiRingCatIsoToRingEquiv_toRingHom E0 #

∀ {R S : CommSemiRingCat} (e : R ≅ S), ↑e.commSemiRingCatIsoToRingEquiv = CommSemiRingCat.Hom.hom e.hom

theorem CategoryTheory.Iso.commRingCatIsoToRingEquiv_toRingHom E0 #

∀ {R S : CommRingCat} (e : R ≅ S), ↑e.commRingCatIsoToRingEquiv = CommRingCat.Hom.hom e.hom

theorem RingCat.forget_map_apply E0 #

∀ {R S : RingCat} (f : R ⟶ S) (x : (CategoryTheory.forget RingCat).obj R),
  (CategoryTheory.ConcreteCategory.hom ((CategoryTheory.forget RingCat).map f)) x =
    (CategoryTheory.ConcreteCategory.hom f) x

theorem CommRingCat.forget_map_apply E0 #

∀ {R S : CommRingCat} (f : R ⟶ S) (x : (CategoryTheory.forget CommRingCat).obj R),
  (CategoryTheory.ConcreteCategory.hom ((CategoryTheory.forget CommRingCat).map f)) x =
    (CategoryTheory.ConcreteCategory.hom f) x