fact
stringlengths
6
3.84k
type
stringclasses
11 values
library
stringclasses
32 values
imports
listlengths
1
14
filename
stringlengths
20
95
symbolic_name
stringlengths
1
90
docstring
stringlengths
7
20k
nonempty_oreSet_iff_of_noZeroDivisors {R : Type*} [Ring R] [NoZeroDivisors R] {S : Submonoid R} : Nonempty (OreSet S) ↔ ∀ (r : R) (s : S), ∃ (r' : R) (s' : S), s' * r = r' * s := by constructor · exact fun ⟨_⟩ ↦ fun r s ↦ ⟨oreNum r s, oreDenom r s, ore_eq r s⟩ · intro H choose r' s' h using H exact ⟨oreSetOfNoZeroDivisors r' s' h⟩
lemma
RingTheory
[ "Mathlib.Algebra.Group.Submonoid.Defs", "Mathlib.Algebra.GroupWithZero.Basic", "Mathlib.Algebra.Ring.Regular", "Mathlib.GroupTheory.OreLocalization.OreSet" ]
Mathlib/RingTheory/OreLocalization/OreSet.lean
nonempty_oreSet_iff_of_noZeroDivisors
null
protected zero_smul (x : X[S⁻¹]) : (0 : R[S⁻¹]) • x = 0 := by induction x with | _ r s rw [OreLocalization.zero_def, oreDiv_smul_char 0 r 1 s 0 1 (by simp)]; simp
theorem
RingTheory
[ "Mathlib.Algebra.Algebra.Defs", "Mathlib.Algebra.Field.Defs", "Mathlib.RingTheory.OreLocalization.NonZeroDivisors" ]
Mathlib/RingTheory/OreLocalization/Ring.lean
zero_smul
null
protected add_smul (y z : R[S⁻¹]) (x : X[S⁻¹]) : (y + z) • x = y • x + z • x := by induction x with | _ r₁ s₁ induction y with | _ r₂ s₂ induction z with | _ r₃ s₃ rcases oreDivAddChar' r₂ r₃ s₂ s₃ with ⟨ra, sa, ha, q⟩ rw [q] clear q rw [OreLocalization.expand' r₂ s₂ sa] rcases oreDivSMulChar' (sa • r₂) r₁ (sa * s₂) s₁ with ⟨rb, sb, hb, q⟩ rw [q] clear q have hs₃rasb : sb * ra * s₃ ∈ S := by rw [mul_assoc, ← ha] norm_cast apply SetLike.coe_mem rw [OreLocalization.expand _ _ _ hs₃rasb] have ha' : ↑((sb * sa) * s₂) = sb * ra * s₃ := by simp [ha, mul_assoc] rw [← Subtype.coe_eq_of_eq_mk ha'] rcases oreDivSMulChar' ((sb * ra) • r₃) r₁ (sb * sa * s₂) s₁ with ⟨rc, sc, hc, hc'⟩ rw [hc'] rw [oreDiv_add_char _ _ 1 sc (by simp [mul_assoc])] rw [OreLocalization.expand' (sa • r₂ + ra • r₃) (sa * s₂) (sc * sb)] simp only [smul_eq_mul, one_smul, Submonoid.smul_def, mul_add, Submonoid.coe_mul] at hb hc ⊢ rw [mul_assoc, hb, mul_assoc, ← mul_assoc _ ra, hc, ← mul_assoc, ← add_mul] rw [OreLocalization.smul_cancel'] simp only [add_smul, ← mul_assoc, smul_smul]
theorem
RingTheory
[ "Mathlib.Algebra.Algebra.Defs", "Mathlib.Algebra.Field.Defs", "Mathlib.RingTheory.OreLocalization.NonZeroDivisors" ]
Mathlib/RingTheory/OreLocalization/Ring.lean
add_smul
null
@[deprecated zero_mul (since := "2025-08-20")] protected zero_mul (x : R[S⁻¹]) : 0 * x = 0 := OreLocalization.zero_smul x @[deprecated mul_zero (since := "2025-08-20")]
theorem
RingTheory
[ "Mathlib.Algebra.Algebra.Defs", "Mathlib.Algebra.Field.Defs", "Mathlib.RingTheory.OreLocalization.NonZeroDivisors" ]
Mathlib/RingTheory/OreLocalization/Ring.lean
zero_mul
null
protected mul_zero (x : R[S⁻¹]) : x * 0 = 0 := OreLocalization.smul_zero x
theorem
RingTheory
[ "Mathlib.Algebra.Algebra.Defs", "Mathlib.Algebra.Field.Defs", "Mathlib.RingTheory.OreLocalization.NonZeroDivisors" ]
Mathlib/RingTheory/OreLocalization/Ring.lean
mul_zero
null
protected left_distrib (x y z : R[S⁻¹]) : x * (y + z) = x * y + x * z := OreLocalization.smul_add _ _ _
theorem
RingTheory
[ "Mathlib.Algebra.Algebra.Defs", "Mathlib.Algebra.Field.Defs", "Mathlib.RingTheory.OreLocalization.NonZeroDivisors" ]
Mathlib/RingTheory/OreLocalization/Ring.lean
left_distrib
null
right_distrib (x y z : R[S⁻¹]) : (x + y) * z = x * z + y * z := OreLocalization.add_smul _ _ _
theorem
RingTheory
[ "Mathlib.Algebra.Algebra.Defs", "Mathlib.Algebra.Field.Defs", "Mathlib.RingTheory.OreLocalization.NonZeroDivisors" ]
Mathlib/RingTheory/OreLocalization/Ring.lean
right_distrib
null
@[simp] nsmul_eq_nsmul (n : ℕ) (x : X[S⁻¹]) : letI inst := OreLocalization.instModuleOfIsScalarTower (R₀ := ℕ) (R := R) (X := X) (S := S) HSMul.hSMul (self := @instHSMul _ _ inst.toSMul) n x = n • x := by letI inst := OreLocalization.instModuleOfIsScalarTower (R₀ := ℕ) (R := R) (X := X) (S := S) exact congr($(AddCommMonoid.uniqueNatModule.2 inst).smul n x)
lemma
RingTheory
[ "Mathlib.Algebra.Algebra.Defs", "Mathlib.Algebra.Field.Defs", "Mathlib.RingTheory.OreLocalization.NonZeroDivisors" ]
Mathlib/RingTheory/OreLocalization/Ring.lean
nsmul_eq_nsmul
null
@[simps!] numeratorRingHom : R →+* R[S⁻¹] where __ := numeratorHom map_zero' := by with_unfolding_all exact OreLocalization.zero_def map_add' _ _ := add_oreDiv.symm
def
RingTheory
[ "Mathlib.Algebra.Algebra.Defs", "Mathlib.Algebra.Field.Defs", "Mathlib.RingTheory.OreLocalization.NonZeroDivisors" ]
Mathlib/RingTheory/OreLocalization/Ring.lean
numeratorRingHom
The ring homomorphism from `R` to `R[S⁻¹]`, mapping `r : R` to the fraction `r /ₒ 1`.
universalHom : R[S⁻¹] →+* T := { universalMulHom f.toMonoidHom fS hf with map_zero' := by simp only [RingHom.toMonoidHom_eq_coe, OneHom.toFun_eq_coe, MonoidHom.toOneHom_coe] rw [OreLocalization.zero_def, universalMulHom_apply] simp map_add' := fun x y => by simp only [RingHom.toMonoidHom_eq_coe, OneHom.toFun_eq_coe, MonoidHom.toOneHom_coe] induction x with | _ r₁ s₁ induction y with | _ r₂ s₂ rcases oreDivAddChar' r₁ r₂ s₁ s₂ with ⟨r₃, s₃, h₃, h₃'⟩ rw [h₃'] clear h₃' simp only [smul_eq_mul, universalMulHom_apply, MonoidHom.coe_coe, Submonoid.smul_def] simp only [mul_inv_rev, MonoidHom.map_mul, RingHom.map_add, RingHom.map_mul, Units.val_mul] rw [mul_add, mul_assoc, ← mul_assoc _ (f s₃), hf, ← Units.val_mul] simp only [one_mul, inv_mul_cancel, Units.val_one] congr 1 rw [← mul_assoc] congr 1 norm_cast at h₃ have h₃' := Subtype.coe_eq_of_eq_mk h₃ rw [← Units.val_mul, ← mul_inv_rev, ← fS.map_mul, h₃'] rw [Units.inv_mul_eq_iff_eq_mul, Units.eq_mul_inv_iff_mul_eq, ← hf, ← hf] simp only [map_mul] }
def
RingTheory
[ "Mathlib.Algebra.Algebra.Defs", "Mathlib.Algebra.Field.Defs", "Mathlib.RingTheory.OreLocalization.NonZeroDivisors" ]
Mathlib/RingTheory/OreLocalization/Ring.lean
universalHom
The universal lift from a ring homomorphism `f : R →+* T`, which maps elements in `S` to units of `T`, to a ring homomorphism `R[S⁻¹] →+* T`. This extends the construction on monoids.
universalHom_apply {r : R} {s : S} : universalHom f fS hf (r /ₒ s) = ((fS s)⁻¹ : Units T) * f r := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Algebra.Defs", "Mathlib.Algebra.Field.Defs", "Mathlib.RingTheory.OreLocalization.NonZeroDivisors" ]
Mathlib/RingTheory/OreLocalization/Ring.lean
universalHom_apply
null
universalHom_commutes {r : R} : universalHom f fS hf (numeratorHom r) = f r := by simp [numeratorHom_apply, universalHom_apply]
theorem
RingTheory
[ "Mathlib.Algebra.Algebra.Defs", "Mathlib.Algebra.Field.Defs", "Mathlib.RingTheory.OreLocalization.NonZeroDivisors" ]
Mathlib/RingTheory/OreLocalization/Ring.lean
universalHom_commutes
null
universalHom_unique (φ : R[S⁻¹] →+* T) (huniv : ∀ r : R, φ (numeratorHom r) = f r) : φ = universalHom f fS hf := RingHom.coe_monoidHom_injective <| universalMulHom_unique (RingHom.toMonoidHom f) fS hf (↑φ) huniv
theorem
RingTheory
[ "Mathlib.Algebra.Algebra.Defs", "Mathlib.Algebra.Field.Defs", "Mathlib.RingTheory.OreLocalization.NonZeroDivisors" ]
Mathlib/RingTheory/OreLocalization/Ring.lean
universalHom_unique
null
@[simp] zsmul_eq_zsmul (n : ℤ) (x : X[S⁻¹]) : letI inst := OreLocalization.instModuleOfIsScalarTower (R₀ := ℤ) (R := R) (X := X) (S := S) HSMul.hSMul (self := @instHSMul _ _ inst.toSMul) n x = n • x := by letI inst := OreLocalization.instModuleOfIsScalarTower (R₀ := ℤ) (R := R) (X := X) (S := S) exact congr($(AddCommGroup.uniqueIntModule.2 inst).smul n x) open nonZeroDivisors
lemma
RingTheory
[ "Mathlib.Algebra.Algebra.Defs", "Mathlib.Algebra.Field.Defs", "Mathlib.RingTheory.OreLocalization.NonZeroDivisors" ]
Mathlib/RingTheory/OreLocalization/Ring.lean
zsmul_eq_zsmul
null
numeratorHom_inj (hS : S ≤ nonZeroDivisorsLeft R) : Function.Injective (numeratorHom : R → R[S⁻¹]) := fun r₁ r₂ h => by rw [numeratorHom_apply, numeratorHom_apply, oreDiv_eq_iff] at h rcases h with ⟨u, v, h₁, h₂⟩ simp only [S.coe_one, mul_one, Submonoid.smul_def, smul_eq_mul] at h₁ h₂ rw [← h₂, ← sub_eq_zero, ← mul_sub] at h₁ exact (sub_eq_zero.mp (hS u.2 _ h₁)).symm
theorem
RingTheory
[ "Mathlib.Algebra.Algebra.Defs", "Mathlib.Algebra.Field.Defs", "Mathlib.RingTheory.OreLocalization.NonZeroDivisors" ]
Mathlib/RingTheory/OreLocalization/Ring.lean
numeratorHom_inj
null
untiltAux (x : PreTilt O p) (n : ℕ) : O := match n with | 0 => 1 | n + 1 => (Quotient.out (coeff (ModP O p) _ n x)) ^ (p ^ n)
def
RingTheory
[ "Mathlib.NumberTheory.Basic", "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.Perfection" ]
Mathlib/RingTheory/Perfectoid/Untilt.lean
untiltAux
The auxiliary sequence to define the untilt map. The `(n + 1)`-th term is the `p^n`-th powers of arbitrary lifts in `O` of the `n`-th component from the perfection of `O/p`.
pow_dvd_untiltAux_sub_untiltAux (x : PreTilt O p) {m n : ℕ} (h : m ≤ n) : (p : O) ^ m ∣ x.untiltAux m - x.untiltAux n := by cases m with | zero => simp [untiltAux] | succ m => let n' := n.pred have : n = n' + 1 := by simp [n', Nat.sub_add_cancel (n := n) (m := 1) (by linarith)] simp only [this, add_le_add_iff_right, untiltAux] at h ⊢ rw [← Nat.sub_add_cancel h, pow_add _ _ m, pow_mul] refine (dvd_sub_pow_of_dvd_sub ?_ m) rw [← mem_span_singleton, ← Ideal.Quotient.eq] simp only [Ideal.Quotient.mk_out, map_pow, Nat.sub_add_cancel h] calc _ = (coeff (ModP O p) p (n' - (n' - m))) x := by simp [Nat.sub_sub_self h] _ = (coeff (ModP O p) p n') (((frobenius (Ring.Perfection (ModP O p) p) p))^[n' - m] x) := (coeff_iterate_frobenius' x n' (n' - m) (Nat.sub_le n' m)).symm _ = _ := by simp [iterate_frobenius]
lemma
RingTheory
[ "Mathlib.NumberTheory.Basic", "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.Perfection" ]
Mathlib/RingTheory/Perfectoid/Untilt.lean
pow_dvd_untiltAux_sub_untiltAux
null
pow_dvd_one_untiltAux_sub_one (m : ℕ) : (p : O) ^ m ∣ (1 : PreTilt O p).untiltAux m - 1 := by cases m with | zero => simp [untiltAux] | succ m => simp only [untiltAux] nth_rw 3 [← one_pow (p ^ m)] refine dvd_sub_pow_of_dvd_sub (R := O) ?_ m rw [← mem_span_singleton, ← Ideal.Quotient.eq] simp
lemma
RingTheory
[ "Mathlib.NumberTheory.Basic", "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.Perfection" ]
Mathlib/RingTheory/Perfectoid/Untilt.lean
pow_dvd_one_untiltAux_sub_one
null
pow_dvd_mul_untiltAux_sub_untiltAux_mul (x y : PreTilt O p) (m : ℕ) : (p : O) ^ m ∣ (x * y).untiltAux m - (x.untiltAux m) * (y.untiltAux m) := by cases m with | zero => simp [untiltAux] | succ m => simp only [untiltAux, map_mul, ← mul_pow] refine dvd_sub_pow_of_dvd_sub ?_ m rw [← mem_span_singleton, ← Ideal.Quotient.eq] simp
lemma
RingTheory
[ "Mathlib.NumberTheory.Basic", "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.Perfection" ]
Mathlib/RingTheory/Perfectoid/Untilt.lean
pow_dvd_mul_untiltAux_sub_untiltAux_mul
null
exists_smodEq_untiltAux (x : PreTilt O p) : ∃ y, ∀ (n : ℕ), x.untiltAux n ≡ y [SMOD Ideal.span {(p : O)} ^ n • (⊤ : Ideal O)] := by refine IsPrecomplete.prec' x.untiltAux (fun {m n} h ↦ ?_) simpa only [span_singleton_pow, smul_eq_mul, mul_top, SModEq.sub_mem, mem_span_singleton] using x.pow_dvd_untiltAux_sub_untiltAux h
lemma
RingTheory
[ "Mathlib.NumberTheory.Basic", "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.Perfection" ]
Mathlib/RingTheory/Perfectoid/Untilt.lean
exists_smodEq_untiltAux
null
untiltFun (x : PreTilt O p) : O := Classical.choose <| x.exists_smodEq_untiltAux
def
RingTheory
[ "Mathlib.NumberTheory.Basic", "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.Perfection" ]
Mathlib/RingTheory/Perfectoid/Untilt.lean
untiltFun
Given a `p`-adically complete ring `O`, this is the underlying function of the untilt map. It is defined as the limit of `p^n`-th powers of arbitrary lifts in `O` of the `n`-th component from the perfection of `O/p`.
untiltAux_smodEq_untiltFun (x : PreTilt O p) (n : ℕ) : x.untiltAux n ≡ x.untiltFun [SMOD (span {(p : O)}) ^ n] := by simpa [untiltFun] using Classical.choose_spec x.exists_smodEq_untiltAux n
lemma
RingTheory
[ "Mathlib.NumberTheory.Basic", "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.Perfection" ]
Mathlib/RingTheory/Perfectoid/Untilt.lean
untiltAux_smodEq_untiltFun
null
untilt : PreTilt O p →* O where toFun := untiltFun map_one' := by rw [← sub_eq_zero, IsHausdorff.eq_iff_smodEq (I := (span {(p : O)}))] intro n rw [sub_smodEq_zero] simp only [smul_eq_mul, mul_top] apply (untiltAux_smodEq_untiltFun (1 : PreTilt O p) n).symm.trans simp only [span_singleton_pow, SModEq.sub_mem, mem_span_singleton] exact pow_dvd_one_untiltAux_sub_one (O := O) (p := p) n map_mul' _ _ := by rw [← sub_eq_zero, IsHausdorff.eq_iff_smodEq (I := (span {(p : O)}))] intro n rw [sub_smodEq_zero] simp only [smul_eq_mul, mul_top] apply (untiltAux_smodEq_untiltFun _ n).symm.trans refine SModEq.trans ?_ (SModEq.mul (untiltAux_smodEq_untiltFun _ n) (untiltAux_smodEq_untiltFun _ n)) simp only [span_singleton_pow, SModEq.sub_mem, mem_span_singleton] exact pow_dvd_mul_untiltAux_sub_untiltAux_mul (O := O) (p := p) _ _ n
def
RingTheory
[ "Mathlib.NumberTheory.Basic", "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.Perfection" ]
Mathlib/RingTheory/Perfectoid/Untilt.lean
untilt
Given a `p`-adically complete ring `O`, this is the multiplicative map from `PreTilt O p` to `O` itself. Specifically, it is defined as the limit of `p^n`-th powers of arbitrary lifts in `O` of the `n`-th component from the perfection of `O/p`.
mk_untilt_eq_coeff_zero (x : PreTilt O p) : Ideal.Quotient.mk (Ideal.span {(p : O)}) (x.untilt) = coeff (ModP O p) p 0 x := by simp only [untilt] rw [← Ideal.Quotient.mk_out ((coeff (ModP O p) p 0) x), Ideal.Quotient.eq, ← SModEq.sub_mem] simpa [untiltAux] using (x.untiltAux_smodEq_untiltFun 1).symm
theorem
RingTheory
[ "Mathlib.NumberTheory.Basic", "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.Perfection" ]
Mathlib/RingTheory/Perfectoid/Untilt.lean
mk_untilt_eq_coeff_zero
The composition of the mod `p` map with the untilt function equals taking the zeroth component of the perfection.
mk_comp_untilt_eq_coeff_zero : Ideal.Quotient.mk (Ideal.span {(p : O)}) ∘ untilt = coeff (ModP O p) p 0 := funext mk_untilt_eq_coeff_zero
theorem
RingTheory
[ "Mathlib.NumberTheory.Basic", "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.Perfection" ]
Mathlib/RingTheory/Perfectoid/Untilt.lean
mk_comp_untilt_eq_coeff_zero
The composition of the mod `p` map with the untilt function equals taking the zeroth component of the perfection. A variation of `PreTilt.mk_untilt_eq_coeff_zero`.
instCharP (p : ℕ) [h : CharP R p] : CharP R[X] p := let ⟨h⟩ := h ⟨fun n => by rw [← map_natCast C, ← C_0, C_inj, h]⟩
instance
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
instCharP
null
instExpChar (p : ℕ) [h : ExpChar R p] : ExpChar R[X] p := by cases h; exacts [ExpChar.zero, ExpChar.prime ‹_›] variable (R)
instance
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
instExpChar
null
degreeLE (n : WithBot ℕ) : Submodule R R[X] := ⨅ k : ℕ, ⨅ _ : ↑k > n, LinearMap.ker (lcoeff R k)
def
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
degreeLE
The `R`-submodule of `R[X]` consisting of polynomials of degree ≤ `n`.
degreeLT (n : ℕ) : Submodule R R[X] := ⨅ k : ℕ, ⨅ (_ : k ≥ n), LinearMap.ker (lcoeff R k) variable {R}
def
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
degreeLT
The `R`-submodule of `R[X]` consisting of polynomials of degree < `n`.
mem_degreeLE {n : WithBot ℕ} {f : R[X]} : f ∈ degreeLE R n ↔ degree f ≤ n := by simp only [degreeLE, Submodule.mem_iInf, degree_le_iff_coeff_zero, LinearMap.mem_ker]; rfl @[mono]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
mem_degreeLE
null
degreeLE_mono {m n : WithBot ℕ} (H : m ≤ n) : degreeLE R m ≤ degreeLE R n := fun _ hf => mem_degreeLE.2 (le_trans (mem_degreeLE.1 hf) H)
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
degreeLE_mono
null
degreeLE_eq_span_X_pow [DecidableEq R] {n : ℕ} : degreeLE R n = Submodule.span R ↑((Finset.range (n + 1)).image fun n => (X : R[X]) ^ n) := by apply le_antisymm · intro p hp replace hp := mem_degreeLE.1 hp rw [← Polynomial.sum_monomial_eq p, Polynomial.sum] refine Submodule.sum_mem _ fun k hk => ?_ have := WithBot.coe_le_coe.1 (Finset.sup_le_iff.1 hp k hk) rw [← C_mul_X_pow_eq_monomial, C_mul'] refine Submodule.smul_mem _ _ (Submodule.subset_span <| Finset.mem_coe.2 <| Finset.mem_image.2 ⟨_, Finset.mem_range.2 (Nat.lt_succ_of_le this), rfl⟩) rw [Submodule.span_le, Finset.coe_image, Set.image_subset_iff] intro k hk apply mem_degreeLE.2 exact (degree_X_pow_le _).trans (WithBot.coe_le_coe.2 <| Nat.le_of_lt_succ <| Finset.mem_range.1 hk)
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
degreeLE_eq_span_X_pow
null
mem_degreeLT {n : ℕ} {f : R[X]} : f ∈ degreeLT R n ↔ degree f < n := by rw [degreeLT, Submodule.mem_iInf] conv_lhs => intro i; rw [Submodule.mem_iInf] rw [degree, Finset.max_eq_sup_coe] rw [Finset.sup_lt_iff ?_] rotate_left · apply WithBot.bot_lt_coe conv_rhs => simp only [mem_support_iff] intro b rw [Nat.cast_withBot, WithBot.coe_lt_coe, lt_iff_not_ge, Ne, not_imp_not] rfl @[mono]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
mem_degreeLT
null
degreeLT_mono {m n : ℕ} (H : m ≤ n) : degreeLT R m ≤ degreeLT R n := fun _ hf => mem_degreeLT.2 (lt_of_lt_of_le (mem_degreeLT.1 hf) <| WithBot.coe_le_coe.2 H)
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
degreeLT_mono
null
degreeLT_eq_span_X_pow [DecidableEq R] {n : ℕ} : degreeLT R n = Submodule.span R ↑((Finset.range n).image fun n => X ^ n : Finset R[X]) := by apply le_antisymm · intro p hp replace hp := mem_degreeLT.1 hp rw [← Polynomial.sum_monomial_eq p, Polynomial.sum] refine Submodule.sum_mem _ fun k hk => ?_ have := WithBot.coe_lt_coe.1 ((Finset.sup_lt_iff <| WithBot.bot_lt_coe n).1 hp k hk) rw [← C_mul_X_pow_eq_monomial, C_mul'] refine Submodule.smul_mem _ _ (Submodule.subset_span <| by grind) rw [Submodule.span_le, Finset.coe_image, Set.image_subset_iff] intro k hk apply mem_degreeLT.2 exact lt_of_le_of_lt (degree_X_pow_le _) (WithBot.coe_lt_coe.2 <| Finset.mem_range.1 hk)
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
degreeLT_eq_span_X_pow
null
degreeLTEquiv (R) [Semiring R] (n : ℕ) : degreeLT R n ≃ₗ[R] Fin n → R where toFun p n := (↑p : R[X]).coeff n invFun f := ⟨∑ i : Fin n, monomial i (f i), (degreeLT R n).sum_mem fun i _ => mem_degreeLT.mpr (lt_of_le_of_lt (degree_monomial_le i (f i)) (WithBot.coe_lt_coe.mpr i.is_lt))⟩ map_add' p q := by ext dsimp rw [coeff_add] map_smul' x p := by ext dsimp rw [coeff_smul] rfl left_inv := by rintro ⟨p, hp⟩ ext1 simp only by_cases hp0 : p = 0 · subst hp0 simp only [coeff_zero, LinearMap.map_zero, Finset.sum_const_zero] rw [mem_degreeLT, degree_eq_natDegree hp0, Nat.cast_lt] at hp conv_rhs => rw [p.as_sum_range' n hp, ← Fin.sum_univ_eq_sum_range] right_inv f := by ext i simp only [finset_sum_coeff] rw [Finset.sum_eq_single i, coeff_monomial, if_pos rfl] · rintro j - hji rw [coeff_monomial, if_neg] rwa [← Fin.ext_iff] · intro h exact (h (Finset.mem_univ _)).elim
def
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
degreeLTEquiv
The first `n` coefficients on `degreeLT n` form a linear equivalence with `Fin n → R`.
degreeLTEquiv_eq_zero_iff_eq_zero {n : ℕ} {p : R[X]} (hp : p ∈ degreeLT R n) : degreeLTEquiv _ _ ⟨p, hp⟩ = 0 ↔ p = 0 := by simp
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
degreeLTEquiv_eq_zero_iff_eq_zero
null
eval_eq_sum_degreeLTEquiv {n : ℕ} {p : R[X]} (hp : p ∈ degreeLT R n) (x : R) : p.eval x = ∑ i, degreeLTEquiv _ _ ⟨p, hp⟩ i * x ^ (i : ℕ) := by simp_rw [eval_eq_sum] exact (sum_fin _ (by simp_rw [zero_mul, forall_const]) (mem_degreeLT.mp hp)).symm
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
eval_eq_sum_degreeLTEquiv
null
degreeLT_succ_eq_degreeLE {n : ℕ} : degreeLT R (n + 1) = degreeLE R n := by ext x by_cases x_zero : x = 0 · simp_rw [x_zero, Submodule.zero_mem] · rw [mem_degreeLT, mem_degreeLE, ← natDegree_lt_iff_degree_lt (by rwa [ne_eq]), ← natDegree_le_iff_degree_le, Nat.lt_succ]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
degreeLT_succ_eq_degreeLE
null
monicEquivDegreeLT [Nontrivial R] (n : ℕ) : { p : R[X] // p.Monic ∧ p.natDegree = n } ≃ degreeLT R n where toFun p := ⟨p.1.eraseLead, by rcases p with ⟨p, hp, rfl⟩ simp only [mem_degreeLT] refine lt_of_lt_of_le ?_ degree_le_natDegree exact degree_eraseLead_lt (Polynomial.Monic.ne_zero_of_polynomial_ne hp one_ne_zero)⟩ invFun := fun p => ⟨X^n + p.1, monic_X_pow_add (mem_degreeLT.1 p.2), by rw [natDegree_add_eq_left_of_degree_lt] · simp · simp [mem_degreeLT.1 p.2]⟩ left_inv := by rintro ⟨p, hp, rfl⟩ ext1 simp only conv_rhs => rw [← eraseLead_add_C_mul_X_pow p] simp [Monic.def.1 hp, add_comm] right_inv := by rintro ⟨p, hp⟩ ext1 simp only rw [eraseLead_add_of_degree_lt_left] · simp · simp [mem_degreeLT.1 hp]
def
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
monicEquivDegreeLT
The equivalence between monic polynomials of degree `n` and polynomials of degree less than `n`, formed by adding a term `X ^ n`.
exists_degree_le_of_mem_span {s : Set R[X]} {p : R[X]} (hs : s.Nonempty) (hp : p ∈ Submodule.span R s) : ∃ p' ∈ s, degree p ≤ degree p' := by by_contra! h by_cases hp_zero : p = 0 · rw [hp_zero, degree_zero] at h rcases hs with ⟨x, hx⟩ exact not_lt_bot (h x hx) · have : p ∈ degreeLT R (natDegree p) := by refine (Submodule.span_le.mpr fun p' p'_mem => ?_) hp rw [SetLike.mem_coe, mem_degreeLT, Nat.cast_withBot] exact lt_of_lt_of_le (h p' p'_mem) degree_le_natDegree rwa [mem_degreeLT, Nat.cast_withBot, degree_eq_natDegree hp_zero, Nat.cast_withBot, lt_self_iff_false] at this
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
exists_degree_le_of_mem_span
For every polynomial `p` in the span of a set `s : Set R[X]`, there exists a polynomial of `p' ∈ s` with higher degree. See also `Polynomial.exists_degree_le_of_mem_span_of_finite`.
exists_degree_le_of_mem_span_of_finite {s : Set R[X]} (s_fin : s.Finite) (hs : s.Nonempty) : ∃ p' ∈ s, ∀ (p : R[X]), p ∈ Submodule.span R s → degree p ≤ degree p' := by obtain ⟨a, has, hmax⟩ := s_fin.exists_maximalFor degree s hs refine ⟨a, has, fun p hp => ?_⟩ obtain ⟨p', hp', hpp'⟩ := exists_degree_le_of_mem_span hs hp exact hpp'.trans <| not_lt.1 <| not_lt_iff_le_imp_ge.2 <| hmax hp'
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
exists_degree_le_of_mem_span_of_finite
A stronger version of `Polynomial.exists_degree_le_of_mem_span` under the assumption that the set `s : R[X]` is finite. There exists a polynomial `p' ∈ s` whose degree dominates the degree of every element of `p ∈ span R s`.
span_le_degreeLE_of_finite {s : Set R[X]} (s_fin : s.Finite) : ∃ n : ℕ, Submodule.span R s ≤ degreeLE R n := by by_cases s_emp : s.Nonempty · rcases exists_degree_le_of_mem_span_of_finite s_fin s_emp with ⟨p', _, hp'max⟩ exact ⟨natDegree p', fun p hp => mem_degreeLE.mpr ((hp'max _ hp).trans degree_le_natDegree)⟩ · rw [Set.not_nonempty_iff_eq_empty] at s_emp rw [s_emp, Submodule.span_empty] exact ⟨0, bot_le⟩
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
span_le_degreeLE_of_finite
The span of every finite set of polynomials is contained in a `degreeLE n` for some `n`.
span_of_finite_le_degreeLT {s : Set R[X]} (s_fin : s.Finite) : ∃ n : ℕ, Submodule.span R s ≤ degreeLT R n := by rcases span_le_degreeLE_of_finite s_fin with ⟨n, _⟩ exact ⟨n + 1, by rwa [degreeLT_succ_eq_degreeLE]⟩
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
span_of_finite_le_degreeLT
The span of every finite set of polynomials is contained in a `degreeLT n` for some `n`.
not_finite [Nontrivial R] : ¬ Module.Finite R R[X] := by rw [Module.finite_def, Submodule.fg_def] push_neg intro s hs contra rcases span_le_degreeLE_of_finite hs with ⟨n,hn⟩ have : ((X : R[X]) ^ (n + 1)) ∈ Polynomial.degreeLE R ↑n := by rw [contra] at hn exact hn Submodule.mem_top rw [mem_degreeLE, degree_X_pow, Nat.cast_le, add_le_iff_nonpos_right, nonpos_iff_eq_zero] at this exact one_ne_zero this
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
not_finite
If `R` is a nontrivial ring, the polynomials `R[X]` are not finite as an `R`-module. When `R` is a field, this is equivalent to `R[X]` being an infinite-dimensional vector space over `R`.
geom_sum_X_comp_X_add_one_eq_sum (n : ℕ) : (∑ i ∈ range n, (X : R[X]) ^ i).comp (X + 1) = (Finset.range n).sum fun i : ℕ => (n.choose (i + 1) : R[X]) * X ^ i := by ext i trans (n.choose (i + 1) : R); swap · simp only [finset_sum_coeff, ← C_eq_natCast, coeff_C_mul_X_pow] rw [Finset.sum_eq_single i, if_pos rfl] · simp +contextual only [@eq_comm _ i, if_false, imp_true_iff] · simp +contextual only [Nat.lt_add_one_iff, Nat.choose_eq_zero_of_lt, Nat.cast_zero, Finset.mem_range, not_lt, if_true, imp_true_iff] induction n generalizing i with | zero => dsimp; simp only [zero_comp, coeff_zero, Nat.cast_zero] | succ n ih => simp only [geom_sum_succ', ih, add_comp, X_pow_comp, coeff_add, Nat.choose_succ_succ, Nat.cast_add, coeff_X_add_one_pow]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
geom_sum_X_comp_X_add_one_eq_sum
null
Monic.geom_sum {P : R[X]} (hP : P.Monic) (hdeg : 0 < P.natDegree) {n : ℕ} (hn : n ≠ 0) : (∑ i ∈ range n, P ^ i).Monic := by nontriviality R obtain ⟨n, rfl⟩ := Nat.exists_eq_succ_of_ne_zero hn rw [geom_sum_succ'] refine (hP.pow _).add_of_left ?_ refine lt_of_le_of_lt (degree_sum_le _ _) ?_ rw [Finset.sup_lt_iff] · simp only [Finset.mem_range, degree_eq_natDegree (hP.pow _).ne_zero] simp only [Nat.cast_lt, hP.natDegree_pow] intro k exact nsmul_lt_nsmul_left hdeg · rw [bot_lt_iff_ne_bot, Ne, degree_eq_bot] exact (hP.pow _).ne_zero
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
Monic.geom_sum
null
Monic.geom_sum' {P : R[X]} (hP : P.Monic) (hdeg : 0 < P.degree) {n : ℕ} (hn : n ≠ 0) : (∑ i ∈ range n, P ^ i).Monic := hP.geom_sum (natDegree_pos_iff_degree_pos.2 hdeg) hn
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
Monic.geom_sum'
null
monic_geom_sum_X {n : ℕ} (hn : n ≠ 0) : (∑ i ∈ range n, (X : R[X]) ^ i).Monic := by nontriviality R apply monic_X.geom_sum _ hn simp only [natDegree_X, zero_lt_one]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
monic_geom_sum_X
null
restriction (p : R[X]) : Polynomial (Subring.closure (↑p.coeffs : Set R)) := ∑ i ∈ p.support, monomial i (⟨p.coeff i, letI := Classical.decEq R if H : p.coeff i = 0 then H.symm ▸ (Subring.closure _).zero_mem else Subring.subset_closure (p.coeff_mem_coeffs H)⟩ : Subring.closure (↑p.coeffs : Set R)) @[simp]
def
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
restriction
Given a polynomial, return the polynomial whose coefficients are in the ring closure of the original coefficients.
coeff_restriction {p : R[X]} {n : ℕ} : ↑(coeff (restriction p) n) = coeff p n := by classical simp only [restriction, coeff_monomial, finset_sum_coeff, mem_support_iff, Finset.sum_ite_eq', Ne, ite_not] split_ifs with h · rw [h] rfl · rfl
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
coeff_restriction
null
coeff_restriction' {p : R[X]} {n : ℕ} : (coeff (restriction p) n).1 = coeff p n := by simp @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
coeff_restriction'
null
support_restriction (p : R[X]) : support (restriction p) = support p := by ext i simp only [mem_support_iff, not_iff_not, Ne] conv_rhs => rw [← coeff_restriction] exact ⟨fun H => by rw [H, ZeroMemClass.coe_zero], fun H => Subtype.coe_injective H⟩ @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
support_restriction
null
map_restriction {R : Type u} [CommRing R] (p : R[X]) : p.restriction.map (algebraMap _ _) = p := ext fun n => by rw [coeff_map, Algebra.algebraMap_ofSubring_apply, coeff_restriction] @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
map_restriction
null
degree_restriction {p : R[X]} : (restriction p).degree = p.degree := by simp [degree] @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
degree_restriction
null
natDegree_restriction {p : R[X]} : (restriction p).natDegree = p.natDegree := by simp [natDegree] @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
natDegree_restriction
null
monic_restriction {p : R[X]} : Monic (restriction p) ↔ Monic p := by simp only [Monic, leadingCoeff, natDegree_restriction] rw [← @coeff_restriction _ _ p] exact ⟨fun H => by rw [H, OneMemClass.coe_one], fun H => Subtype.coe_injective H⟩ @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
monic_restriction
null
restriction_zero : restriction (0 : R[X]) = 0 := by simp only [restriction, Finset.sum_empty, support_zero] @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
restriction_zero
null
restriction_one : restriction (1 : R[X]) = 1 := ext fun i => Subtype.eq <| by rw [coeff_restriction', coeff_one, coeff_one]; split_ifs <;> rfl variable [Semiring S] {f : R →+* S} {x : S}
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
restriction_one
null
eval₂_restriction {p : R[X]} : eval₂ f x p = eval₂ (f.comp (Subring.subtype (Subring.closure (p.coeffs : Set R)))) x p.restriction := by simp only [eval₂_eq_sum, sum, support_restriction, ← @coeff_restriction _ _ p, RingHom.comp_apply, Subring.coe_subtype]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
eval₂_restriction
null
toSubring (hp : (↑p.coeffs : Set R) ⊆ T) : T[X] := ∑ i ∈ p.support, monomial i (⟨p.coeff i, letI := Classical.decEq R if H : p.coeff i = 0 then H.symm ▸ T.zero_mem else hp (p.coeff_mem_coeffs H)⟩ : T) variable (hp : (↑p.coeffs : Set R) ⊆ T) @[simp]
def
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
toSubring
Given a polynomial `p` and a subring `T` that contains the coefficients of `p`, return the corresponding polynomial whose coefficients are in `T`.
coeff_toSubring {n : ℕ} : ↑(coeff (toSubring p T hp) n) = coeff p n := by classical simp only [toSubring, coeff_monomial, finset_sum_coeff, mem_support_iff, Finset.sum_ite_eq', Ne, ite_not] split_ifs with h · rw [h] rfl · rfl
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
coeff_toSubring
null
coeff_toSubring' {n : ℕ} : (coeff (toSubring p T hp) n).1 = coeff p n := by simp @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
coeff_toSubring'
null
support_toSubring : support (toSubring p T hp) = support p := by ext i simp only [mem_support_iff, not_iff_not, Ne] conv_rhs => rw [← coeff_toSubring p T hp] exact ⟨fun H => by rw [H, ZeroMemClass.coe_zero], fun H => Subtype.coe_injective H⟩ @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
support_toSubring
null
degree_toSubring : (toSubring p T hp).degree = p.degree := by simp [degree] @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
degree_toSubring
null
natDegree_toSubring : (toSubring p T hp).natDegree = p.natDegree := by simp [natDegree] @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
natDegree_toSubring
null
monic_toSubring : Monic (toSubring p T hp) ↔ Monic p := by simp_rw [Monic, leadingCoeff, natDegree_toSubring, ← coeff_toSubring p T hp] exact ⟨fun H => by rw [H, OneMemClass.coe_one], fun H => Subtype.coe_injective H⟩ @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
monic_toSubring
null
toSubring_zero : toSubring (0 : R[X]) T (by simp [coeffs]) = 0 := by ext i simp @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
toSubring_zero
null
toSubring_one : toSubring (1 : R[X]) T (Set.Subset.trans coeffs_one <| Finset.singleton_subset_set_iff.2 T.one_mem) = 1 := ext fun i => Subtype.eq <| by rw [coeff_toSubring', coeff_one, coeff_one, apply_ite Subtype.val, ZeroMemClass.coe_zero, OneMemClass.coe_one] @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
toSubring_one
null
map_toSubring : (p.toSubring T hp).map (Subring.subtype T) = p := by ext n simp [coeff_map]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
map_toSubring
null
ofSubring (p : T[X]) : R[X] := ∑ i ∈ p.support, monomial i (p.coeff i : R)
def
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
ofSubring
Given a polynomial whose coefficients are in some subring, return the corresponding polynomial whose coefficients are in the ambient ring.
coeff_ofSubring (p : T[X]) (n : ℕ) : coeff (ofSubring T p) n = (coeff p n : T) := by simp only [ofSubring, coeff_monomial, finset_sum_coeff, mem_support_iff, Finset.sum_ite_eq', Ne, Classical.not_not, ite_eq_left_iff] intro h rw [h, ZeroMemClass.coe_zero] @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
coeff_ofSubring
null
coeffs_ofSubring {p : T[X]} : (↑(p.ofSubring T).coeffs : Set R) ⊆ T := by classical intro i hi simp only [coeffs, Set.mem_image, mem_support_iff, Ne, Finset.mem_coe, (Finset.coe_image)] at hi rcases hi with ⟨n, _, h'n⟩ rw [← h'n, coeff_ofSubring] exact Subtype.mem (coeff p n : T)
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
coeffs_ofSubring
null
ofPolynomial (I : Ideal R[X]) : Submodule R R[X] where carrier := I.carrier zero_mem' := I.zero_mem add_mem' := I.add_mem smul_mem' c x H := by rw [← C_mul'] exact I.mul_mem_left _ H variable {I : Ideal R[X]}
def
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
ofPolynomial
Transport an ideal of `R[X]` to an `R`-submodule of `R[X]`.
mem_ofPolynomial (x) : x ∈ I.ofPolynomial ↔ x ∈ I := Iff.rfl variable (I)
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
mem_ofPolynomial
null
degreeLE (n : WithBot ℕ) : Submodule R R[X] := Polynomial.degreeLE R n ⊓ I.ofPolynomial
def
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
degreeLE
Given an ideal `I` of `R[X]`, make the `R`-submodule of `I` consisting of polynomials of degree ≤ `n`.
leadingCoeffNth (n : ℕ) : Ideal R := (I.degreeLE n).map <| lcoeff R n
def
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
leadingCoeffNth
Given an ideal `I` of `R[X]`, make the ideal in `R` of leading coefficients of polynomials in `I` with degree ≤ `n`.
leadingCoeff : Ideal R := ⨆ n : ℕ, I.leadingCoeffNth n
def
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
leadingCoeff
Given an ideal `I` in `R[X]`, make the ideal in `R` of the leading coefficients in `I`.
polynomial_mem_ideal_of_coeff_mem_ideal (I : Ideal R[X]) (p : R[X]) (hp : ∀ n : ℕ, p.coeff n ∈ I.comap (C : R →+* R[X])) : p ∈ I := sum_C_mul_X_pow_eq p ▸ Submodule.sum_mem I fun n _ => I.mul_mem_right _ (hp n)
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
polynomial_mem_ideal_of_coeff_mem_ideal
If every coefficient of a polynomial is in an ideal `I`, then so is the polynomial itself
mem_map_C_iff {I : Ideal R} {f : R[X]} : f ∈ (Ideal.map (C : R →+* R[X]) I : Ideal R[X]) ↔ ∀ n : ℕ, f.coeff n ∈ I := by constructor · intro hf refine Submodule.span_induction ?_ ?_ ?_ ?_ hf · intro f hf n obtain ⟨x, hx⟩ := (Set.mem_image _ _ _).mp hf rw [← hx.right, coeff_C] by_cases h : n = 0 · simpa [h] using hx.left · simp [h] · simp · exact fun f g _ _ hf hg n => by simp [I.add_mem (hf n) (hg n)] · refine fun f g _ hg n => ?_ rw [smul_eq_mul, coeff_mul] exact I.sum_mem fun c _ => I.mul_mem_left (f.coeff c.fst) (hg c.snd) · intro hf rw [← sum_monomial_eq f] refine (I.map C : Ideal R[X]).sum_mem fun n _ => ?_ simp only [← C_mul_X_pow_eq_monomial] rw [mul_comm] exact (I.map C : Ideal R[X]).mul_mem_left _ (mem_map_of_mem _ (hf n))
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
mem_map_C_iff
The push-forward of an ideal `I` of `R` to `R[X]` via inclusion is exactly the set of polynomials whose coefficients are in `I`
_root_.Polynomial.ker_mapRingHom (f : R →+* S) : RingHom.ker (Polynomial.mapRingHom f) = (RingHom.ker f).map (C : R →+* R[X]) := by ext simp only [RingHom.mem_ker, coe_mapRingHom] rw [mem_map_C_iff, Polynomial.ext_iff] simp [RingHom.mem_ker] variable (I : Ideal R[X])
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
_root_.Polynomial.ker_mapRingHom
null
mem_leadingCoeffNth (n : ℕ) (x) : x ∈ I.leadingCoeffNth n ↔ ∃ p ∈ I, degree p ≤ n ∧ p.leadingCoeff = x := by simp only [leadingCoeffNth, degreeLE, Submodule.mem_map, lcoeff_apply, Submodule.mem_inf, mem_degreeLE] constructor · rintro ⟨p, ⟨hpdeg, hpI⟩, rfl⟩ rcases lt_or_eq_of_le hpdeg with hpdeg | hpdeg · refine ⟨0, I.zero_mem, bot_le, ?_⟩ rw [leadingCoeff_zero, eq_comm] exact coeff_eq_zero_of_degree_lt hpdeg · refine ⟨p, hpI, le_of_eq hpdeg, ?_⟩ rw [Polynomial.leadingCoeff, natDegree, hpdeg, Nat.cast_withBot, WithBot.unbotD_coe] · rintro ⟨p, hpI, hpdeg, rfl⟩ have : natDegree p + (n - natDegree p) = n := add_tsub_cancel_of_le (natDegree_le_of_degree_le hpdeg) refine ⟨p * X ^ (n - natDegree p), ⟨?_, I.mul_mem_right _ hpI⟩, ?_⟩ · apply le_trans (degree_mul_le _ _) _ apply le_trans (add_le_add degree_le_natDegree (degree_X_pow_le _)) _ rw [← Nat.cast_add, this] · rw [Polynomial.leadingCoeff, ← coeff_mul_X_pow p (n - natDegree p), this]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
mem_leadingCoeffNth
null
mem_leadingCoeffNth_zero (x) : x ∈ I.leadingCoeffNth 0 ↔ C x ∈ I := (mem_leadingCoeffNth _ _ _).trans ⟨fun ⟨p, hpI, hpdeg, hpx⟩ => by rwa [← hpx, Polynomial.leadingCoeff, Nat.eq_zero_of_le_zero (natDegree_le_of_degree_le hpdeg), ← eq_C_of_degree_le_zero hpdeg], fun hx => ⟨C x, hx, degree_C_le, leadingCoeff_C x⟩⟩
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
mem_leadingCoeffNth_zero
null
leadingCoeffNth_mono {m n : ℕ} (H : m ≤ n) : I.leadingCoeffNth m ≤ I.leadingCoeffNth n := by intro r hr simp only [mem_leadingCoeffNth] at hr ⊢ rcases hr with ⟨p, hpI, hpdeg, rfl⟩ refine ⟨p * X ^ (n - m), I.mul_mem_right _ hpI, ?_, leadingCoeff_mul_X_pow⟩ refine le_trans (degree_mul_le _ _) ?_ grw [hpdeg, degree_X_pow_le] rw [← Nat.cast_add, add_tsub_cancel_of_le H]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
leadingCoeffNth_mono
null
mem_leadingCoeff (x) : x ∈ I.leadingCoeff ↔ ∃ p ∈ I, Polynomial.leadingCoeff p = x := by rw [leadingCoeff, Submodule.mem_iSup_of_directed] · simp only [mem_leadingCoeffNth] constructor · rintro ⟨i, p, hpI, _, rfl⟩ exact ⟨p, hpI, rfl⟩ rintro ⟨p, hpI, rfl⟩ exact ⟨natDegree p, p, hpI, degree_le_natDegree, rfl⟩ intro i j exact ⟨i + j, I.leadingCoeffNth_mono (Nat.le_add_right _ _), I.leadingCoeffNth_mono (Nat.le_add_left _ _)⟩
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
mem_leadingCoeff
null
_root_.Polynomial.coeff_prod_mem_ideal_pow_tsub {ι : Type*} (s : Finset ι) (f : ι → R[X]) (I : Ideal R) (n : ι → ℕ) (h : ∀ i ∈ s, ∀ (k), (f i).coeff k ∈ I ^ (n i - k)) (k : ℕ) : (s.prod f).coeff k ∈ I ^ (s.sum n - k) := by classical induction s using Finset.induction generalizing k with | empty => rw [sum_empty, prod_empty, coeff_one, zero_tsub, pow_zero, Ideal.one_eq_top] exact Submodule.mem_top | insert a s ha hs => rw [sum_insert ha, prod_insert ha, coeff_mul] apply sum_mem rintro ⟨i, j⟩ e obtain rfl : i + j = k := mem_antidiagonal.mp e apply Ideal.pow_le_pow_right add_tsub_add_le_tsub_add_tsub rw [pow_add] exact Ideal.mul_mem_mul (by grind) (by grind)
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
_root_.Polynomial.coeff_prod_mem_ideal_pow_tsub
If `I` is an ideal, and `pᵢ` is a finite family of polynomials each satisfying `∀ k, (pᵢ)ₖ ∈ Iⁿⁱ⁻ᵏ` for some `nᵢ`, then `p = ∏ pᵢ` also satisfies `∀ k, pₖ ∈ Iⁿ⁻ᵏ` with `n = ∑ nᵢ`.
polynomial_not_isField : ¬IsField R[X] := by nontriviality R intro hR obtain ⟨p, hp⟩ := hR.mul_inv_cancel X_ne_zero have hp0 : p ≠ 0 := right_ne_zero_of_mul_eq_one hp have := degree_lt_degree_mul_X hp0 rw [← X_mul, congr_arg degree hp, degree_one, Nat.WithBot.lt_zero_iff, degree_eq_bot] at this exact hp0 this
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
polynomial_not_isField
`R[X]` is never a field for any ring `R`.
eq_zero_of_constant_mem_of_maximal (hR : IsField R) (I : Ideal R[X]) [hI : I.IsMaximal] (x : R) (hx : C x ∈ I) : x = 0 := by refine Classical.by_contradiction fun hx0 => hI.ne_top ((eq_top_iff_one I).2 ?_) obtain ⟨y, hy⟩ := hR.mul_inv_cancel hx0 convert I.mul_mem_left (C y) hx rw [← C.map_mul, hR.mul_comm y x, hy, RingHom.map_one]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
eq_zero_of_constant_mem_of_maximal
The only constant in a maximal ideal over a field is `0`.
isPrime_map_C_iff_isPrime (P : Ideal R) : IsPrime (map (C : R →+* R[X]) P : Ideal R[X]) ↔ IsPrime P := by constructor · intro H have := comap_isPrime C (map C P) convert this using 1 ext x simp only [mem_comap, mem_map_C_iff] constructor · rintro h (- | n) · rwa [coeff_C_zero] · simp only [coeff_C_ne_zero (Nat.succ_ne_zero _), Submodule.zero_mem] · intro h simpa only [coeff_C_zero] using h 0 · intro h constructor · rw [Ne, eq_top_iff_one, mem_map_C_iff, not_forall] use 0 rw [coeff_one_zero, ← eq_top_iff_one] exact h.1 · intro f g simp only [mem_map_C_iff] contrapose! rintro ⟨hf, hg⟩ classical let m := Nat.find hf let n := Nat.find hg refine ⟨m + n, ?_⟩ rw [coeff_mul, ← Finset.insert_erase ((Finset.mem_antidiagonal (a := (m,n))).mpr rfl), Finset.sum_insert (Finset.notMem_erase _ _), (P.add_mem_iff_left _).not] · apply mt h.2 rw [not_or] exact ⟨Nat.find_spec hf, Nat.find_spec hg⟩ apply P.sum_mem rintro ⟨i, j⟩ hij rw [Finset.mem_erase, Finset.mem_antidiagonal] at hij simp only [Ne, Prod.mk_inj, not_and_or] at hij obtain hi | hj : i < m ∨ j < n := by cutsat · rw [mul_comm] apply P.mul_mem_left exact Classical.not_not.1 (Nat.find_min hf hi) · apply P.mul_mem_left exact Classical.not_not.1 (Nat.find_min hg hj)
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
isPrime_map_C_iff_isPrime
If `P` is a prime ideal of `R`, then `P.R[x]` is a prime ideal of `R[x]`.
isPrime_map_C_of_isPrime {P : Ideal R} (H : IsPrime P) : IsPrime (map (C : R →+* R[X]) P : Ideal R[X]) := (isPrime_map_C_iff_isPrime P).mpr H
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
isPrime_map_C_of_isPrime
If `P` is a prime ideal of `R`, then `P.R[x]` is a prime ideal of `R[x]`.
is_fg_degreeLE [IsNoetherianRing R] (I : Ideal R[X]) (n : ℕ) : Submodule.FG (I.degreeLE n) := letI := Classical.decEq R isNoetherian_submodule_left.1 (isNoetherian_of_fg_of_noetherian _ ⟨_, degreeLE_eq_span_X_pow.symm⟩) _
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
is_fg_degreeLE
null
span_le_of_C_coeff_mem (cf : ∀ i : ℕ, C (f.coeff i) ∈ I) : Ideal.span { g | ∃ i, g = C (f.coeff i) } ≤ I := by simp only [@eq_comm _ _ (C _)] exact (Ideal.span_le.trans range_subset_iff).mpr cf
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
span_le_of_C_coeff_mem
If the coefficients of a polynomial belong to an ideal, then that ideal contains the ideal spanned by the coefficients of the polynomial.
mem_span_C_coeff : f ∈ Ideal.span { g : R[X] | ∃ i : ℕ, g = C (coeff f i) } := by let p := Ideal.span { g : R[X] | ∃ i : ℕ, g = C (coeff f i) } nth_rw 2 [(sum_C_mul_X_pow_eq f).symm] refine Submodule.sum_mem _ fun n _hn => ?_ dsimp have : C (coeff f n) ∈ p := by apply subset_span rw [mem_setOf_eq] use n have : monomial n (1 : R) • C (coeff f n) ∈ p := p.smul_mem _ this convert this using 1 simp only [monomial_mul_C, one_mul, smul_eq_mul] rw [← C_mul_X_pow_eq_monomial]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
mem_span_C_coeff
null
exists_C_coeff_notMem : f ∉ I → ∃ i : ℕ, C (coeff f i) ∉ I := Not.imp_symm fun cf => span_le_of_C_coeff_mem (not_exists_not.mp cf) mem_span_C_coeff @[deprecated (since := "2025-05-23")] alias exists_C_coeff_not_mem := exists_C_coeff_notMem
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
exists_C_coeff_notMem
null
prime_C_iff : Prime (C r) ↔ Prime r := ⟨comap_prime C (evalRingHom (0 : R)) fun _ => eval_C, fun hr => by have := hr.1 rw [← Ideal.span_singleton_prime] at hr ⊢ · rw [← Set.image_singleton, ← Ideal.map_span] apply Ideal.isPrime_map_C_of_isPrime hr · intro h; apply (this (C_eq_zero.mp h)) · assumption⟩
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
prime_C_iff
null
private prime_C_iff_of_fintype {R : Type u} (σ : Type v) {r : R} [CommRing R] [Fintype σ] : Prime (C r : MvPolynomial σ R) ↔ Prime r := by rw [← MulEquiv.prime_iff (renameEquiv R (Fintype.equivFin σ))] convert_to Prime (C r) ↔ _ · congr! simp only [renameEquiv_apply, algHom_C, algebraMap_eq] · induction Fintype.card σ with | zero => exact MulEquiv.prime_iff (isEmptyAlgEquiv R (Fin 0)).symm (p := r) | succ d hd => convert MulEquiv.prime_iff (finSuccEquiv R d).symm (p := Polynomial.C (C r)) · simp [← finSuccEquiv_comp_C_eq_C] · simp [← hd, Polynomial.prime_C_iff]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
prime_C_iff_of_fintype
null
prime_C_iff : Prime (C r : MvPolynomial σ R) ↔ Prime r := ⟨comap_prime C constantCoeff (constantCoeff_C _), fun hr => ⟨fun h => hr.1 <| by rw [← C_inj, h] simp, fun h => hr.2.1 <| by rw [← constantCoeff_C _ r] exact h.map _, fun a b hd => by obtain ⟨s, a', b', rfl, rfl⟩ := exists_finset_rename₂ a b rw [← algebraMap_eq] at hd have : algebraMap R _ r ∣ a' * b' := by convert _root_.map_dvd (killCompl Subtype.val_injective) hd · simp · simp rw [← rename_C ((↑) : s → σ)] let f := (rename (R := R) ((↑) : s → σ)).toRingHom exact (((prime_C_iff_of_fintype s).2 hr).2.2 a' b' this).imp (map_dvd f) (map_dvd f)⟩⟩ variable {σ}
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
prime_C_iff
null
prime_rename_iff (s : Set σ) {p : MvPolynomial s R} : Prime (rename ((↑) : s → σ) p) ↔ Prime (p : MvPolynomial s R) := by classical symm let eqv := (sumAlgEquiv R (↥sᶜ) s).symm.trans (renameEquiv R <| (Equiv.sumComm (↥sᶜ) s).trans <| Equiv.Set.sumCompl s) have : (rename (↑)).toRingHom = eqv.toAlgHom.toRingHom.comp C := by apply ringHom_ext · intro simp only [eqv, AlgHom.toRingHom_eq_coe, RingHom.coe_coe, rename_C, AlgEquiv.toAlgHom_eq_coe, AlgEquiv.toAlgHom_toRingHom, RingHom.coe_comp, AlgEquiv.coe_trans, Function.comp_apply, MvPolynomial.sumAlgEquiv_symm_apply, iterToSum_C_C, renameEquiv_apply, Equiv.coe_trans, Equiv.sumComm_apply] · intro simp only [eqv, AlgHom.toRingHom_eq_coe, RingHom.coe_coe, rename_X, AlgEquiv.toAlgHom_eq_coe, AlgEquiv.toAlgHom_toRingHom, RingHom.coe_comp, AlgEquiv.coe_trans, Function.comp_apply, MvPolynomial.sumAlgEquiv_symm_apply, iterToSum_C_X, renameEquiv_apply, Equiv.coe_trans, Equiv.sumComm_apply, Sum.swap_inr, Equiv.Set.sumCompl_apply_inl] apply_fun (· p) at this simp only [AlgHom.toRingHom_eq_coe, RingHom.coe_coe, AlgEquiv.toAlgHom_eq_coe, AlgEquiv.toAlgHom_toRingHom, RingHom.coe_comp, Function.comp_apply] at this rw [this, MulEquiv.prime_iff, prime_C_iff]
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
prime_rename_iff
null
protected Polynomial.isNoetherianRing [inst : IsNoetherianRing R] : IsNoetherianRing R[X] := isNoetherianRing_iff.2 ⟨fun I : Ideal R[X] => let M := inst.wf.min (Set.range I.leadingCoeffNth) ⟨_, ⟨0, rfl⟩⟩ have hm : M ∈ Set.range I.leadingCoeffNth := WellFounded.min_mem _ _ _ let ⟨N, HN⟩ := hm let ⟨s, hs⟩ := I.is_fg_degreeLE N have hm2 : ∀ k, I.leadingCoeffNth k ≤ M := fun k => Or.casesOn (le_or_gt k N) (fun h => HN ▸ I.leadingCoeffNth_mono h) fun h _ hx => Classical.by_contradiction fun hxm => haveI : IsNoetherian R R := inst have : ¬M < I.leadingCoeffNth k := by refine WellFounded.not_lt_min inst.wf _ _ ?_; exact ⟨k, rfl⟩ this ⟨HN ▸ I.leadingCoeffNth_mono (le_of_lt h), fun H => hxm (H hx)⟩ have hs2 : ∀ {x}, x ∈ I.degreeLE N → x ∈ Ideal.span (↑s : Set R[X]) := hs ▸ fun hx => Submodule.span_induction (hx := hx) (fun _ hx => Ideal.subset_span hx) (Ideal.zero_mem _) (fun _ _ _ _ => Ideal.add_mem _) fun c f _ hf => f.C_mul' c ▸ Ideal.mul_mem_left _ _ hf ⟨s, le_antisymm (Ideal.span_le.2 fun x hx => have : x ∈ I.degreeLE N := hs ▸ Submodule.subset_span hx this.2) <| by have : Submodule.span R[X] ↑s = Ideal.span ↑s := rfl rw [this] intro p hp generalize hn : p.natDegree = k induction k using Nat.strong_induction_on generalizing p with | _ k ih rcases le_or_gt k N with h | h · subst k refine hs2 ⟨Polynomial.mem_degreeLE.2 (le_trans Polynomial.degree_le_natDegree <| WithBot.coe_le_coe.2 h), hp⟩ · have hp0 : p ≠ 0 := by rintro rfl cases hn exact Nat.not_lt_zero _ h have : (0 : R) ≠ 1 := by intro h apply hp0 ext i refine (mul_one _).symm.trans ?_ rw [← h, mul_zero] rfl haveI : Nontrivial R := ⟨⟨0, 1, this⟩⟩ have : p.leadingCoeff ∈ I.leadingCoeffNth N := by rw [HN] exact hm2 k ((I.mem_leadingCoeffNth _ _).2 ⟨_, hp, hn ▸ Polynomial.degree_le_natDegree, rfl⟩) rw [I.mem_leadingCoeffNth] at this rcases this with ⟨q, hq, hdq, hlqp⟩ have hq0 : q ≠ 0 := by intro H rw [← Polynomial.leadingCoeff_eq_zero] at H ...
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
Polynomial.isNoetherianRing
**Hilbert basis theorem**: a polynomial ring over a Noetherian ring is a Noetherian ring.
linearIndependent_powers_iff_aeval (f : M →ₗ[R] M) (v : M) : (LinearIndependent R fun n : ℕ => (f ^ n) v) ↔ ∀ p : R[X], aeval f p v = 0 → p = 0 := by rw [linearIndependent_iff] simp only [Finsupp.linearCombination_apply, aeval_endomorphism, forall_iff_forall_finsupp, ofFinsupp_eq_zero] exact Iff.rfl
theorem
RingTheory
[ "Mathlib.Algebra.CharP.Defs", "Mathlib.Algebra.MvPolynomial.CommRing", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.Algebra.Polynomial.BigOperators", "Mathlib.Algebra.Ring.GeomSum", "Mathlib.RingTheory.Noetherian.Basic" ]
Mathlib/RingTheory/Polynomial/Basic.lean
linearIndependent_powers_iff_aeval
null