# mathlibdocumentation

algebra.ring_quot

# Quotients of non-commutative rings #

Unfortunately, ideals have only been developed in the commutative case as ideal, and it's not immediately clear how one should formalise ideals in the non-commutative case.

In this file, we directly define the quotient of a semiring by any relation, by building a bigger relation that represents the ideal generated by that relation.

We prove the universal properties of the quotient, and recommend avoiding relying on the actual definition, which is made irreducible for this purpose.

Since everything runs in parallel for quotients of R-algebras, we do that case at the same time.

inductive ring_quot.rel {R : Type u₁} [semiring R] (r : R → R → Prop) :
R → R → Prop
• of : ∀ {R : Type u₁} [_inst_1 : semiring R] {r : R → R → Prop} ⦃x y : R⦄, r x y y
• add_left : ∀ {R : Type u₁} [_inst_1 : semiring R] {r : R → R → Prop} ⦃a b c : R⦄, b (a + c) (b + c)
• mul_left : ∀ {R : Type u₁} [_inst_1 : semiring R] {r : R → R → Prop} ⦃a b c : R⦄, b (a * c) (b * c)
• mul_right : ∀ {R : Type u₁} [_inst_1 : semiring R] {r : R → R → Prop} ⦃a b c : R⦄, c (a * b) (a * c)

Given an arbitrary relation r on a ring, we strengthen it to a relation rel r, such that the equivalence relation generated by rel r has x ~ y if and only if x - y is in the ideal generated by elements a - b such that r a b.

theorem ring_quot.rel.add_right {R : Type u₁} [semiring R] {r : R → R → Prop} ⦃a b c : R⦄ (h : c) :
(a + b) (a + c)
theorem ring_quot.rel.neg {R : Type u₁} [ring R] {r : R → R → Prop} ⦃a b : R⦄ (h : b) :
(-a) (-b)
theorem ring_quot.rel.sub_left {R : Type u₁} [ring R] {r : R → R → Prop} ⦃a b c : R⦄ (h : b) :
(a - c) (b - c)
theorem ring_quot.rel.sub_right {R : Type u₁} [ring R] {r : R → R → Prop} ⦃a b c : R⦄ (h : c) :
(a - b) (a - c)
theorem ring_quot.rel.smul {S : Type u₂} {A : Type u₃} [semiring A] [ A] {r : A → A → Prop} (k : S) ⦃a b : A⦄ (h : b) :
(k a) (k b)
structure ring_quot {R : Type u₁} [semiring R] (r : R → R → Prop) :
Type u₁
• to_quot : quot

The quotient of a ring by an arbitrary relation.

Instances for ring_quot
@[protected, instance]
def ring_quot.has_zero {R : Type u₁} [semiring R] (r : R → R → Prop) :
Equations
@[protected, instance]
def ring_quot.has_one {R : Type u₁} [semiring R] (r : R → R → Prop) :
Equations
@[protected, instance]
def ring_quot.has_add {R : Type u₁} [semiring R] (r : R → R → Prop) :
Equations
@[protected, instance]
def ring_quot.has_mul {R : Type u₁} [semiring R] (r : R → R → Prop) :
Equations
@[protected, instance]
def ring_quot.nat.has_pow {R : Type u₁} [semiring R] (r : R → R → Prop) :
Equations
• = {pow := λ (x : (n : ), npow r n x}
@[protected, instance]
def ring_quot.has_neg {R : Type u₁} [ring R] (r : R → R → Prop) :
Equations
@[protected, instance]
def ring_quot.has_sub {R : Type u₁} [ring R] (r : R → R → Prop) :
Equations
@[protected, instance]
def ring_quot.has_smul {R : Type u₁} [semiring R] {S : Type u₂} (r : R → R → Prop) [ R] :
Equations
theorem ring_quot.zero_quot {R : Type u₁} [semiring R] (r : R → R → Prop) :
{to_quot := quot.mk 0} = 0
theorem ring_quot.one_quot {R : Type u₁} [semiring R] (r : R → R → Prop) :
{to_quot := quot.mk 1} = 1
theorem ring_quot.add_quot {R : Type u₁} [semiring R] (r : R → R → Prop) {a b : R} :
{to_quot := quot.mk a} + {to_quot := quot.mk b} = {to_quot := quot.mk (a + b)}
theorem ring_quot.mul_quot {R : Type u₁} [semiring R] (r : R → R → Prop) {a b : R} :
{to_quot := quot.mk a} * {to_quot := quot.mk b} = {to_quot := quot.mk (a * b)}
theorem ring_quot.pow_quot {R : Type u₁} [semiring R] (r : R → R → Prop) {a : R} {n : } :
{to_quot := quot.mk a} ^ n = {to_quot := quot.mk (a ^ n)}
theorem ring_quot.neg_quot {R : Type u₁} [ring R] (r : R → R → Prop) {a : R} :
-{to_quot := quot.mk a} = {to_quot := quot.mk (-a)}
theorem ring_quot.sub_quot {R : Type u₁} [ring R] (r : R → R → Prop) {a b : R} :
{to_quot := quot.mk a} - {to_quot := quot.mk b} = {to_quot := quot.mk (a - b)}
theorem ring_quot.smul_quot {R : Type u₁} [semiring R] {S : Type u₂} (r : R → R → Prop) [ R] {n : S} {a : R} :
n {to_quot := quot.mk a} = {to_quot := quot.mk (n a)}
@[protected, instance]
def ring_quot.semiring {R : Type u₁} [semiring R] (r : R → R → Prop) :
Equations
@[protected, instance]
def ring_quot.ring {R : Type u₁} [ring R] (r : R → R → Prop) :
Equations
@[protected, instance]
def ring_quot.comm_semiring {R : Type u₁} (r : R → R → Prop) :
Equations
@[protected, instance]
def ring_quot.comm_ring {R : Type u₁} [comm_ring R] (r : R → R → Prop) :
Equations
@[protected, instance]
def ring_quot.inhabited {R : Type u₁} [semiring R] (r : R → R → Prop) :
Equations
@[protected, instance]
def ring_quot.algebra {R : Type u₁} [semiring R] {S : Type u₂} [ R] (r : R → R → Prop) :
Equations
@[irreducible]
def ring_quot.mk_ring_hom {R : Type u₁} [semiring R] (r : R → R → Prop) :

The quotient map from a ring to its quotient, as a homomorphism of rings.

Equations
theorem ring_quot.mk_ring_hom_rel {R : Type u₁} [semiring R] {r : R → R → Prop} {x y : R} (w : r x y) :
=
theorem ring_quot.mk_ring_hom_surjective {R : Type u₁} [semiring R] (r : R → R → Prop) :
@[ext]
theorem ring_quot.ring_quot_ext {R : Type u₁} [semiring R] {T : Type u₄} [semiring T] {r : R → R → Prop} (f g : →+* T) (w : = ) :
f = g
@[irreducible]
def ring_quot.lift {R : Type u₁} [semiring R] {T : Type u₄} [semiring T] {r : R → R → Prop} :
{f // ∀ ⦃x y : R⦄, r x yf x = f y} →+* T)

Any ring homomorphism f : R →+* T which respects a relation r : R → R → Prop factors uniquely through a morphism ring_quot r →+* T.

Equations
@[simp]
theorem ring_quot.lift_mk_ring_hom_apply {R : Type u₁} [semiring R] {T : Type u₄} [semiring T] (f : R →+* T) {r : R → R → Prop} (w : ∀ ⦃x y : R⦄, r x yf x = f y) (x : R) :
(ring_quot.lift f, w⟩) x) = f x
theorem ring_quot.lift_unique {R : Type u₁} [semiring R] {T : Type u₄} [semiring T] (f : R →+* T) {r : R → R → Prop} (w : ∀ ⦃x y : R⦄, r x yf x = f y) (g : →+* T) (h : = f) :
theorem ring_quot.eq_lift_comp_mk_ring_hom {R : Type u₁} [semiring R] {T : Type u₄} [semiring T] {r : R → R → Prop} (f : →+* T) :

We now verify that in the case of a commutative ring, the ring_quot construction agrees with the quotient by the appropriate ideal.

def ring_quot.ring_quot_to_ideal_quotient {B : Type u₁} [comm_ring B] (r : B → B → Prop) :

The universal ring homomorphism from ring_quot r to B ⧸ ideal.of_rel r.

Equations
@[simp]
theorem ring_quot.ring_quot_to_ideal_quotient_apply {B : Type u₁} [comm_ring B] (r : B → B → Prop) (x : B) :
def ring_quot.ideal_quotient_to_ring_quot {B : Type u₁} [comm_ring B] (r : B → B → Prop) :

The universal ring homomorphism from B ⧸ ideal.of_rel r to ring_quot r.

Equations
@[simp]
theorem ring_quot.ideal_quotient_to_ring_quot_apply {B : Type u₁} [comm_ring B] (r : B → B → Prop) (x : B) :
def ring_quot.ring_quot_equiv_ideal_quotient {B : Type u₁} [comm_ring B] (r : B → B → Prop) :

The ring equivalence between ring_quot r and (ideal.of_rel r).quotient

Equations
theorem ring_quot.rel.star {R : Type u₁} [semiring R] (r : R → R → Prop) [star_ring R] (hr : ∀ (a b : R), r a br ) ⦃a b : R⦄ (h : b) :
theorem ring_quot.star'_quot {R : Type u₁} [semiring R] (r : R → R → Prop) [star_ring R] (hr : ∀ (a b : R), r a br ) {a : R} :
star' r hr {to_quot := quot.mk a} = {to_quot := quot.mk (has_star.star a)}
def ring_quot.star_ring {R : Type u₁} [semiring R] [star_ring R] (r : R → R → Prop) (hr : ∀ (a b : R), r a br ) :

Transfer a star_ring instance through a quotient, if the quotient is invariant to star

Equations
@[irreducible]
def ring_quot.mk_alg_hom (S : Type u₂) {A : Type u₃} [semiring A] [ A] (s : A → A → Prop) :

The quotient map from an S-algebra to its quotient, as a homomorphism of S-algebras.

Equations
@[simp]
theorem ring_quot.mk_alg_hom_coe (S : Type u₂) {A : Type u₃} [semiring A] [ A] (s : A → A → Prop) :
theorem ring_quot.mk_alg_hom_rel (S : Type u₂) {A : Type u₃} [semiring A] [ A] {s : A → A → Prop} {x y : A} (w : s x y) :
s) x = s) y
theorem ring_quot.mk_alg_hom_surjective (S : Type u₂) {A : Type u₃} [semiring A] [ A] (s : A → A → Prop) :
@[ext]
theorem ring_quot.ring_quot_ext' (S : Type u₂) {A : Type u₃} [semiring A] [ A] {B : Type u₄} [semiring B] [ B] {s : A → A → Prop} (f g : →ₐ[S] B) (w : f.comp s) = g.comp s)) :
f = g
@[irreducible]
def ring_quot.lift_alg_hom (S : Type u₂) {A : Type u₃} [semiring A] [ A] {B : Type u₄} [semiring B] [ B] {s : A → A → Prop} :
{f // ∀ ⦃x y : A⦄, s x yf x = f y} →ₐ[S] B)

Any S-algebra homomorphism f : A →ₐ[S] B which respects a relation s : A → A → Prop factors uniquely through a morphism ring_quot s →ₐ[S] B.

Equations
@[simp]
theorem ring_quot.lift_alg_hom_mk_alg_hom_apply (S : Type u₂) {A : Type u₃} [semiring A] [ A] {B : Type u₄} [semiring B] [ B] (f : A →ₐ[S] B) {s : A → A → Prop} (w : ∀ ⦃x y : A⦄, s x yf x = f y) (x : A) :
f, w⟩) ( s) x) = f x
theorem ring_quot.lift_alg_hom_unique (S : Type u₂) {A : Type u₃} [semiring A] [ A] {B : Type u₄} [semiring B] [ B] (f : A →ₐ[S] B) {s : A → A → Prop} (w : ∀ ⦃x y : A⦄, s x yf x = f y) (g : →ₐ[S] B) (h : g.comp s) = f) :
g = f, w⟩
theorem ring_quot.eq_lift_alg_hom_comp_mk_alg_hom (S : Type u₂) {A : Type u₃} [semiring A] [ A] {B : Type u₄} [semiring B] [ B] {s : A → A → Prop} (f : →ₐ[S] B) :
f = f.comp s), _⟩