Documentation

Mathlib.Algebra.RingQuot

Quotients of semirings #

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 RingQuot.Rel {R : Type uR} [Semiring R] (r : R → R → Prop) :
R → R → Prop

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 : R → R → Prop} ⦃a b c : R⦄ (h : Rel r b c) :
    Rel r (a + b) (a + c)
    theorem RingQuot.Rel.neg {R : Type uR} [Ring R] {r : R → R → Prop} ⦃a b : R⦄ (h : Rel r a b) :
    Rel r (-a) (-b)
    theorem RingQuot.Rel.sub_left {R : Type uR} [Ring R] {r : R → R → Prop} ⦃a b c : R⦄ (h : Rel r a b) :
    Rel r (a - c) (b - c)
    theorem RingQuot.Rel.sub_right {R : Type uR} [Ring R] {r : R → R → Prop} ⦃a b c : R⦄ (h : Rel r b c) :
    Rel r (a - b) (a - c)
    theorem RingQuot.Rel.smul {S : Type uS} [CommSemiring S] {A : Type uA} [Semiring A] [Algebra S A] {r : A → A → Prop} (k : S) ⦃a b : A⦄ (h : Rel r a b) :
    Rel r (k • a) (k • b)
    def RingQuot.ringCon {R : Type uR} [Semiring R] (r : R → R → Prop) :

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

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

      The quotient of a ring by an arbitrary relation.

      Instances For
        def RingQuot.natCast {R : Type uR} [Semiring R] (r : R → R → Prop) (n : ℕ) :

        The natCast function for RingQuot.

        Equations
        Instances For
          @[instance_reducible]
          instance RingQuot.instNatCast {R : Type uR} [Semiring R] (r : R → R → Prop) :
          Equations
          @[instance_reducible]
          instance RingQuot.instZero {R : Type uR} [Semiring R] (r : R → R → Prop) :
          Equations
          @[instance_reducible]
          instance RingQuot.instOne {R : Type uR} [Semiring R] (r : R → R → Prop) :
          Equations
          @[instance_reducible]
          instance RingQuot.instAdd {R : Type uR} [Semiring R] (r : R → R → Prop) :
          Equations
          • One or more equations did not get rendered due to their size.
          @[instance_reducible]
          instance RingQuot.instMul {R : Type uR} [Semiring R] (r : R → R → Prop) :
          Equations
          • One or more equations did not get rendered due to their size.
          @[instance_reducible]
          instance RingQuot.instNatPow {R : Type uR} [Semiring R] (r : R → R → Prop) :
          Equations
          @[instance_reducible]
          instance RingQuot.instNeg {R : Type uR} [Ring R] (r : R → R → Prop) :
          Equations
          @[instance_reducible]
          instance RingQuot.instSub {R : Type uR} [Ring R] (r : R → R → Prop) :
          Equations
          • One or more equations did not get rendered due to their size.
          def RingQuot.smul {R : Type uR} [Semiring R] {S : Type uS} [CommSemiring S] (r : R → R → Prop) [Algebra S R] (n : S) :

          The • function for RingQuot.

          Equations
          Instances For
            @[instance_reducible]
            instance RingQuot.instSMulOfAlgebra {R : Type uR} [Semiring R] {S : Type uS} [CommSemiring S] (r : R → R → Prop) [Algebra S R] :
            Equations
            theorem RingQuot.zero_quot {R : Type uR} [Semiring R] (r : R → R → Prop) :
            { toQuot := Quot.mk (Rel r) 0 } = 0
            theorem RingQuot.one_quot {R : Type uR} [Semiring R] (r : R → R → Prop) :
            { toQuot := Quot.mk (Rel r) 1 } = 1
            theorem RingQuot.add_quot {R : Type uR} [Semiring R] (r : R → R → Prop) {a b : R} :
            { toQuot := Quot.mk (Rel r) a } + { toQuot := Quot.mk (Rel r) b } = { toQuot := Quot.mk (Rel r) (a + b) }
            theorem RingQuot.mul_quot {R : Type uR} [Semiring R] (r : R → R → Prop) {a b : R} :
            { toQuot := Quot.mk (Rel r) a } * { toQuot := Quot.mk (Rel r) b } = { toQuot := Quot.mk (Rel r) (a * b) }
            theorem RingQuot.pow_quot {R : Type uR} [Semiring R] (r : R → R → Prop) {a : R} {n : ℕ} :
            { toQuot := Quot.mk (Rel r) a } ^ n = { toQuot := Quot.mk (Rel r) (a ^ n) }
            theorem RingQuot.neg_quot {R : Type uR} [Ring R] (r : R → R → Prop) {a : R} :
            -{ toQuot := Quot.mk (Rel r) a } = { toQuot := Quot.mk (Rel r) (-a) }
            theorem RingQuot.sub_quot {R : Type uR} [Ring R] (r : R → R → Prop) {a b : R} :
            { toQuot := Quot.mk (Rel r) a } - { toQuot := Quot.mk (Rel r) b } = { toQuot := Quot.mk (Rel r) (a - b) }
            theorem RingQuot.smul_quot {R : Type uR} [Semiring R] {S : Type uS} [CommSemiring S] (r : R → R → Prop) [Algebra S R] {n : S} {a : R} :
            n • { toQuot := Quot.mk (Rel r) a } = { toQuot := Quot.mk (Rel r) (n • a) }
            instance RingQuot.instIsScalarTower {R : Type uR} [Semiring R] {S : Type uS} [CommSemiring S] {T : Type uT} (r : R → R → Prop) [CommSemiring T] [SMul S T] [Algebra S R] [Algebra T R] [IsScalarTower S T R] :
            instance RingQuot.instSMulCommClass {R : Type uR} [Semiring R] {S : Type uS} [CommSemiring S] {T : Type uT} (r : R → R → Prop) [CommSemiring T] [Algebra S R] [Algebra T R] [SMulCommClass S T R] :
            @[instance_reducible]
            instance RingQuot.instAddCommMonoid {R : Type uR} [Semiring R] (r : R → R → Prop) :
            Equations
            • One or more equations did not get rendered due to their size.
            @[instance_reducible]
            instance RingQuot.instMonoidWithZero {R : Type uR} [Semiring R] (r : R → R → Prop) :
            Equations
            • One or more equations did not get rendered due to their size.
            @[instance_reducible]
            instance RingQuot.instSemiring {R : Type uR} [Semiring R] (r : R → R → Prop) :
            Equations
            • One or more equations did not get rendered due to their size.
            def RingQuot.intCast {R : Type uR} [Ring R] (r : R → R → Prop) (z : ℤ) :

            The intCast function for RingQuot.

            Equations
            Instances For
              @[instance_reducible]
              instance RingQuot.instRing {R : Type uR} [Ring R] (r : R → R → Prop) :
              Equations
              • One or more equations did not get rendered due to their size.
              @[instance_reducible]
              instance RingQuot.instCommSemiring {R : Type uR} [CommSemiring R] (r : R → R → Prop) :
              Equations
              @[instance_reducible]
              instance RingQuot.instCommRing {R : Type uR} [CommRing R] (r : R → R → Prop) :
              Equations
              • One or more equations did not get rendered due to their size.
              @[instance_reducible]
              instance RingQuot.instInhabited {R : Type uR} [Semiring R] (r : R → R → Prop) :
              Equations
              @[instance_reducible]
              instance RingQuot.instAlgebra {R : Type uR} [Semiring R] {S : Type uS} [CommSemiring S] [Algebra S R] (r : R → R → Prop) :
              Equations
              • One or more equations did not get rendered due to their size.
              def RingQuot.mkRingHom {R : Type uR} [Semiring R] (r : R → R → Prop) :

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

              Equations
              Instances For
                theorem RingQuot.mkRingHom_rel {R : Type uR} [Semiring R] {r : R → R → Prop} {x y : R} (w : r x y) :
                (mkRingHom r) x = (mkRingHom r) y
                theorem RingQuot.ringQuot_ext {R : Type uR} [Semiring R] {T : Type uT} [NonAssocSemiring T] {r : R → R → Prop} (f g : RingQuot r →+* T) (w : f.comp (mkRingHom r) = g.comp (mkRingHom r)) :
                f = g
                theorem RingQuot.ringQuot_ext_iff {R : Type uR} [Semiring R] {T : Type uT} [NonAssocSemiring T] {r : R → R → Prop} {f g : RingQuot r →+* T} :
                f = g ↔ f.comp (mkRingHom r) = g.comp (mkRingHom r)
                def RingQuot.preLift {R : Type uR} [Semiring R] {T : Type uT} [Semiring T] {r : R → R → Prop} {f : R →+* T} (h : ∀ ⦃x y : R⦄, r x y → f x = f y) :
                Equations
                Instances For
                  def RingQuot.lift {R : Type uR} [Semiring R] {T : Type uT} [Semiring T] {r : R → R → Prop} :
                  { f : R →+* T // ∀ ⦃x y : R⦄, r x y → f 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
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    @[simp]
                    theorem RingQuot.lift_mkRingHom_apply {R : Type uR} [Semiring R] {T : Type uT} [Semiring T] (f : R →+* T) {r : R → R → Prop} (w : ∀ ⦃x y : R⦄, r x y → f x = f y) (x : R) :
                    (lift ⟨f, w⟩) ((mkRingHom r) x) = f x
                    theorem RingQuot.lift_unique {R : Type uR} [Semiring R] {T : Type uT} [Semiring T] (f : R →+* T) {r : R → R → Prop} (w : ∀ ⦃x y : R⦄, r x y → f x = f y) (g : RingQuot r →+* T) (h : g.comp (mkRingHom r) = f) :
                    g = lift ⟨f, w⟩
                    theorem RingQuot.eq_lift_comp_mkRingHom {R : Type uR} [Semiring R] {T : Type uT} [Semiring T] {r : R → R → Prop} (f : RingQuot r →+* T) :
                    f = lift ⟨f.comp (mkRingHom r), ⋯⟩

                    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
                      @[simp]

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

                      Equations
                      Instances For
                        @[simp]

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

                        Equations
                        Instances For
                          def RingQuot.mkAlgHom (S : Type uS) [CommSemiring S] {A : Type uA} [Semiring A] [Algebra S A] (s : A → A → Prop) :

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

                          Equations
                          Instances For
                            @[simp]
                            theorem RingQuot.mkAlgHom_coe (S : Type uS) [CommSemiring S] {A : Type uA} [Semiring A] [Algebra S A] (s : A → A → Prop) :
                            ↑(mkAlgHom S s) = mkRingHom s
                            theorem RingQuot.mkAlgHom_rel (S : Type uS) [CommSemiring S] {A : Type uA} [Semiring A] [Algebra S A] {s : A → A → Prop} {x y : A} (w : s x y) :
                            (mkAlgHom S s) x = (mkAlgHom S s) y
                            theorem RingQuot.mkAlgHom_surjective (S : Type uS) [CommSemiring S] {A : Type uA} [Semiring A] [Algebra S A] (s : A → A → Prop) :
                            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 : A → A → Prop} (f g : RingQuot s →ₐ[S] B) (w : f.comp (mkAlgHom S s) = g.comp (mkAlgHom S s)) :
                            f = g
                            theorem RingQuot.ringQuot_ext'_iff {S : Type uS} [CommSemiring S] {A : Type uA} [Semiring A] [Algebra S A] {B : Type u₄} [Semiring B] [Algebra S B] {s : A → A → Prop} {f g : RingQuot s →ₐ[S] B} :
                            f = g ↔ f.comp (mkAlgHom S s) = g.comp (mkAlgHom S s)
                            def RingQuot.preLiftAlgHom (S : Type uS) [CommSemiring S] {A : Type uA} [Semiring A] [Algebra S A] {B : Type u₄} [Semiring B] [Algebra S B] {s : A → A → Prop} {f : A →ₐ[S] B} (h : ∀ ⦃x y : A⦄, s x y → f x = f y) :
                            Equations
                            Instances For
                              def RingQuot.liftAlgHom (S : Type uS) [CommSemiring S] {A : Type uA} [Semiring A] [Algebra S A] {B : Type u₄} [Semiring B] [Algebra S B] {s : A → A → Prop} :
                              { f : A →ₐ[S] B // ∀ ⦃x y : A⦄, s x y → f 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
                              • One or more equations did not get rendered due to their size.
                              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 : A → A → Prop} (w : ∀ ⦃x y : A⦄, s x y → f x = f y) (x : A) :
                                ((liftAlgHom S) ⟨f, w⟩) ((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 : A → A → Prop} (w : ∀ ⦃x y : A⦄, s x y → f x = f y) (g : RingQuot s →ₐ[S] B) (h : g.comp (mkAlgHom S s) = f) :
                                g = (liftAlgHom S) ⟨f, 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 : A → A → Prop} (f : RingQuot s →ₐ[S] B) :
                                f = (liftAlgHom S) ⟨f.comp (mkAlgHom S s), ⋯⟩
                                def RingQuot.algEquivQuotAlgEquiv {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) (rel : A → A → Prop) :

                                If two S-algebras are S-equivalent and their quotients by a relation rel are defined, then their quotients are also S-equivalent.

                                (Special case of the third isomorphism theorem.)

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  def RingQuot.equivQuotEquiv {A : Type uA} [Semiring A] {B : Type u₄} [Semiring B] (f : A ≃+* B) (rel : A → A → Prop) :

                                  If two (semi)rings are equivalent and their quotients by a relation rel are defined, then their quotients are also equivalent.

                                  (Special case of algEquivQuotAlgEquiv when S = ℕ, which in turn is a special case of the third isomorphism theorem.)

                                  Equations
                                  Instances For