Documentation

Mathlib.Algebra.RingQuot

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.

@[simp]
theorem RingCon.coe_algebraMap {S : Type uS} [CommSemiring S] {A : Type uA} [Semiring A] [Algebra S A] (c : RingCon A) (s : S) :
((algebraMap S A) s) = (algebraMap S (RingCon.Quotient c)) s
inductive RingQuot.Rel {R : Type uR} [Semiring R] (r : RRProp) :
RRProp

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.

Instances For
    theorem RingQuot.Rel.add_right {R : Type uR} [Semiring R] {r : RRProp} ⦃a : R ⦃b : R ⦃c : R (h : RingQuot.Rel r b c) :
    RingQuot.Rel r (a + b) (a + c)
    theorem RingQuot.Rel.neg {R : Type uR} [Ring R] {r : RRProp} ⦃a : R ⦃b : R (h : RingQuot.Rel r a b) :
    RingQuot.Rel r (-a) (-b)
    theorem RingQuot.Rel.sub_left {R : Type uR} [Ring R] {r : RRProp} ⦃a : R ⦃b : R ⦃c : R (h : RingQuot.Rel r a b) :
    RingQuot.Rel r (a - c) (b - c)
    theorem RingQuot.Rel.sub_right {R : Type uR} [Ring R] {r : RRProp} ⦃a : R ⦃b : R ⦃c : R (h : RingQuot.Rel r b c) :
    RingQuot.Rel r (a - b) (a - c)
    theorem RingQuot.Rel.smul {S : Type uS} [CommSemiring S] {A : Type uA} [Semiring A] [Algebra S A] {r : AAProp} (k : S) ⦃a : A ⦃b : A (h : RingQuot.Rel r a b) :
    RingQuot.Rel r (k a) (k b)
    def RingQuot.ringCon {R : Type uR} [Semiring R] (r : RRProp) :

    EqvGen (RingQuot.Rel r) is a ring congruence.

    Equations
    Instances For
      theorem RingQuot.eqvGen_rel_eq {R : Type uR} [Semiring R] (r : RRProp) :
      structure RingQuot {R : Type uR} [Semiring R] (r : RRProp) :
      Type uR

      The quotient of a ring by an arbitrary relation.

      Instances For
        instance RingQuot.instNatCastRingQuot {R : Type uR} [Semiring R] (r : RRProp) :
        Equations
        instance RingQuot.instZeroRingQuot {R : Type uR} [Semiring R] (r : RRProp) :
        Equations
        instance RingQuot.instOneRingQuot {R : Type uR} [Semiring R] (r : RRProp) :
        Equations
        instance RingQuot.instAddRingQuot {R : Type uR} [Semiring R] (r : RRProp) :
        Equations
        instance RingQuot.instMulRingQuot {R : Type uR} [Semiring R] (r : RRProp) :
        Equations
        instance RingQuot.instNatPowRingQuot {R : Type uR} [Semiring R] (r : RRProp) :
        Equations
        instance RingQuot.instNegRingQuotToSemiring {R : Type uR} [Ring R] (r : RRProp) :
        Equations
        instance RingQuot.instSubRingQuotToSemiring {R : Type uR} [Ring R] (r : RRProp) :
        Equations
        instance RingQuot.instSMulRingQuot {R : Type uR} [Semiring R] {S : Type uS} [CommSemiring S] (r : RRProp) [Algebra S R] :
        Equations
        theorem RingQuot.zero_quot {R : Type uR} [Semiring R] (r : RRProp) :
        { toQuot := Quot.mk (RingQuot.Rel r) 0 } = 0
        theorem RingQuot.one_quot {R : Type uR} [Semiring R] (r : RRProp) :
        { toQuot := Quot.mk (RingQuot.Rel r) 1 } = 1
        theorem RingQuot.add_quot {R : Type uR} [Semiring R] (r : RRProp) {a : R} {b : R} :
        { toQuot := Quot.mk (RingQuot.Rel r) a } + { toQuot := Quot.mk (RingQuot.Rel r) b } = { toQuot := Quot.mk (RingQuot.Rel r) (a + b) }
        theorem RingQuot.mul_quot {R : Type uR} [Semiring R] (r : RRProp) {a : R} {b : R} :
        { toQuot := Quot.mk (RingQuot.Rel r) a } * { toQuot := Quot.mk (RingQuot.Rel r) b } = { toQuot := Quot.mk (RingQuot.Rel r) (a * b) }
        theorem RingQuot.pow_quot {R : Type uR} [Semiring R] (r : RRProp) {a : R} {n : } :
        { toQuot := Quot.mk (RingQuot.Rel r) a } ^ n = { toQuot := Quot.mk (RingQuot.Rel r) (a ^ n) }
        theorem RingQuot.neg_quot {R : Type uR} [Ring R] (r : RRProp) {a : R} :
        -{ toQuot := Quot.mk (RingQuot.Rel r) a } = { toQuot := Quot.mk (RingQuot.Rel r) (-a) }
        theorem RingQuot.sub_quot {R : Type uR} [Ring R] (r : RRProp) {a : R} {b : R} :
        { toQuot := Quot.mk (RingQuot.Rel r) a } - { toQuot := Quot.mk (RingQuot.Rel r) b } = { toQuot := Quot.mk (RingQuot.Rel r) (a - b) }
        theorem RingQuot.smul_quot {R : Type uR} [Semiring R] {S : Type uS} [CommSemiring S] (r : RRProp) [Algebra S R] {n : S} {a : R} :
        n { toQuot := Quot.mk (RingQuot.Rel r) a } = { toQuot := Quot.mk (RingQuot.Rel r) (n a) }
        instance RingQuot.instIsScalarTower {R : Type uR} [Semiring R] {S : Type uS} [CommSemiring S] {T : Type uT} (r : RRProp) [CommSemiring T] [SMul S T] [Algebra S R] [Algebra T R] [IsScalarTower S T R] :
        Equations
        • =
        instance RingQuot.instSMulCommClass {R : Type uR} [Semiring R] {S : Type uS} [CommSemiring S] {T : Type uT} (r : RRProp) [CommSemiring T] [Algebra S R] [Algebra T R] [SMulCommClass S T R] :
        Equations
        • =
        instance RingQuot.instSemiring {R : Type uR} [Semiring R] (r : RRProp) :
        Equations
        instance RingQuot.instRing {R : Type uR} [Ring R] (r : RRProp) :
        Equations
        instance RingQuot.instInhabited {R : Type uR} [Semiring R] (r : RRProp) :
        Equations
        instance RingQuot.instAlgebra {R : Type uR} [Semiring R] {S : Type uS} [CommSemiring S] [Algebra S R] (r : RRProp) :
        Equations
        • One or more equations did not get rendered due to their size.
        @[irreducible]
        def RingQuot.mkRingHom {R : Type u_1} [Semiring R] (r : RRProp) :

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

        Equations
        Instances For
          theorem RingQuot.mkRingHom_def {R : Type u_1} [Semiring R] (r : RRProp) :
          RingQuot.mkRingHom r = { toMonoidHom := { toOneHom := { toFun := fun (x : R) => { toQuot := Quot.mk (RingQuot.Rel r) x }, map_one' := }, map_mul' := }, map_zero' := , map_add' := }
          theorem RingQuot.mkRingHom_rel {R : Type uR} [Semiring R] {r : RRProp} {x : R} {y : R} (w : r x y) :
          theorem RingQuot.ringQuot_ext {R : Type uR} [Semiring R] {T : Type uT} [Semiring T] {r : RRProp} (f : RingQuot r →+* T) (g : RingQuot r →+* T) (w : RingHom.comp f (RingQuot.mkRingHom r) = RingHom.comp g (RingQuot.mkRingHom r)) :
          f = g
          theorem RingQuot.preLift_def {R : Type u_1} [Semiring R] {T : Type u_2} [Semiring T] {r : RRProp} {f : R →+* T} (h : ∀ ⦃x y : R⦄, r x yf x = f y) :
          RingQuot.preLift h = { toMonoidHom := { toOneHom := { toFun := fun (x : RingQuot r) => Quot.lift f x.toQuot, map_one' := }, map_mul' := }, map_zero' := , map_add' := }
          @[irreducible]
          def RingQuot.preLift {R : Type u_1} [Semiring R] {T : Type u_2} [Semiring T] {r : RRProp} {f : R →+* T} (h : ∀ ⦃x y : R⦄, r x yf x = f y) :
          Equations
          Instances For
            @[irreducible]
            def RingQuot.lift {R : Type u_1} [Semiring R] {T : Type u_2} [Semiring T] {r : RRProp} :
            { f : R →+* T // ∀ ⦃x y : R⦄, r x yf x = f y } (RingQuot r →+* T)

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

            Equations
            Instances For
              theorem RingQuot.lift_def {R : Type u_1} [Semiring R] {T : Type u_2} [Semiring T] {r : RRProp} :
              RingQuot.lift = { toFun := fun (f : { f : R →+* T // ∀ ⦃x y : R⦄, r x yf x = f y }) => RingQuot.preLift , invFun := fun (F : RingQuot r →+* T) => { val := RingHom.comp F (RingQuot.mkRingHom r), property := }, left_inv := , right_inv := }
              @[simp]
              theorem RingQuot.lift_mkRingHom_apply {R : Type uR} [Semiring R] {T : Type uT} [Semiring T] (f : R →+* T) {r : RRProp} (w : ∀ ⦃x y : R⦄, r x yf x = f y) (x : R) :
              (RingQuot.lift { val := f, property := w }) ((RingQuot.mkRingHom r) x) = f x
              theorem RingQuot.lift_unique {R : Type uR} [Semiring R] {T : Type uT} [Semiring T] (f : R →+* T) {r : RRProp} (w : ∀ ⦃x y : R⦄, r x yf x = f y) (g : RingQuot r →+* T) (h : RingHom.comp g (RingQuot.mkRingHom r) = f) :
              g = RingQuot.lift { val := f, property := w }
              theorem RingQuot.eq_lift_comp_mkRingHom {R : Type uR} [Semiring R] {T : Type uT} [Semiring T] {r : RRProp} (f : RingQuot r →+* T) :
              f = RingQuot.lift { val := RingHom.comp f (RingQuot.mkRingHom r), property := }

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

              The universal ring homomorphism from RingQuot r to B ⧸ Ideal.ofRel r.

              Equations
              Instances For

                The universal ring homomorphism from B ⧸ Ideal.ofRel r to RingQuot r.

                Equations
                Instances For

                  The ring equivalence between RingQuot r and (Ideal.ofRel r).quotient

                  Equations
                  Instances For
                    theorem RingQuot.Rel.star {R : Type uR} [Semiring R] (r : RRProp) [StarRing R] (hr : ∀ (a b : R), r a br (star a) (star b)) ⦃a : R ⦃b : R (h : RingQuot.Rel r a b) :
                    theorem RingQuot.star'_quot {R : Type uR} [Semiring R] (r : RRProp) [StarRing R] (hr : ∀ (a b : R), r a br (star a) (star b)) {a : R} :
                    RingQuot.star' r hr { toQuot := Quot.mk (RingQuot.Rel r) a } = { toQuot := Quot.mk (RingQuot.Rel r) (star a) }
                    def RingQuot.starRing {R : Type uR} [Semiring R] [StarRing R] (r : RRProp) (hr : ∀ (a b : R), r a br (star a) (star b)) :

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

                    Equations
                    Instances For
                      @[irreducible]
                      def RingQuot.mkAlgHom (S : Type u_1) [CommSemiring S] {A : Type u_2} [Semiring A] [Algebra S A] (s : AAProp) :

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

                      Equations
                      Instances For
                        theorem RingQuot.mkAlgHom_def (S : Type u_1) [CommSemiring S] {A : Type u_2} [Semiring A] [Algebra S A] (s : AAProp) :
                        RingQuot.mkAlgHom S s = let __src := RingQuot.mkRingHom s; { toRingHom := __src, commutes' := }
                        @[simp]
                        theorem RingQuot.mkAlgHom_coe (S : Type uS) [CommSemiring S] {A : Type uA} [Semiring A] [Algebra S A] (s : AAProp) :
                        theorem RingQuot.mkAlgHom_rel (S : Type uS) [CommSemiring S] {A : Type uA} [Semiring A] [Algebra S A] {s : AAProp} {x : A} {y : A} (w : s x y) :
                        theorem RingQuot.mkAlgHom_surjective (S : Type uS) [CommSemiring S] {A : Type uA} [Semiring A] [Algebra S A] (s : AAProp) :
                        theorem RingQuot.ringQuot_ext' (S : Type uS) [CommSemiring S] {A : Type uA} [Semiring A] [Algebra S A] {B : Type u₄} [Semiring B] [Algebra S B] {s : AAProp} (f : RingQuot s →ₐ[S] B) (g : RingQuot s →ₐ[S] B) (w : AlgHom.comp f (RingQuot.mkAlgHom S s) = AlgHom.comp g (RingQuot.mkAlgHom S s)) :
                        f = g
                        theorem RingQuot.preLiftAlgHom_def (S : Type u_1) [CommSemiring S] {A : Type u_2} [Semiring A] [Algebra S A] {B : Type u_3} [Semiring B] [Algebra S B] {s : AAProp} {f : A →ₐ[S] B} (h : ∀ ⦃x y : A⦄, s x yf x = f y) :
                        RingQuot.preLiftAlgHom S h = { toRingHom := { toMonoidHom := { toOneHom := { toFun := fun (x : RingQuot s) => Quot.lift f x.toQuot, map_one' := }, map_mul' := }, map_zero' := , map_add' := }, commutes' := }
                        @[irreducible]
                        def RingQuot.preLiftAlgHom (S : Type u_1) [CommSemiring S] {A : Type u_2} [Semiring A] [Algebra S A] {B : Type u_3} [Semiring B] [Algebra S B] {s : AAProp} {f : A →ₐ[S] B} (h : ∀ ⦃x y : A⦄, s x yf x = f y) :
                        Equations
                        Instances For
                          theorem RingQuot.liftAlgHom_def (S : Type u_1) [CommSemiring S] {A : Type u_2} [Semiring A] [Algebra S A] {B : Type u_3} [Semiring B] [Algebra S B] {s : AAProp} :
                          RingQuot.liftAlgHom S = { toFun := fun (f' : { f : A →ₐ[S] B // ∀ ⦃x y : A⦄, s x yf x = f y }) => RingQuot.preLiftAlgHom S , invFun := fun (F : RingQuot s →ₐ[S] B) => { val := AlgHom.comp F (RingQuot.mkAlgHom S s), property := }, left_inv := , right_inv := }
                          @[irreducible]
                          def RingQuot.liftAlgHom (S : Type u_1) [CommSemiring S] {A : Type u_2} [Semiring A] [Algebra S A] {B : Type u_3} [Semiring B] [Algebra S B] {s : AAProp} :
                          { f : A →ₐ[S] B // ∀ ⦃x y : A⦄, s x yf x = f y } (RingQuot s →ₐ[S] B)

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

                          Equations
                          Instances For
                            @[simp]
                            theorem RingQuot.liftAlgHom_mkAlgHom_apply (S : Type uS) [CommSemiring S] {A : Type uA} [Semiring A] [Algebra S A] {B : Type u₄} [Semiring B] [Algebra S B] (f : A →ₐ[S] B) {s : AAProp} (w : ∀ ⦃x y : A⦄, s x yf x = f y) (x : A) :
                            ((RingQuot.liftAlgHom S) { val := f, property := w }) ((RingQuot.mkAlgHom S s) x) = f x
                            theorem RingQuot.liftAlgHom_unique (S : Type uS) [CommSemiring S] {A : Type uA} [Semiring A] [Algebra S A] {B : Type u₄} [Semiring B] [Algebra S B] (f : A →ₐ[S] B) {s : AAProp} (w : ∀ ⦃x y : A⦄, s x yf x = f y) (g : RingQuot s →ₐ[S] B) (h : AlgHom.comp g (RingQuot.mkAlgHom S s) = f) :
                            g = (RingQuot.liftAlgHom S) { val := f, property := w }
                            theorem RingQuot.eq_liftAlgHom_comp_mkAlgHom (S : Type uS) [CommSemiring S] {A : Type uA} [Semiring A] [Algebra S A] {B : Type u₄} [Semiring B] [Algebra S B] {s : AAProp} (f : RingQuot s →ₐ[S] B) :
                            f = (RingQuot.liftAlgHom S) { val := AlgHom.comp f (RingQuot.mkAlgHom S s), property := }