# The category of commutative rings has all colimits. #

This file uses a "pre-automated" approach, just as for Mathlib/Algebra/Category/MonCat/Colimits.lean. It is a very uniform approach, that conceivably could be synthesised directly by a tactic that analyses the shape of CommRing and RingHom.

We build the colimit of a diagram in CommRingCat by constructing the free commutative ring on the disjoint union of all the commutative rings in the diagram, then taking the quotient by the commutative ring laws within each commutative ring, and the identifications given by the morphisms in the diagram.

An inductive type representing all commutative ring expressions (without Relations) on a collection of types indexed by the objects of J.

• of: {J : Type v} → [inst : ] → {F : } → (j : J) → (F.obj j)
• zero: {J : Type v} → [inst : ] →
• one: {J : Type v} → [inst : ] →
• neg: {J : Type v} →
• add: {J : Type v} → [inst : ] →
• mul: {J : Type v} → [inst : ] →
Instances For
Equations
• = { default := CommRingCat.Colimits.Prequotient.zero }

The Relation on Prequotient saying when two expressions are equal because of the commutative ring laws, or because one element is mapped to another by a morphism in the diagram.

Instances For

The setoid corresponding to commutative expressions modulo monoid Relations and identifications.

Equations
• = { r := , iseqv := }

The underlying type of the colimit of a diagram in CommRingCat.

Equations
Instances For
Equations
• = { zero := CommRingCat.Colimits.Prequotient.zero }
Equations
Equations
• = { neg := Quotient.map CommRingCat.Colimits.Prequotient.neg }
Equations
Equations
• = { default := 0 }
Equations
Equations
@[simp]
theorem CommRingCat.Colimits.quot_zero {J : Type v} :
Quot.mk Setoid.r CommRingCat.Colimits.Prequotient.zero = 0
@[simp]
theorem CommRingCat.Colimits.quot_one {J : Type v} :
Quot.mk Setoid.r CommRingCat.Colimits.Prequotient.one = 1
@[simp]
theorem CommRingCat.Colimits.quot_neg {J : Type v} :
Quot.mk Setoid.r x.neg = -Quot.mk Setoid.r x
@[simp]
theorem CommRingCat.Colimits.quot_add {J : Type v} :
Quot.mk Setoid.r (x.add y) = Quot.mk Setoid.r x + Quot.mk Setoid.r y
@[simp]
theorem CommRingCat.Colimits.quot_mul {J : Type v} :
Quot.mk Setoid.r (x.mul y) = Quot.mk Setoid.r x * Quot.mk Setoid.r y

The bundled commutative ring giving the colimit of a diagram.

Equations
Instances For
def CommRingCat.Colimits.coconeFun {J : Type v} (j : J) (x : (F.obj j)) :

The function from a given commutative ring in the diagram to the colimit commutative ring.

Equations
Instances For
def CommRingCat.Colimits.coconeMorphism {J : Type v} (j : J) :
F.obj j

The ring homomorphism from a given commutative ring in the diagram to the colimit commutative ring.

Equations
• = { toFun := , map_one' := , map_mul' := , map_zero' := , map_add' := }
Instances For
@[simp]
theorem CommRingCat.Colimits.cocone_naturality {J : Type v} {j : J} {j' : J} (f : j j') :
@[simp]
theorem CommRingCat.Colimits.cocone_naturality_components {J : Type v} (j : J) (j' : J) (f : j j') (x : (F.obj j)) :
((F.map f) x) =

The cocone over the proposed colimit commutative ring.

Equations
• = { pt := , ι := { app := , naturality := } }
Instances For
def CommRingCat.Colimits.descFunLift {J : Type v} (s : ) :
s.pt

The function from the free commutative ring on the diagram to the cone point of any other cocone.

Equations
Instances For
def CommRingCat.Colimits.descFun {J : Type v} (s : ) :
s.pt

The function from the colimit commutative ring to the cone point of any other cocone.

Equations
Instances For

The ring homomorphism from the colimit commutative ring to the cone point of any other cocone.

Equations
• = { toFun := , map_one' := , map_mul' := , map_zero' := , map_add' := }
Instances For

Evidence that the proposed colimit is the colimit.

Equations
• = { desc := fun (s : ) => , fac := , uniq := }
Instances For