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
andAddCon
inGroupTheory/Congruence.lean
.
A congruence relation on a type with an addition and multiplication is an equivalence relation which preserves both.
- r : R → R → Prop
- iseqv : Equivalence Setoid.r
Additive congruence relations are closed under addition
Instances For
The induced additive congruence from a RingCon
.
Equations
- RingCon.toAddCon self = { toSetoid := self.toSetoid, add' := ⋯ }
Instances For
The inductively defined smallest ring congruence relation containing a given binary relation.
- of: ∀ {R : Type u_2} [inst : Add R] [inst_1 : Mul R] {r : R → R → Prop} (x y : R), r x y → RingConGen.Rel r x y
- refl: ∀ {R : Type u_2} [inst : Add R] [inst_1 : Mul R] {r : R → R → Prop} (x : R), RingConGen.Rel r x x
- symm: ∀ {R : Type u_2} [inst : Add R] [inst_1 : Mul R] {r : R → R → Prop} {x y : R}, RingConGen.Rel r x y → RingConGen.Rel r y x
- trans: ∀ {R : Type u_2} [inst : Add R] [inst_1 : Mul R] {r : R → R → Prop} {x y z : R}, RingConGen.Rel r x y → RingConGen.Rel r y z → RingConGen.Rel r x z
- add: ∀ {R : Type u_2} [inst : Add R] [inst_1 : Mul R] {r : R → R → Prop} {w x y z : R}, RingConGen.Rel r w x → RingConGen.Rel r y z → RingConGen.Rel r (w + y) (x + z)
- mul: ∀ {R : Type u_2} [inst : Add R] [inst_1 : Mul R] {r : R → R → Prop} {w x y z : R}, RingConGen.Rel r w x → RingConGen.Rel r y z → RingConGen.Rel r (w * y) (x * z)
Instances For
The inductively defined smallest ring congruence relation containing a given binary relation.
Equations
- ringConGen r = { toCon := { toSetoid := { r := RingConGen.Rel r, iseqv := ⋯ }, mul' := ⋯ }, add' := ⋯ }
Instances For
Equations
- RingCon.instInhabitedRingCon = { default := ringConGen EmptyRelation }
Defining the quotient by a congruence relation of a type with addition and multiplication.
Equations
- RingCon.Quotient c = Quotient c.toSetoid
Instances For
Coercion from a type with addition and multiplication to its quotient by a congruence relation.
See Note [use has_coe_t].
Equations
- RingCon.instCoeTCQuotient c = { coe := RingCon.toQuotient }
The quotient by a decidable congruence relation has decidable equality.
Equations
- RingCon.instDecidableEqQuotient c = inferInstanceAs (DecidableEq (Quotient c.toSetoid))
Basic notation #
The basic algebraic notation, 0
, 1
, +
, *
, -
, ^
, descend naturally under the quotient
Equations
Equations
- RingCon.instMulQuotient c = inferInstanceAs (Mul (Con.Quotient c.toCon))
Equations
Equations
- RingCon.instOneQuotientToMul c = inferInstanceAs (One (Con.Quotient c.toCon))
Equations
- RingCon.instSMulQuotientToMul c = inferInstanceAs (SMul α (Con.Quotient c.toCon))
Equations
Equations
Equations
- RingCon.instPowQuotientToMulToMulOneClassNat c = inferInstanceAs (Pow (Con.Quotient c.toCon) ℕ)
Equations
- RingCon.instNatCastQuotientToAddToAddSemigroupToAddMonoid c = { natCast := fun (n : ℕ) => ↑↑n }
Equations
- RingCon.instIntCastQuotientToAddToAddSemigroupToAddMonoidToAddMonoidWithOne c = { intCast := fun (z : ℤ) => ↑↑z }
Equations
- RingCon.instInhabitedQuotient c = { default := ↑default }
Algebraic structure #
The operations above on the quotient by c : RingCon R
preserve the algebraic structure of R
.
Equations
- RingCon.instNonUnitalNonAssocSemiringQuotientToAddToDistribToMul c = Function.Surjective.nonUnitalNonAssocSemiring Quotient.mk'' ⋯ ⋯ ⋯ ⋯ ⋯
Equations
- RingCon.instNonAssocSemiringQuotientToAddToDistribToNonUnitalNonAssocSemiringToMul c = Function.Surjective.nonAssocSemiring Quotient.mk'' ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯
Equations
Equations
- RingCon.instSemiringQuotientToAddToDistribToNonUnitalNonAssocSemiringToNonAssocSemiringToMul c = Function.Surjective.semiring Quotient.mk'' ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯
Equations
Equations
- RingCon.instNonUnitalNonAssocRingQuotientToAddToDistribToNonUnitalNonAssocSemiringToMul c = Function.Surjective.nonUnitalNonAssocRing Quotient.mk'' ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯
Equations
- RingCon.instNonAssocRingQuotientToAddToDistribToNonUnitalNonAssocSemiringToNonUnitalNonAssocRingToMul c = Function.Surjective.nonAssocRing Quotient.mk'' ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯
Equations
- RingCon.instNonUnitalRingQuotientToAddToDistribToNonUnitalNonAssocSemiringToNonUnitalNonAssocRingToMul c = Function.Surjective.nonUnitalRing Quotient.mk'' ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯
Equations
- RingCon.instRingQuotientToAddToDistribToNonUnitalNonAssocSemiringToNonUnitalNonAssocRingToNonAssocRingToMul c = Function.Surjective.ring Quotient.mk'' ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯
Equations
- One or more equations did not get rendered due to their size.
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
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.
The natural homomorphism from a ring to its quotient by a congruence relation.
Equations
- RingCon.mk' c = { toMonoidHom := { toOneHom := { toFun := RingCon.toQuotient, map_one' := ⋯ }, map_mul' := ⋯ }, map_zero' := ⋯, map_add' := ⋯ }
Instances For
Lattice structure #
The API in this section is copied from Mathlib/GroupTheory/Congruence.lean
For congruence relations c, d
on a type M
with multiplication and addition, c ≤ d
iff
∀ x y ∈ M
, x
is related to y
by d
if x
is related to y
by c
.
The infimum of a set of congruence relations on a given type with multiplication and addition.
Equations
- RingCon.instPartialOrderRingCon = PartialOrder.mk ⋯
The complete lattice of congruence relations on a given type with multiplication and addition.
Equations
- RingCon.instCompleteLatticeRingCon = let __spread.0 := completeLatticeOfInf (RingCon R) ⋯; CompleteLattice.mk ⋯ ⋯ ⋯ ⋯ ⋯ ⋯
The inductively defined smallest congruence relation containing a binary relation r
equals
the infimum of the set of congruence relations containing r
.
The smallest congruence relation containing a binary relation r
is contained in any
congruence relation containing r
.
Given binary relations r, s
with r
contained in s
, the smallest congruence relation
containing s
contains the smallest congruence relation containing r
.
Congruence relations equal the smallest congruence relation in which they are contained.
The map sending a binary relation to the smallest congruence relation in which it is contained is idempotent.
The supremum of a set of congruence relations S
equals the smallest congruence relation
containing the binary relation 'there exists c ∈ S
such that x
is related to y
by
c
'.
The supremum of a set of congruence relations is the same as the smallest congruence relation containing the supremum of the set's image under the map to the underlying binary relation.
There is a Galois insertion of congruence relations on a type with multiplication and addition
R
into binary relations on R
.
Equations
- RingCon.gi R = { choice := fun (r : R → R → Prop) (_h : ⇑(ringConGen r) ≤ r) => ringConGen r, gc := ⋯, le_l_u := ⋯, choice_eq := ⋯ }