Module docstring
{"# Quotients of polynomial rings "}
{"# Quotients of polynomial rings "}
Polynomial.quotientSpanXSubCAlgEquiv
definition
(x : R) : (R[X] ⧸ Ideal.span ({X - C x} : Set R[X])) ≃ₐ[R] R
/-- For a commutative ring $R$, evaluating a polynomial at an element $x \in R$ induces an
isomorphism of $R$-algebras $R[X] / \langle X - x \rangle \cong R$. -/
noncomputable def quotientSpanXSubCAlgEquiv (x : R) :
(R[X] ⧸ Ideal.span ({X - C x} : Set R[X])) ≃ₐ[R] R :=
(quotientSpanXSubCAlgEquivAux1 x).trans (quotientSpanXSubCAlgEquivAux2 x)
Polynomial.quotientSpanXSubCAlgEquiv_mk
theorem
(x : R) (p : R[X]) : quotientSpanXSubCAlgEquiv x (Ideal.Quotient.mk _ p) = p.eval x
@[simp]
theorem quotientSpanXSubCAlgEquiv_mk (x : R) (p : R[X]) :
quotientSpanXSubCAlgEquiv x (Ideal.Quotient.mk _ p) = p.eval x :=
rfl
Polynomial.quotientSpanXSubCAlgEquiv_symm_apply
theorem
(x : R) (y : R) : (quotientSpanXSubCAlgEquiv x).symm y = algebraMap R _ y
@[simp]
theorem quotientSpanXSubCAlgEquiv_symm_apply (x : R) (y : R) :
(quotientSpanXSubCAlgEquiv x).symm y = algebraMap R _ y :=
rfl
Polynomial.quotientSpanCXSubCAlgEquiv
definition
(x y : R) : (R[X] ⧸ (Ideal.span {C x, X - C y} : Ideal R[X])) ≃ₐ[R] R ⧸ (Ideal.span { x } : Ideal R)
/-- For a commutative ring $R$, evaluating a polynomial at an element $y \in R$ induces an
isomorphism of $R$-algebras $R[X] / \langle x, X - y \rangle \cong R / \langle x \rangle$. -/
noncomputable def quotientSpanCXSubCAlgEquiv (x y : R) :
(R[X] ⧸ (Ideal.span {C x, X - C y} : Ideal R[X])) ≃ₐ[R] R ⧸ (Ideal.span {x} : Ideal R) :=
(Ideal.quotientEquivAlgOfEq R <| by rw [Ideal.span_insert, sup_comm]).trans <|
(DoubleQuot.quotQuotEquivQuotSupₐ R _ _).symm.trans <|
(Ideal.quotientEquivAlg _ _ (quotientSpanXSubCAlgEquiv y) rfl).trans <|
Ideal.quotientEquivAlgOfEq R <| by
simp only [Ideal.map_span, Set.image_singleton]; congr 2; exact eval_C
Polynomial.quotientSpanCXSubCXSubCAlgEquiv
definition
{x : R} {y : R[X]} :
@AlgEquiv R (R[X][X] ⧸ (Ideal.span {C (X - C x), X - C y} : Ideal <| R[X][X])) R _ _ _ (Ideal.Quotient.algebra R) _
/-- For a commutative ring $R$, evaluating a polynomial at elements $y(X) \in R[X]$ and $x \in R$
induces an isomorphism of $R$-algebras $R[X, Y] / \langle X - x, Y - y(X) \rangle \cong R$. -/
noncomputable def quotientSpanCXSubCXSubCAlgEquiv {x : R} {y : R[X]} :
@AlgEquiv R (R[X]R[X][X]R[X][X] ⧸ (Ideal.span {C (X - C x), X - C y} : Ideal <| R[X][X])) R _ _ _
(Ideal.Quotient.algebra R) _ :=
((quotientSpanCXSubCAlgEquiv (X - C x) y).restrictScalars R).trans <| quotientSpanXSubCAlgEquiv x
Polynomial.modByMonic_eq_zero_iff_quotient_eq_zero
theorem
(p q : R[X]) (hq : q.Monic) : p %ₘ q = 0 ↔ (p : R[X] ⧸ Ideal.span { q }) = 0
lemma modByMonic_eq_zero_iff_quotient_eq_zero (p q : R[X]) (hq : q.Monic) :
p %ₘ qp %ₘ q = 0 ↔ (p : R[X] ⧸ Ideal.span {q}) = 0 := by
rw [modByMonic_eq_zero_iff_dvd hq, Ideal.Quotient.eq_zero_iff_dvd]
Ideal.quotient_map_C_eq_zero
theorem
{I : Ideal R} : ∀ a ∈ I, ((Quotient.mk (map (C : R →+* R[X]) I : Ideal R[X])).comp C) a = 0
theorem quotient_map_C_eq_zero {I : Ideal R} :
∀ a ∈ I, ((Quotient.mk (map (C : R →+* R[X]) I : Ideal R[X])).comp C) a = 0 := by
intro a ha
rw [RingHom.comp_apply, Quotient.eq_zero_iff_mem]
exact mem_map_of_mem _ ha
Ideal.eval₂_C_mk_eq_zero
theorem
{I : Ideal R} : ∀ f ∈ (map (C : R →+* R[X]) I : Ideal R[X]), eval₂RingHom (C.comp (Quotient.mk I)) X f = 0
theorem eval₂_C_mk_eq_zero {I : Ideal R} :
∀ f ∈ (map (C : R →+* R[X]) I : Ideal R[X]), eval₂RingHom (C.comp (Quotient.mk I)) X f = 0 := by
intro a ha
rw [← sum_monomial_eq a]
dsimp
rw [eval₂_sum]
refine Finset.sum_eq_zero fun n _ => ?_
dsimp
rw [eval₂_monomial (C.comp (Quotient.mk I)) X]
refine mul_eq_zero_of_left (Polynomial.ext fun m => ?_) (X ^ n)
rw [RingHom.comp_apply, coeff_C]
by_cases h : m = 0
· simpa [h] using Quotient.eq_zero_iff_mem.2 ((mem_map_C_iff.1 ha) n)
· simp [h]
Ideal.polynomialQuotientEquivQuotientPolynomial
definition
(I : Ideal R) : (R ⧸ I)[X] ≃+* R[X] ⧸ (map C I : Ideal R[X])
/-- If `I` is an ideal of `R`, then the ring polynomials over the quotient ring `I.quotient` is
isomorphic to the quotient of `R[X]` by the ideal `map C I`,
where `map C I` contains exactly the polynomials whose coefficients all lie in `I`. -/
def polynomialQuotientEquivQuotientPolynomial (I : Ideal R) :
(R ⧸ I)[X](R ⧸ I)[X] ≃+* R[X] ⧸ (map C I : Ideal R[X]) where
toFun :=
eval₂RingHom
(Quotient.lift I ((Quotient.mk (map C I : Ideal R[X])).comp C) quotient_map_C_eq_zero)
(Quotient.mk (map C I : Ideal R[X]) X)
invFun :=
Quotient.lift (map C I : Ideal R[X]) (eval₂RingHom (C.comp (Quotient.mk I)) X)
eval₂_C_mk_eq_zero
map_mul' f g := by simp only [coe_eval₂RingHom, eval₂_mul]
map_add' f g := by simp only [eval₂_add, coe_eval₂RingHom]
left_inv := by
intro f
refine Polynomial.induction_on' f ?_ ?_
· intro p q hp hq
simp only [coe_eval₂RingHom] at hp hq
simp only [coe_eval₂RingHom, hp, hq, RingHom.map_add]
· rintro n ⟨x⟩
simp only [← smul_X_eq_monomial, C_mul', Quotient.lift_mk, Submodule.Quotient.quot_mk_eq_mk,
Quotient.mk_eq_mk, eval₂_X_pow, eval₂_smul, coe_eval₂RingHom, RingHom.map_pow, eval₂_C,
RingHom.coe_comp, RingHom.map_mul, eval₂_X, Function.comp_apply]
right_inv := by
rintro ⟨f⟩
refine Polynomial.induction_on' f ?_ ?_
· -- Porting note: was `simp_intro p q hp hq`
intros p q hp hq
simp only [Submodule.Quotient.quot_mk_eq_mk, Quotient.mk_eq_mk, map_add, Quotient.lift_mk,
coe_eval₂RingHom] at hp hq ⊢
rw [hp, hq]
· intro n a
simp only [← smul_X_eq_monomial, ← C_mul' a (X ^ n), Quotient.lift_mk,
Submodule.Quotient.quot_mk_eq_mk, Quotient.mk_eq_mk, eval₂_X_pow, eval₂_smul,
coe_eval₂RingHom, RingHom.map_pow, eval₂_C, RingHom.coe_comp, RingHom.map_mul, eval₂_X,
Function.comp_apply]
Ideal.polynomialQuotientEquivQuotientPolynomial_symm_mk
theorem
(I : Ideal R) (f : R[X]) : I.polynomialQuotientEquivQuotientPolynomial.symm (Quotient.mk _ f) = f.map (Quotient.mk I)
@[simp]
theorem polynomialQuotientEquivQuotientPolynomial_symm_mk (I : Ideal R) (f : R[X]) :
I.polynomialQuotientEquivQuotientPolynomial.symm (Quotient.mk _ f) = f.map (Quotient.mk I) := by
rw [polynomialQuotientEquivQuotientPolynomial, RingEquiv.symm_mk, RingEquiv.coe_mk,
Equiv.coe_fn_mk, Quotient.lift_mk, coe_eval₂RingHom, eval₂_eq_eval_map, ← Polynomial.map_map,
← eval₂_eq_eval_map, Polynomial.eval₂_C_X]
Ideal.polynomialQuotientEquivQuotientPolynomial_map_mk
theorem
(I : Ideal R) (f : R[X]) :
I.polynomialQuotientEquivQuotientPolynomial (f.map <| Quotient.mk I) = Quotient.mk (map C I : Ideal R[X]) f
@[simp]
theorem polynomialQuotientEquivQuotientPolynomial_map_mk (I : Ideal R) (f : R[X]) :
I.polynomialQuotientEquivQuotientPolynomial (f.map <| Quotient.mk I) =
Quotient.mk (map C I : Ideal R[X]) f := by
apply (polynomialQuotientEquivQuotientPolynomial I).symm.injective
rw [RingEquiv.symm_apply_apply, polynomialQuotientEquivQuotientPolynomial_symm_mk]
Ideal.isDomain_map_C_quotient
theorem
{P : Ideal R} (_ : IsPrime P) : IsDomain (R[X] ⧸ (map (C : R →+* R[X]) P : Ideal R[X]))
/-- If `P` is a prime ideal of `R`, then `R[x]/(P)` is an integral domain. -/
theorem isDomain_map_C_quotient {P : Ideal R} (_ : IsPrime P) :
IsDomain (R[X]R[X] ⧸ (map (C : R →+* R[X]) P : Ideal R[X])) :=
MulEquiv.isDomain (Polynomial (R ⧸ P)) (polynomialQuotientEquivQuotientPolynomial P).symm
MvPolynomial.quotient_map_C_eq_zero
theorem
{I : Ideal R} {i : R} (hi : i ∈ I) :
(Ideal.Quotient.mk (Ideal.map (C : R →+* MvPolynomial σ R) I : Ideal (MvPolynomial σ R))).comp C i = 0
theorem quotient_map_C_eq_zero {I : Ideal R} {i : R} (hi : i ∈ I) :
(Ideal.Quotient.mk (Ideal.map (C : R →+* MvPolynomial σ R) I :
Ideal (MvPolynomial σ R))).comp C i = 0 := by
simp only [Function.comp_apply, RingHom.coe_comp, Ideal.Quotient.eq_zero_iff_mem]
exact Ideal.mem_map_of_mem _ hi
MvPolynomial.eval₂_C_mk_eq_zero
theorem
{I : Ideal R} {a : MvPolynomial σ R} (ha : a ∈ (Ideal.map (C : R →+* MvPolynomial σ R) I : Ideal (MvPolynomial σ R))) :
eval₂Hom (C.comp (Ideal.Quotient.mk I)) X a = 0
theorem eval₂_C_mk_eq_zero {I : Ideal R} {a : MvPolynomial σ R}
(ha : a ∈ (Ideal.map (C : R →+* MvPolynomial σ R) I : Ideal (MvPolynomial σ R))) :
eval₂Hom (C.comp (Ideal.Quotient.mk I)) X a = 0 := by
rw [as_sum a]
rw [coe_eval₂Hom, eval₂_sum]
refine Finset.sum_eq_zero fun n _ => ?_
simp only [eval₂_monomial, Function.comp_apply, RingHom.coe_comp]
refine mul_eq_zero_of_left ?_ _
suffices coeffcoeff n a ∈ I by
rw [← @Ideal.mk_ker R _ I, RingHom.mem_ker] at this
simp only [this, C_0]
exact mem_map_C_iff.1 ha n
MvPolynomial.quotientEquivQuotientMvPolynomial_rightInverse
theorem
(I : Ideal R) :
Function.RightInverse
(eval₂
(Ideal.Quotient.lift I ((Ideal.Quotient.mk (Ideal.map C I : Ideal (MvPolynomial σ R))).comp C) fun _ hi =>
quotient_map_C_eq_zero hi)
fun i => Ideal.Quotient.mk (Ideal.map C I : Ideal (MvPolynomial σ R)) (X i))
(Ideal.Quotient.lift (Ideal.map C I : Ideal (MvPolynomial σ R)) (eval₂Hom (C.comp (Ideal.Quotient.mk I)) X)
fun _ ha => eval₂_C_mk_eq_zero ha)
lemma quotientEquivQuotientMvPolynomial_rightInverse (I : Ideal R) :
Function.RightInverse
(eval₂ (Ideal.Quotient.lift I
((Ideal.Quotient.mk (Ideal.map C I : Ideal (MvPolynomial σ R))).comp C)
fun _ hi => quotient_map_C_eq_zero hi)
fun i => Ideal.Quotient.mk (Ideal.map C I : Ideal (MvPolynomial σ R)) (X i))
(Ideal.Quotient.lift (Ideal.map C I : Ideal (MvPolynomial σ R))
(eval₂Hom (C.comp (Ideal.Quotient.mk I)) X) fun _ ha => eval₂_C_mk_eq_zero ha) := by
intro f
apply induction_on f
· intro r
obtain ⟨r, rfl⟩ := Ideal.Quotient.mk_surjective r
rw [eval₂_C, Ideal.Quotient.lift_mk, RingHom.comp_apply, Ideal.Quotient.lift_mk, eval₂Hom_C,
RingHom.comp_apply]
· intros p q hp hq
simp only [RingHom.map_add, MvPolynomial.coe_eval₂Hom, coe_eval₂Hom, MvPolynomial.eval₂_add]
at hp hq ⊢
rw [hp, hq]
· intros p i hp
simp only [coe_eval₂Hom] at hp
simp only [hp, coe_eval₂Hom, Ideal.Quotient.lift_mk, eval₂_mul, RingHom.map_mul, eval₂_X]
MvPolynomial.quotientEquivQuotientMvPolynomial_leftInverse
theorem
(I : Ideal R) :
Function.LeftInverse
(eval₂
(Ideal.Quotient.lift I ((Ideal.Quotient.mk (Ideal.map C I : Ideal (MvPolynomial σ R))).comp C) fun _ hi =>
quotient_map_C_eq_zero hi)
fun i => Ideal.Quotient.mk (Ideal.map C I : Ideal (MvPolynomial σ R)) (X i))
(Ideal.Quotient.lift (Ideal.map C I : Ideal (MvPolynomial σ R)) (eval₂Hom (C.comp (Ideal.Quotient.mk I)) X)
fun _ ha => eval₂_C_mk_eq_zero ha)
lemma quotientEquivQuotientMvPolynomial_leftInverse (I : Ideal R) :
Function.LeftInverse
(eval₂ (Ideal.Quotient.lift I
((Ideal.Quotient.mk (Ideal.map C I : Ideal (MvPolynomial σ R))).comp C)
fun _ hi => quotient_map_C_eq_zero hi)
fun i => Ideal.Quotient.mk (Ideal.map C I : Ideal (MvPolynomial σ R)) (X i))
(Ideal.Quotient.lift (Ideal.map C I : Ideal (MvPolynomial σ R))
(eval₂Hom (C.comp (Ideal.Quotient.mk I)) X) fun _ ha => eval₂_C_mk_eq_zero ha) := by
intro f
obtain ⟨f, rfl⟩ := Ideal.Quotient.mk_surjective f
apply induction_on f
· intro r
rw [Ideal.Quotient.lift_mk, eval₂Hom_C, RingHom.comp_apply, eval₂_C, Ideal.Quotient.lift_mk,
RingHom.comp_apply]
· intros p q hp hq
rw [Ideal.Quotient.lift_mk] at hp hq ⊢
simp only [Submodule.Quotient.quot_mk_eq_mk, eval₂_add, RingHom.map_add, coe_eval₂Hom,
Ideal.Quotient.lift_mk, Ideal.Quotient.mk_eq_mk] at hp hq ⊢
rw [hp, hq]
· intros p i hp
simp only [Submodule.Quotient.quot_mk_eq_mk, coe_eval₂Hom, Ideal.Quotient.lift_mk,
Ideal.Quotient.mk_eq_mk, eval₂_mul, RingHom.map_mul, eval₂_X] at hp ⊢
simp only [hp]
MvPolynomial.quotientEquivQuotientMvPolynomial
definition
(I : Ideal R) : MvPolynomial σ (R ⧸ I) ≃ₐ[R] MvPolynomial σ R ⧸ (Ideal.map C I : Ideal (MvPolynomial σ R))
/-- If `I` is an ideal of `R`, then the ring `MvPolynomial σ I.quotient` is isomorphic as an
`R`-algebra to the quotient of `MvPolynomial σ R` by the ideal generated by `I`. -/
noncomputable def quotientEquivQuotientMvPolynomial (I : Ideal R) :
MvPolynomialMvPolynomial σ (R ⧸ I) ≃ₐ[R] MvPolynomial σ R ⧸ (Ideal.map C I : Ideal (MvPolynomial σ R)) :=
let e : MvPolynomialMvPolynomial σ (R ⧸ I) →ₐ[R]
MvPolynomial σ R ⧸ (Ideal.map C I : Ideal (MvPolynomial σ R)) :=
{ eval₂Hom
(Ideal.Quotient.lift I ((Ideal.Quotient.mk (Ideal.map C I : Ideal (MvPolynomial σ R))).comp C)
fun _ hi => quotient_map_C_eq_zero hi)
fun i => Ideal.Quotient.mk (Ideal.map C I : Ideal (MvPolynomial σ R)) (X i) with
commutes' := fun r => eval₂Hom_C _ _ (Ideal.Quotient.mk I r) }
{ e with
invFun := Ideal.Quotient.lift (Ideal.map C I : Ideal (MvPolynomial σ R))
(eval₂Hom (C.comp (Ideal.Quotient.mk I)) X) fun _ ha => eval₂_C_mk_eq_zero ha
left_inv := quotientEquivQuotientMvPolynomial_rightInverse I
right_inv := quotientEquivQuotientMvPolynomial_leftInverse I }