Documentation

Mathlib.RingTheory.Congruence

Congruence relations on rings #

This file defines congruence relations on rings, which extend Con and AddCon on monoids and additive monoids.

Most of the time you likely want to use the Ideal.Quotient API that is built on top of this.

Main Definitions #

• RingCon R: the type of congruence relations respecting + and *.
• RingConGen r: the inductively defined smallest ring congruence relation containing a given binary relation.

TODO #

• Use this for RingQuot too.
• Copy across more API from Con and AddCon in GroupTheory/Congruence.lean, such as:
• The CompleteLattice structure.
• The conGen_eq lemma, stating that ringConGen r = infₛ {s : RingCon M | ∀ x y, r x y → s x y}∀ x y, r x y → s x y}→ s x y}.
structure RingCon (R : Type u_1) [inst : Add R] [inst : Mul R] extends :
Type u_1
• Ring congruence relations are closed under addition

add' : ∀ {w x y z : R}, Setoid.r w xSetoid.r y zSetoid.r (w + y) (x + z)
• Ring congruence relations are closed under multiplication

mul' : ∀ {w x y z : R}, Setoid.r w xSetoid.r y zSetoid.r (w * y) (x * z)

A congruence relation on a type with an addition and multiplication is an equivalence relation which preserves both.

Instances For
inductive RingConGen.Rel {R : Type u_1} [inst : Add R] [inst : Mul R] (r : RRProp) :
RRProp
• of: ∀ {R : Type u_1} [inst : Add R] [inst_1 : Mul R] {r : RRProp} (x y : R), r x y
• refl: ∀ {R : Type u_1} [inst : Add R] [inst_1 : Mul R] {r : RRProp} (x : R),
• symm: ∀ {R : Type u_1} [inst : Add R] [inst_1 : Mul R] {r : RRProp} {x y : R},
• trans: ∀ {R : Type u_1} [inst : Add R] [inst_1 : Mul R] {r : RRProp} {x y z : R},
• add: ∀ {R : Type u_1} [inst : Add R] [inst_1 : Mul R] {r : RRProp} {w x y z : R}, RingConGen.Rel r (w + y) (x + z)
• mul: ∀ {R : Type u_1} [inst : Add R] [inst_1 : Mul R] {r : RRProp} {w x y z : R}, RingConGen.Rel r (w * y) (x * z)

The inductively defined smallest ring congruence relation containing a given binary relation.

Instances For
def ringConGen {R : Type u_1} [inst : Add R] [inst : Mul R] (r : RRProp) :

The inductively defined smallest ring congruence relation containing a given binary relation.

Equations
• One or more equations did not get rendered due to their size.
def RingCon.toAddCon {R : Type u_1} [inst : Add R] [inst : Mul R] (c : ) :

Every ring_con is also an AddCon

Equations
def RingCon.toCon {R : Type u_1} [inst : Add R] [inst : Mul R] (c : ) :
Con R

Every RingCon is also a Con

Equations
instance RingCon.instFunLikeRingConForAllProp {R : Type u_1} [inst : Add R] [inst : Mul R] :
FunLike () R fun x => RProp

A coercion from a congruence relation to its underlying binary relation.

Equations
• RingCon.instFunLikeRingConForAllProp = { coe := fun c => Setoid.r, coe_injective' := (_ : ∀ (x y : ), (fun c => Setoid.r) x = (fun c => Setoid.r) yx = y) }
@[simp]
theorem RingCon.rel_eq_coe {R : Type u_1} [inst : Add R] [inst : Mul R] (c : ) :
Setoid.r = c
theorem RingCon.refl {R : Type u_1} [inst : Add R] [inst : Mul R] (c : ) (x : R) :
c x x
theorem RingCon.symm {R : Type u_1} [inst : Add R] [inst : Mul R] (c : ) {x : R} {y : R} :
c x yc y x
theorem RingCon.trans {R : Type u_1} [inst : Add R] [inst : Mul R] (c : ) {x : R} {y : R} {z : R} :
c x yc y zc x z
theorem RingCon.add {R : Type u_1} [inst : Add R] [inst : Mul R] (c : ) {w : R} {x : R} {y : R} {z : R} :
c w xc y zc (w + y) (x + z)
theorem RingCon.mul {R : Type u_1} [inst : Add R] [inst : Mul R] (c : ) {w : R} {x : R} {y : R} {z : R} :
c w xc y zc (w * y) (x * z)
@[simp]
theorem RingCon.rel_mk {R : Type u_1} [inst : Add R] [inst : Mul R] {s : } {ha : ∀ {w x y z : R}, Setoid.r w xSetoid.r y zSetoid.r (w + y) (x + z)} {hm : ∀ {w x y z : R}, Setoid.r w xSetoid.r y zSetoid.r (w * y) (x * z)} {a : R} {b : R} :
{ toSetoid := s, add' := ha, mul' := hm } a b Setoid.r a b
instance RingCon.instInhabitedRingCon {R : Type u_1} [inst : Add R] [inst : Mul R] :
Equations
• RingCon.instInhabitedRingCon = { default := ringConGen EmptyRelation }
def RingCon.Quotient {R : Type u_1} [inst : Add R] [inst : Mul R] (c : ) :
Type u_1

Defining the quotient by a congruence relation of a type with addition and multiplication.

Equations
def RingCon.toQuotient {R : Type u_1} [inst : Add R] [inst : Mul R] {c : } (r : R) :

The morphism into the quotient by a congruence relation

Equations
• r =
instance RingCon.instCoeTCQuotient {R : Type u_1} [inst : Add R] [inst : Mul R] (c : ) :

Coercion from a type with addition and multiplication to its quotient by a congruence relation.

See Note [use has_coe_t].

Equations
• = { coe := RingCon.toQuotient }
instance RingCon.instDecidableEqQuotient {R : Type u_1} [inst : Add R] [inst : Mul R] (c : ) [d : (a b : R) → Decidable (c a b)] :

The quotient by a decidable congruence relation has decidable equality.

Equations
• = id inferInstance
@[simp]
theorem RingCon.quot_mk_eq_coe {R : Type u_1} [inst : Add R] [inst : Mul R] (c : ) (x : R) :
Quot.mk (c) x = x
@[simp]
theorem RingCon.eq {R : Type u_1} [inst : Add R] [inst : Mul R] (c : ) {a : R} {b : R} :
a = b c a b

Two elements are related by a congruence relation c iff they are represented by the same element of the quotient by c.

Basic notation #

The basic algebraic notation, 0, 1, +, *, -, ^, descend naturally under the quotient

instance RingCon.instAddQuotient {R : Type u_1} [inst : Add R] [inst : Mul R] (c : ) :
Equations
@[simp]
theorem RingCon.coe_add {R : Type u_1} [inst : Add R] [inst : Mul R] (c : ) (x : R) (y : R) :
↑(x + y) = x + y
instance RingCon.instMulQuotient {R : Type u_1} [inst : Add R] [inst : Mul R] (c : ) :
Equations
@[simp]
theorem RingCon.coe_mul {R : Type u_1} [inst : Add R] [inst : Mul R] (c : ) (x : R) (y : R) :
↑(x * y) = x * y
instance RingCon.instZeroQuotientToAdd {R : Type u_1} [inst : ] [inst : Mul R] (c : ) :
Equations
@[simp]
theorem RingCon.coe_zero {R : Type u_1} [inst : ] [inst : Mul R] (c : ) :
0 = 0
instance RingCon.instOneQuotientToMul {R : Type u_1} [inst : Add R] [inst : ] (c : ) :
Equations
@[simp]
theorem RingCon.coe_one {R : Type u_1} [inst : Add R] [inst : ] (c : ) :
1 = 1
instance RingCon.instSMulQuotientToMul {α : Type u_1} {R : Type u_2} [inst : Add R] [inst : ] [inst : SMul α R] [inst : ] (c : ) :
SMul α ()
Equations
@[simp]
theorem RingCon.coe_smul {α : Type u_2} {R : Type u_1} [inst : Add R] [inst : ] [inst : SMul α R] [inst : ] (c : ) (a : α) (x : R) :
↑(a x) = a x
instance RingCon.instNegQuotientToAddToAddZeroClassToAddMonoidToSubNegMonoid {R : Type u_1} [inst : ] [inst : Mul R] (c : ) :
Equations
@[simp]
theorem RingCon.coe_neg {R : Type u_1} [inst : ] [inst : Mul R] (c : ) (x : R) :
↑(-x) = -x
instance RingCon.instSubQuotientToAddToAddZeroClassToAddMonoidToSubNegMonoid {R : Type u_1} [inst : ] [inst : Mul R] (c : ) :
Equations
@[simp]
theorem RingCon.coe_sub {R : Type u_1} [inst : ] [inst : Mul R] (c : ) (x : R) (y : R) :
↑(x - y) = x - y
instance RingCon.hasZsmul {R : Type u_1} [inst : ] [inst : Mul R] (c : ) :
Equations
@[simp]
theorem RingCon.coe_zsmul {R : Type u_1} [inst : ] [inst : Mul R] (c : ) (z : ) (x : R) :
↑(z x) = z x
instance RingCon.hasNsmul {R : Type u_1} [inst : ] [inst : Mul R] (c : ) :
Equations
@[simp]
theorem RingCon.coe_nsmul {R : Type u_1} [inst : ] [inst : Mul R] (c : ) (n : ) (x : R) :
↑(n x) = n x
instance RingCon.instPowQuotientToMulToMulOneClassNat {R : Type u_1} [inst : Add R] [inst : ] (c : ) :
Equations
@[simp]
theorem RingCon.coe_pow {R : Type u_1} [inst : Add R] [inst : ] (c : ) (x : R) (n : ) :
↑(x ^ n) = x ^ n
instance RingCon.instNatCastQuotientToAddToAddZeroClassToAddMonoid {R : Type u_1} [inst : ] [inst : Mul R] (c : ) :
Equations
• = { natCast := fun n => n }
@[simp]
theorem RingCon.coe_nat_cast {R : Type u_1} [inst : ] [inst : Mul R] (c : ) (n : ) :
n = n
Equations
• = { intCast := fun z => z }
@[simp]
theorem RingCon.coe_int_cast {R : Type u_1} [inst : ] [inst : Mul R] (c : ) (n : ) :
n = n
instance RingCon.instInhabitedQuotient {R : Type u_1} [inst : ] [inst : Add R] [inst : Mul R] (c : ) :
Equations
• = { default := default }

Algebraic structure #

The operations above on the quotient by c : RingCon R preseverse the algebraic structure of R.

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.
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.
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.
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.
def RingCon.mk' {R : Type u_1} [inst : ] (c : ) :

The natural homomorphism from a ring to its quotient by a congruence relation.

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