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 ⌀ |
|---|---|---|---|---|---|---|
comap_taylorEquiv_degreeLT : (R[X]_n).comap (taylorEquiv r) = R[X]_n := by
ext; simp [taylorEquiv] | lemma | RingTheory | [
"Mathlib.Algebra.Polynomial.Div",
"Mathlib.Algebra.Polynomial.Taylor",
"Mathlib.LinearAlgebra.Determinant",
"Mathlib.LinearAlgebra.Matrix.Block",
"Mathlib.RingTheory.Polynomial.Basic"
] | Mathlib/RingTheory/Polynomial/DegreeLT.lean | comap_taylorEquiv_degreeLT | null |
map_taylorEquiv_degreeLT : (R[X]_n).map (taylorEquiv r) = R[X]_n := by
nth_rw 1 [← comap_taylorEquiv_degreeLT (r := r),
Submodule.map_comap_eq_of_surjective (taylorEquiv r).surjective] | lemma | RingTheory | [
"Mathlib.Algebra.Polynomial.Div",
"Mathlib.Algebra.Polynomial.Taylor",
"Mathlib.LinearAlgebra.Determinant",
"Mathlib.LinearAlgebra.Matrix.Block",
"Mathlib.RingTheory.Polynomial.Basic"
] | Mathlib/RingTheory/Polynomial/DegreeLT.lean | map_taylorEquiv_degreeLT | null |
@[simps! apply_coe]
noncomputable taylorLinearEquiv (r : R) (n : ℕ) : R[X]_n ≃ₗ[R] R[X]_n :=
(taylorEquiv r : R[X] ≃ₗ[R] R[X]).ofSubmodules _ _ map_taylorEquiv_degreeLT
@[simp] lemma taylorLinearEquiv_symm (r : R) :
(taylorLinearEquiv r n).symm = taylorLinearEquiv (-r) n :=
LinearEquiv.ext <| fun _ ↦ rfl
@[simp] theorem det_taylorLinearEquiv_toLinearMap :
(taylorLinearEquiv r n).toLinearMap.det = 1 := by
nontriviality R
rw [← LinearMap.det_toMatrix (degreeLT.basis R n),
Matrix.det_of_upperTriangular, Fintype.prod_eq_one]
· intro i
rw [LinearMap.toMatrix_apply, degreeLT.basis_repr, ← natDegree_X_pow (R := R) (i : ℕ)]
change (taylor r (degreeLT.basis R n i)).coeff _ = 1
rw [degreeLT.basis_val, coeff_taylor_natDegree, leadingCoeff_X_pow]
· intro i j hji
rw [LinearMap.toMatrix_apply, LinearEquiv.coe_coe, degreeLT.basis_repr]
change (taylor r (degreeLT.basis R n j)).coeff i = 0
rw [degreeLT.basis_val, coeff_eq_zero_of_degree_lt (by simpa [-taylor_X_pow, -taylor_pow])]
@[simp] theorem det_taylorLinearEquiv :
(taylorLinearEquiv r n).det = 1 :=
Units.ext <| by rw [LinearEquiv.coe_det, det_taylorLinearEquiv_toLinearMap, Units.val_one] | def | RingTheory | [
"Mathlib.Algebra.Polynomial.Div",
"Mathlib.Algebra.Polynomial.Taylor",
"Mathlib.LinearAlgebra.Determinant",
"Mathlib.LinearAlgebra.Matrix.Block",
"Mathlib.RingTheory.Polynomial.Basic"
] | Mathlib/RingTheory/Polynomial/DegreeLT.lean | taylorLinearEquiv | The map `taylor r` induces an automorphism of the module `R[X]_n` of polynomials of
degree `< n`. |
noncomputable dickson : ℕ → R[X]
| 0 => 3 - k
| 1 => X
| n + 2 => X * dickson (n + 1) - C a * dickson n
@[simp] | def | RingTheory | [
"Mathlib.Algebra.CharP.Algebra",
"Mathlib.Algebra.CharP.Invertible",
"Mathlib.Algebra.CharP.Lemmas",
"Mathlib.Algebra.EuclideanDomain.Field",
"Mathlib.Algebra.Field.ZMod",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.RingTheory.Polynomial.Chebyshev"
] | Mathlib/RingTheory/Polynomial/Dickson.lean | dickson | `dickson` is the `n`-th (generalised) Dickson polynomial of the `k`-th kind associated to the
element `a ∈ R`. |
dickson_zero : dickson k a 0 = 3 - k :=
rfl
@[simp] | theorem | RingTheory | [
"Mathlib.Algebra.CharP.Algebra",
"Mathlib.Algebra.CharP.Invertible",
"Mathlib.Algebra.CharP.Lemmas",
"Mathlib.Algebra.EuclideanDomain.Field",
"Mathlib.Algebra.Field.ZMod",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.RingTheory.Polynomial.Chebyshev"
] | Mathlib/RingTheory/Polynomial/Dickson.lean | dickson_zero | null |
dickson_one : dickson k a 1 = X :=
rfl | theorem | RingTheory | [
"Mathlib.Algebra.CharP.Algebra",
"Mathlib.Algebra.CharP.Invertible",
"Mathlib.Algebra.CharP.Lemmas",
"Mathlib.Algebra.EuclideanDomain.Field",
"Mathlib.Algebra.Field.ZMod",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.RingTheory.Polynomial.Chebyshev"
] | Mathlib/RingTheory/Polynomial/Dickson.lean | dickson_one | null |
dickson_two : dickson k a 2 = X ^ 2 - C a * (3 - k : R[X]) := by
simp only [dickson, sq]
@[simp] | theorem | RingTheory | [
"Mathlib.Algebra.CharP.Algebra",
"Mathlib.Algebra.CharP.Invertible",
"Mathlib.Algebra.CharP.Lemmas",
"Mathlib.Algebra.EuclideanDomain.Field",
"Mathlib.Algebra.Field.ZMod",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.RingTheory.Polynomial.Chebyshev"
] | Mathlib/RingTheory/Polynomial/Dickson.lean | dickson_two | null |
dickson_add_two (n : ℕ) :
dickson k a (n + 2) = X * dickson k a (n + 1) - C a * dickson k a n := by rw [dickson] | theorem | RingTheory | [
"Mathlib.Algebra.CharP.Algebra",
"Mathlib.Algebra.CharP.Invertible",
"Mathlib.Algebra.CharP.Lemmas",
"Mathlib.Algebra.EuclideanDomain.Field",
"Mathlib.Algebra.Field.ZMod",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.RingTheory.Polynomial.Chebyshev"
] | Mathlib/RingTheory/Polynomial/Dickson.lean | dickson_add_two | null |
dickson_of_two_le {n : ℕ} (h : 2 ≤ n) :
dickson k a n = X * dickson k a (n - 1) - C a * dickson k a (n - 2) := by
obtain ⟨n, rfl⟩ := Nat.exists_eq_add_of_le h
rw [add_comm]
exact dickson_add_two k a n
variable {k a} | theorem | RingTheory | [
"Mathlib.Algebra.CharP.Algebra",
"Mathlib.Algebra.CharP.Invertible",
"Mathlib.Algebra.CharP.Lemmas",
"Mathlib.Algebra.EuclideanDomain.Field",
"Mathlib.Algebra.Field.ZMod",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.RingTheory.Polynomial.Chebyshev"
] | Mathlib/RingTheory/Polynomial/Dickson.lean | dickson_of_two_le | null |
map_dickson (f : R →+* S) : ∀ n : ℕ, map f (dickson k a n) = dickson k (f a) n
| 0 => by
simp_rw [dickson_zero, Polynomial.map_sub, Polynomial.map_natCast, Polynomial.map_ofNat]
| 1 => by simp only [dickson_one, map_X]
| n + 2 => by
simp only [dickson_add_two, Polynomial.map_sub, Polynomial.map_mul, map_X, map_C]
rw [map_dickson f n, map_dickson f (n + 1)]
@[simp] | theorem | RingTheory | [
"Mathlib.Algebra.CharP.Algebra",
"Mathlib.Algebra.CharP.Invertible",
"Mathlib.Algebra.CharP.Lemmas",
"Mathlib.Algebra.EuclideanDomain.Field",
"Mathlib.Algebra.Field.ZMod",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.RingTheory.Polynomial.Chebyshev"
] | Mathlib/RingTheory/Polynomial/Dickson.lean | map_dickson | null |
dickson_two_zero : ∀ n : ℕ, dickson 2 (0 : R) n = X ^ n
| 0 => by
simp only [dickson_zero, pow_zero]
norm_num
| 1 => by simp only [dickson_one, pow_one]
| n + 2 => by
simp only [dickson_add_two, C_0, zero_mul, sub_zero]
rw [dickson_two_zero (n + 1), pow_add X (n + 1) 1, mul_comm, pow_one] | theorem | RingTheory | [
"Mathlib.Algebra.CharP.Algebra",
"Mathlib.Algebra.CharP.Invertible",
"Mathlib.Algebra.CharP.Lemmas",
"Mathlib.Algebra.EuclideanDomain.Field",
"Mathlib.Algebra.Field.ZMod",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.RingTheory.Polynomial.Chebyshev"
] | Mathlib/RingTheory/Polynomial/Dickson.lean | dickson_two_zero | null |
dickson_one_one_eval_add_inv (x y : R) (h : x * y = 1) :
∀ n, (dickson 1 (1 : R) n).eval (x + y) = x ^ n + y ^ n
| 0 => by
simp only [pow_zero, dickson_zero]; norm_num
| 1 => by simp only [eval_X, dickson_one, pow_one]
| n + 2 => by
simp only [eval_sub, eval_mul, dickson_one_one_eval_add_inv x y h _, eval_X, dickson_add_two,
C_1, eval_one]
conv_lhs => simp only [pow_succ', add_mul, mul_add, h, ← mul_assoc, mul_comm y x, one_mul]
ring
variable (R) | theorem | RingTheory | [
"Mathlib.Algebra.CharP.Algebra",
"Mathlib.Algebra.CharP.Invertible",
"Mathlib.Algebra.CharP.Lemmas",
"Mathlib.Algebra.EuclideanDomain.Field",
"Mathlib.Algebra.Field.ZMod",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.RingTheory.Polynomial.Chebyshev"
] | Mathlib/RingTheory/Polynomial/Dickson.lean | dickson_one_one_eval_add_inv | null |
private two_mul_C_half_eq_one [Invertible (2 : R)] : 2 * C (⅟2 : R) = 1 := by
rw [two_mul, ← C_add, invOf_two_add_invOf_two, C_1] | theorem | RingTheory | [
"Mathlib.Algebra.CharP.Algebra",
"Mathlib.Algebra.CharP.Invertible",
"Mathlib.Algebra.CharP.Lemmas",
"Mathlib.Algebra.EuclideanDomain.Field",
"Mathlib.Algebra.Field.ZMod",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.RingTheory.Polynomial.Chebyshev"
] | Mathlib/RingTheory/Polynomial/Dickson.lean | two_mul_C_half_eq_one | null |
private C_half_mul_two_eq_one [Invertible (2 : R)] : C (⅟2 : R) * 2 = 1 := by
rw [mul_comm, two_mul_C_half_eq_one] | theorem | RingTheory | [
"Mathlib.Algebra.CharP.Algebra",
"Mathlib.Algebra.CharP.Invertible",
"Mathlib.Algebra.CharP.Lemmas",
"Mathlib.Algebra.EuclideanDomain.Field",
"Mathlib.Algebra.Field.ZMod",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.RingTheory.Polynomial.Chebyshev"
] | Mathlib/RingTheory/Polynomial/Dickson.lean | C_half_mul_two_eq_one | null |
dickson_one_one_eq_chebyshev_C : ∀ n, dickson 1 (1 : R) n = Chebyshev.C R n
| 0 => by
simp only [dickson_zero]
norm_num
| 1 => by
rw [dickson_one, Nat.cast_one, Chebyshev.C_one]
| n + 2 => by
rw [dickson_add_two, C_1, Nat.cast_add, Nat.cast_two, Chebyshev.C_add_two,
dickson_one_one_eq_chebyshev_C (n + 1), dickson_one_one_eq_chebyshev_C n]
push_cast
ring | theorem | RingTheory | [
"Mathlib.Algebra.CharP.Algebra",
"Mathlib.Algebra.CharP.Invertible",
"Mathlib.Algebra.CharP.Lemmas",
"Mathlib.Algebra.EuclideanDomain.Field",
"Mathlib.Algebra.Field.ZMod",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.RingTheory.Polynomial.Chebyshev"
] | Mathlib/RingTheory/Polynomial/Dickson.lean | dickson_one_one_eq_chebyshev_C | null |
dickson_one_one_eq_chebyshev_T [Invertible (2 : R)] (n : ℕ) :
dickson 1 (1 : R) n = 2 * (Chebyshev.T R n).comp (C (⅟2) * X) :=
(dickson_one_one_eq_chebyshev_C R n).trans (Chebyshev.C_eq_two_mul_T_comp_half_mul_X R n) | theorem | RingTheory | [
"Mathlib.Algebra.CharP.Algebra",
"Mathlib.Algebra.CharP.Invertible",
"Mathlib.Algebra.CharP.Lemmas",
"Mathlib.Algebra.EuclideanDomain.Field",
"Mathlib.Algebra.Field.ZMod",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.RingTheory.Polynomial.Chebyshev"
] | Mathlib/RingTheory/Polynomial/Dickson.lean | dickson_one_one_eq_chebyshev_T | null |
chebyshev_T_eq_dickson_one_one [Invertible (2 : R)] (n : ℕ) :
Chebyshev.T R n = C (⅟2) * (dickson 1 1 n).comp (2 * X) :=
dickson_one_one_eq_chebyshev_C R n ▸ Chebyshev.T_eq_half_mul_C_comp_two_mul_X R n | theorem | RingTheory | [
"Mathlib.Algebra.CharP.Algebra",
"Mathlib.Algebra.CharP.Invertible",
"Mathlib.Algebra.CharP.Lemmas",
"Mathlib.Algebra.EuclideanDomain.Field",
"Mathlib.Algebra.Field.ZMod",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.RingTheory.Polynomial.Chebyshev"
] | Mathlib/RingTheory/Polynomial/Dickson.lean | chebyshev_T_eq_dickson_one_one | null |
dickson_two_one_eq_chebyshev_S : ∀ n, dickson 2 (1 : R) n = Chebyshev.S R n
| 0 => by
simp only [dickson_zero]
norm_num
| 1 => by
rw [dickson_one, Nat.cast_one, Chebyshev.S_one]
| n + 2 => by
rw [dickson_add_two, C_1, Nat.cast_add, Nat.cast_two, Chebyshev.S_add_two,
dickson_two_one_eq_chebyshev_S (n + 1), dickson_two_one_eq_chebyshev_S n]
push_cast
ring | theorem | RingTheory | [
"Mathlib.Algebra.CharP.Algebra",
"Mathlib.Algebra.CharP.Invertible",
"Mathlib.Algebra.CharP.Lemmas",
"Mathlib.Algebra.EuclideanDomain.Field",
"Mathlib.Algebra.Field.ZMod",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.RingTheory.Polynomial.Chebyshev"
] | Mathlib/RingTheory/Polynomial/Dickson.lean | dickson_two_one_eq_chebyshev_S | null |
dickson_two_one_eq_chebyshev_U [Invertible (2 : R)] (n : ℕ) :
dickson 2 (1 : R) n = (Chebyshev.U R n).comp (C (⅟2) * X) :=
(dickson_two_one_eq_chebyshev_S R n).trans (Chebyshev.S_eq_U_comp_half_mul_X R n) | theorem | RingTheory | [
"Mathlib.Algebra.CharP.Algebra",
"Mathlib.Algebra.CharP.Invertible",
"Mathlib.Algebra.CharP.Lemmas",
"Mathlib.Algebra.EuclideanDomain.Field",
"Mathlib.Algebra.Field.ZMod",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.RingTheory.Polynomial.Chebyshev"
] | Mathlib/RingTheory/Polynomial/Dickson.lean | dickson_two_one_eq_chebyshev_U | null |
chebyshev_U_eq_dickson_two_one (n : ℕ) :
Chebyshev.U R n = (dickson 2 (1 : R) n).comp (2 * X) :=
dickson_two_one_eq_chebyshev_S R n ▸ (Chebyshev.S_comp_two_mul_X R n).symm | theorem | RingTheory | [
"Mathlib.Algebra.CharP.Algebra",
"Mathlib.Algebra.CharP.Invertible",
"Mathlib.Algebra.CharP.Lemmas",
"Mathlib.Algebra.EuclideanDomain.Field",
"Mathlib.Algebra.Field.ZMod",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.RingTheory.Polynomial.Chebyshev"
] | Mathlib/RingTheory/Polynomial/Dickson.lean | chebyshev_U_eq_dickson_two_one | null |
dickson_one_one_mul (m n : ℕ) :
dickson 1 (1 : R) (m * n) = (dickson 1 1 m).comp (dickson 1 1 n) := by
have h : (1 : R) = Int.castRingHom R 1 := by simp only [eq_intCast, Int.cast_one]
rw [h]
simp only [← map_dickson (Int.castRingHom R), ← map_comp]
congr 1
apply map_injective (Int.castRingHom ℚ) Int.cast_injective
simp only [map_dickson, map_comp, eq_intCast, Int.cast_one, dickson_one_one_eq_chebyshev_T,
Nat.cast_mul, Chebyshev.T_mul, two_mul, ← add_comp]
simp only [← two_mul, ← comp_assoc]
apply eval₂_congr rfl rfl
rw [comp_assoc]
apply eval₂_congr rfl _ rfl
rw [mul_comp, C_comp, X_comp, ← mul_assoc, C_half_mul_two_eq_one, one_mul] | theorem | RingTheory | [
"Mathlib.Algebra.CharP.Algebra",
"Mathlib.Algebra.CharP.Invertible",
"Mathlib.Algebra.CharP.Lemmas",
"Mathlib.Algebra.EuclideanDomain.Field",
"Mathlib.Algebra.Field.ZMod",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.RingTheory.Polynomial.Chebyshev"
] | Mathlib/RingTheory/Polynomial/Dickson.lean | dickson_one_one_mul | The `(m * n)`-th Dickson polynomial of the first kind is the composition of the `m`-th and
`n`-th. |
dickson_one_one_comp_comm (m n : ℕ) :
(dickson 1 (1 : R) m).comp (dickson 1 1 n) = (dickson 1 1 n).comp (dickson 1 1 m) := by
rw [← dickson_one_one_mul, mul_comm, dickson_one_one_mul] | theorem | RingTheory | [
"Mathlib.Algebra.CharP.Algebra",
"Mathlib.Algebra.CharP.Invertible",
"Mathlib.Algebra.CharP.Lemmas",
"Mathlib.Algebra.EuclideanDomain.Field",
"Mathlib.Algebra.Field.ZMod",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.RingTheory.Polynomial.Chebyshev"
] | Mathlib/RingTheory/Polynomial/Dickson.lean | dickson_one_one_comp_comm | null |
dickson_one_one_zmod_p (p : ℕ) [Fact p.Prime] : dickson 1 (1 : ZMod p) p = X ^ p := by
obtain ⟨K, _, _, H⟩ : ∃ (K : Type) (_ : Field K), ∃ _ : CharP K p, Infinite K := by
let K := FractionRing (Polynomial (ZMod p))
let f : ZMod p →+* K := (algebraMap _ (FractionRing _)).comp C
have : CharP K p := by
rw [← f.charP_iff_charP]
infer_instance
haveI : Infinite K :=
Infinite.of_injective (algebraMap (Polynomial (ZMod p)) (FractionRing (Polynomial (ZMod p))))
(IsFractionRing.injective _ _)
refine ⟨K, ?_, ?_, ?_⟩ <;> infer_instance
apply map_injective (ZMod.castHom (dvd_refl p) K) (RingHom.injective _)
rw [map_dickson, Polynomial.map_pow, map_X]
apply eq_of_infinite_eval_eq
apply @Set.Infinite.mono _ { x : K | ∃ y, x = y + y⁻¹ ∧ y ≠ 0 }
· rintro _ ⟨x, rfl, hx⟩
simp only [eval_X, eval_pow, Set.mem_setOf_eq, ZMod.cast_one', add_pow_char,
dickson_one_one_eval_add_inv _ _ (mul_inv_cancel₀ hx), ZMod.castHom_apply]
· intro h
rw [← Set.infinite_univ_iff] at H
apply H
suffices (Set.univ : Set K) =
⋃ x ∈ { x : K | ∃ y : K, x = y + y⁻¹ ∧ y ≠ 0 }, { y | x = y + y⁻¹ ∨ y = 0 } by
rw [this]
clear this
refine h.biUnion fun x _ => ?_
let φ : K[X] := X ^ 2 - C x * X + 1
have hφ : φ ≠ 0 := by
intro H
have : φ.eval 0 = 0 := by rw [H, eval_zero]
simpa [φ, eval_X, eval_one, eval_pow, eval_sub, sub_zero, eval_add, eval_mul,
mul_zero, sq, zero_add, one_ne_zero]
classical
convert (φ.roots ∪ {0}).toFinset.finite_toSet using 1
ext1 y
simp only [φ, Multiset.mem_toFinset, Set.mem_setOf_eq, Finset.mem_coe, Multiset.mem_union,
mem_roots hφ, IsRoot, eval_add, eval_sub, eval_pow, eval_mul, eval_X, eval_C, eval_one,
Multiset.mem_singleton]
by_cases hy : y = 0
· simp only [hy, or_true]
apply or_congr _ Iff.rfl
rw [← mul_left_inj' hy, eq_comm, ← sub_eq_zero, add_mul, inv_mul_cancel₀ hy]
apply eq_iff_eq_cancel_right.mpr
ring
apply (Set.eq_univ_of_forall _).symm
intro x
simp only [exists_prop, Set.mem_iUnion, Ne, Set.mem_setOf_eq]
by_cases hx : x = 0
· simp only [hx, and_true, inv_zero, or_true]
exact ⟨_, 1, rfl, one_ne_zero⟩
· simp only [hx, or_false, exists_eq_right]
... | theorem | RingTheory | [
"Mathlib.Algebra.CharP.Algebra",
"Mathlib.Algebra.CharP.Invertible",
"Mathlib.Algebra.CharP.Lemmas",
"Mathlib.Algebra.EuclideanDomain.Field",
"Mathlib.Algebra.Field.ZMod",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.RingTheory.Polynomial.Chebyshev"
] | Mathlib/RingTheory/Polynomial/Dickson.lean | dickson_one_one_zmod_p | null |
dickson_one_one_charP (p : ℕ) [Fact p.Prime] [CharP R p] : dickson 1 (1 : R) p = X ^ p := by
have h : (1 : R) = ZMod.castHom (dvd_refl p) R 1 := by
simp only [ZMod.castHom_apply, ZMod.cast_one']
rw [h, ← map_dickson (ZMod.castHom (dvd_refl p) R), dickson_one_one_zmod_p, Polynomial.map_pow,
map_X] | theorem | RingTheory | [
"Mathlib.Algebra.CharP.Algebra",
"Mathlib.Algebra.CharP.Invertible",
"Mathlib.Algebra.CharP.Lemmas",
"Mathlib.Algebra.EuclideanDomain.Field",
"Mathlib.Algebra.Field.ZMod",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.RingTheory.Polynomial.Chebyshev"
] | Mathlib/RingTheory/Polynomial/Dickson.lean | dickson_one_one_charP | null |
integralClosure.mem_lifts_of_monic_of_dvd_map {f : R[X]} (hf : f.Monic) {g : K[X]}
(hg : g.Monic) (hd : g ∣ f.map (algebraMap R K)) :
g ∈ lifts (algebraMap (integralClosure R K) K) := by
have := mem_lift_of_splits_of_roots_mem_range (integralClosure R g.SplittingField)
((splits_id_iff_splits _).2 <| SplittingField.splits g) (hg.map _) fun a ha =>
(SetLike.ext_iff.mp (integralClosure R g.SplittingField).range_algebraMap _).mpr <|
roots_mem_integralClosure hf ?_
· rw [lifts_iff_coeff_lifts, ← RingHom.coe_range, Subalgebra.range_algebraMap] at this
refine (lifts_iff_coeff_lifts _).2 fun n => ?_
rw [← RingHom.coe_range, Subalgebra.range_algebraMap]
obtain ⟨p, hp, he⟩ := SetLike.mem_coe.mp (this n); use p, hp
rw [IsScalarTower.algebraMap_eq R K, coeff_map, ← eval₂_map, eval₂_at_apply] at he
rw [eval₂_eq_eval_map]; apply (injective_iff_map_eq_zero _).1 _ _ he
apply RingHom.injective
rw [aroots_def, IsScalarTower.algebraMap_eq R K _, ← map_map]
refine Multiset.mem_of_le (roots.le_of_dvd ((hf.map _).map _).ne_zero ?_) ha
exact map_dvd (algebraMap K g.SplittingField) hd
variable [IsFractionRing R K] | theorem | RingTheory | [
"Mathlib.FieldTheory.SplittingField.Construction",
"Mathlib.RingTheory.Localization.Integral",
"Mathlib.RingTheory.IntegralClosure.IntegrallyClosed",
"Mathlib.RingTheory.Polynomial.Content"
] | Mathlib/RingTheory/Polynomial/GaussLemma.lean | integralClosure.mem_lifts_of_monic_of_dvd_map | null |
IsIntegrallyClosed.eq_map_mul_C_of_dvd [IsIntegrallyClosed R] {f : R[X]} (hf : f.Monic)
{g : K[X]} (hg : g ∣ f.map (algebraMap R K)) :
∃ g' : R[X], g'.map (algebraMap R K) * (C <| leadingCoeff g) = g := by
have g_ne_0 : g ≠ 0 := ne_zero_of_dvd_ne_zero (Monic.ne_zero <| hf.map (algebraMap R K)) hg
suffices lem : ∃ g' : R[X], g'.map (algebraMap R K) = g * C g.leadingCoeff⁻¹ by
obtain ⟨g', hg'⟩ := lem
use g'
rw [hg', mul_assoc, ← C_mul, inv_mul_cancel₀ (leadingCoeff_ne_zero.mpr g_ne_0), C_1, mul_one]
have g_mul_dvd : g * C g.leadingCoeff⁻¹ ∣ f.map (algebraMap R K) := by
rwa [Associated.dvd_iff_dvd_left (show Associated (g * C g.leadingCoeff⁻¹) g from _)]
rw [associated_mul_isUnit_left_iff]
exact isUnit_C.mpr (inv_ne_zero <| leadingCoeff_ne_zero.mpr g_ne_0).isUnit
let algeq :=
(Subalgebra.equivOfEq _ _ <| integralClosure_eq_bot R _).trans
(Algebra.botEquivOfInjective <| IsFractionRing.injective R <| K)
have :
(algebraMap R _).comp algeq.toAlgHom.toRingHom = (integralClosure R _).toSubring.subtype := by
ext x; (conv_rhs => rw [← algeq.symm_apply_apply x]); rfl
have H :=
(mem_lifts _).1
(integralClosure.mem_lifts_of_monic_of_dvd_map K hf (monic_mul_leadingCoeff_inv g_ne_0)
g_mul_dvd)
refine ⟨map algeq.toAlgHom.toRingHom ?_, ?_⟩
· use! Classical.choose H
· rw [map_map, this]
exact Classical.choose_spec H | theorem | RingTheory | [
"Mathlib.FieldTheory.SplittingField.Construction",
"Mathlib.RingTheory.Localization.Integral",
"Mathlib.RingTheory.IntegralClosure.IntegrallyClosed",
"Mathlib.RingTheory.Polynomial.Content"
] | Mathlib/RingTheory/Polynomial/GaussLemma.lean | IsIntegrallyClosed.eq_map_mul_C_of_dvd | If `K = Frac(R)` and `g : K[X]` divides a monic polynomial with coefficients in `R`, then
`g * (C g.leadingCoeff⁻¹)` has coefficients in `R` |
IsPrimitive.isUnit_iff_isUnit_map_of_injective : IsUnit f ↔ IsUnit (map φ f) := by
refine ⟨(mapRingHom φ).isUnit_map, fun h => ?_⟩
rcases isUnit_iff.1 h with ⟨_, ⟨u, rfl⟩, hu⟩
have hdeg := degree_C u.ne_zero
rw [hu, degree_map_eq_of_injective hinj] at hdeg
rw [eq_C_of_degree_eq_zero hdeg] at hf ⊢
exact isUnit_C.mpr (isPrimitive_iff_isUnit_of_C_dvd.mp hf (f.coeff 0) dvd_rfl) | theorem | RingTheory | [
"Mathlib.FieldTheory.SplittingField.Construction",
"Mathlib.RingTheory.Localization.Integral",
"Mathlib.RingTheory.IntegralClosure.IntegrallyClosed",
"Mathlib.RingTheory.Polynomial.Content"
] | Mathlib/RingTheory/Polynomial/GaussLemma.lean | IsPrimitive.isUnit_iff_isUnit_map_of_injective | null |
IsPrimitive.irreducible_of_irreducible_map_of_injective (h_irr : Irreducible (map φ f)) :
Irreducible f := by
refine
⟨fun h => h_irr.not_isUnit (IsUnit.map (mapRingHom φ) h), fun a b h =>
(h_irr.isUnit_or_isUnit <| by rw [h, Polynomial.map_mul]).imp ?_ ?_⟩
all_goals apply ((isPrimitive_of_dvd hf _).isUnit_iff_isUnit_map_of_injective hinj).mpr
exacts [Dvd.intro _ h.symm, Dvd.intro_left _ h.symm] | theorem | RingTheory | [
"Mathlib.FieldTheory.SplittingField.Construction",
"Mathlib.RingTheory.Localization.Integral",
"Mathlib.RingTheory.IntegralClosure.IntegrallyClosed",
"Mathlib.RingTheory.Polynomial.Content"
] | Mathlib/RingTheory/Polynomial/GaussLemma.lean | IsPrimitive.irreducible_of_irreducible_map_of_injective | null |
IsPrimitive.isUnit_iff_isUnit_map {p : R[X]} (hp : p.IsPrimitive) :
IsUnit p ↔ IsUnit (p.map (algebraMap R K)) :=
hp.isUnit_iff_isUnit_map_of_injective (IsFractionRing.injective _ _) | theorem | RingTheory | [
"Mathlib.FieldTheory.SplittingField.Construction",
"Mathlib.RingTheory.Localization.Integral",
"Mathlib.RingTheory.IntegralClosure.IntegrallyClosed",
"Mathlib.RingTheory.Polynomial.Content"
] | Mathlib/RingTheory/Polynomial/GaussLemma.lean | IsPrimitive.isUnit_iff_isUnit_map | null |
Monic.irreducible_iff_irreducible_map_fraction_map [IsIntegrallyClosed R] {p : R[X]}
(h : p.Monic) : Irreducible p ↔ Irreducible (p.map <| algebraMap R K) := by
/- The ← direction follows from `IsPrimitive.irreducible_of_irreducible_map_of_injective`.
For the → direction, it is enough to show that if `(p.map <| algebraMap R K) = a * b` and
`a` is not a unit then `b` is a unit -/
refine
⟨fun hp =>
irreducible_iff.mpr
⟨hp.not_isUnit.imp h.isPrimitive.isUnit_iff_isUnit_map.mpr, fun a b H =>
or_iff_not_imp_left.mpr fun hₐ => ?_⟩,
fun hp =>
h.isPrimitive.irreducible_of_irreducible_map_of_injective (IsFractionRing.injective R K) hp⟩
obtain ⟨a', ha⟩ := eq_map_mul_C_of_dvd K h (dvd_of_mul_right_eq b H.symm)
obtain ⟨b', hb⟩ := eq_map_mul_C_of_dvd K h (dvd_of_mul_left_eq a H.symm)
have : a.leadingCoeff * b.leadingCoeff = 1 := by
rw [← leadingCoeff_mul, ← H, Monic.leadingCoeff (h.map <| algebraMap R K)]
rw [← ha, ← hb, mul_comm _ (C b.leadingCoeff), mul_assoc, ← mul_assoc (C a.leadingCoeff), ←
C_mul, this, C_1, one_mul, ← Polynomial.map_mul] at H
rw [← hb, ← Polynomial.coe_mapRingHom]
refine
IsUnit.mul (IsUnit.map _ (Or.resolve_left (hp.isUnit_or_isUnit ?_) (show ¬IsUnit a' from ?_)))
(isUnit_iff_exists_inv'.mpr
(Exists.intro (C a.leadingCoeff) <| by rw [← C_mul, this, C_1]))
· exact Polynomial.map_injective _ (IsFractionRing.injective R K) H
· by_contra h_contra
refine hₐ ?_
rw [← ha, ← Polynomial.coe_mapRingHom]
exact
IsUnit.mul (IsUnit.map _ h_contra)
(isUnit_iff_exists_inv.mpr
(Exists.intro (C b.leadingCoeff) <| by rw [← C_mul, this, C_1])) | theorem | RingTheory | [
"Mathlib.FieldTheory.SplittingField.Construction",
"Mathlib.RingTheory.Localization.Integral",
"Mathlib.RingTheory.IntegralClosure.IntegrallyClosed",
"Mathlib.RingTheory.Polynomial.Content"
] | Mathlib/RingTheory/Polynomial/GaussLemma.lean | Monic.irreducible_iff_irreducible_map_fraction_map | **Gauss's Lemma** for integrally closed domains states that a monic polynomial is irreducible
iff it is irreducible in the fraction field. |
isIntegrallyClosed_iff' [IsDomain R] :
IsIntegrallyClosed R ↔
∀ p : R[X], p.Monic → (Irreducible p ↔ Irreducible (p.map <| algebraMap R K)) := by
constructor
· intro hR p hp; exact Monic.irreducible_iff_irreducible_map_fraction_map hp
· intro H
refine
(isIntegrallyClosed_iff K).mpr fun {x} hx =>
RingHom.mem_range.mp <| minpoly.mem_range_of_degree_eq_one R x ?_
rw [← Monic.degree_map (minpoly.monic hx) (algebraMap R K)]
apply
degree_eq_one_of_irreducible_of_root ((H _ <| minpoly.monic hx).mp (minpoly.irreducible hx))
rw [IsRoot, eval_map, ← aeval_def, minpoly.aeval R x] | theorem | RingTheory | [
"Mathlib.FieldTheory.SplittingField.Construction",
"Mathlib.RingTheory.Localization.Integral",
"Mathlib.RingTheory.IntegralClosure.IntegrallyClosed",
"Mathlib.RingTheory.Polynomial.Content"
] | Mathlib/RingTheory/Polynomial/GaussLemma.lean | isIntegrallyClosed_iff' | Integrally closed domains are precisely the domains for in which Gauss's lemma holds
for monic polynomials |
Monic.dvd_of_fraction_map_dvd_fraction_map [IsIntegrallyClosed R] {p q : R[X]}
(hp : p.Monic) (hq : q.Monic)
(h : q.map (algebraMap R K) ∣ p.map (algebraMap R K)) : q ∣ p := by
obtain ⟨r, hr⟩ := h
obtain ⟨d', hr'⟩ := IsIntegrallyClosed.eq_map_mul_C_of_dvd K hp (dvd_of_mul_left_eq _ hr.symm)
rw [Monic.leadingCoeff, C_1, mul_one] at hr'
· rw [← hr', ← Polynomial.map_mul] at hr
exact dvd_of_mul_right_eq _ (Polynomial.map_injective _ (IsFractionRing.injective R K) hr.symm)
· exact Monic.of_mul_monic_left (hq.map (algebraMap R K)) (by simpa [← hr] using hp.map _) | theorem | RingTheory | [
"Mathlib.FieldTheory.SplittingField.Construction",
"Mathlib.RingTheory.Localization.Integral",
"Mathlib.RingTheory.IntegralClosure.IntegrallyClosed",
"Mathlib.RingTheory.Polynomial.Content"
] | Mathlib/RingTheory/Polynomial/GaussLemma.lean | Monic.dvd_of_fraction_map_dvd_fraction_map | null |
Monic.dvd_iff_fraction_map_dvd_fraction_map [IsIntegrallyClosed R] {p q : R[X]}
(hp : p.Monic) (hq : q.Monic) : q.map (algebraMap R K) ∣ p.map (algebraMap R K) ↔ q ∣ p :=
⟨fun h => hp.dvd_of_fraction_map_dvd_fraction_map hq h, fun ⟨a, b⟩ =>
⟨a.map (algebraMap R K), b.symm ▸ Polynomial.map_mul (algebraMap R K)⟩⟩ | theorem | RingTheory | [
"Mathlib.FieldTheory.SplittingField.Construction",
"Mathlib.RingTheory.Localization.Integral",
"Mathlib.RingTheory.IntegralClosure.IntegrallyClosed",
"Mathlib.RingTheory.Polynomial.Content"
] | Mathlib/RingTheory/Polynomial/GaussLemma.lean | Monic.dvd_iff_fraction_map_dvd_fraction_map | null |
isUnit_or_eq_zero_of_isUnit_integerNormalization_primPart {p : K[X]} (h0 : p ≠ 0)
(h : IsUnit (integerNormalization R⁰ p).primPart) : IsUnit p := by
rcases isUnit_iff.1 h with ⟨_, ⟨u, rfl⟩, hu⟩
obtain ⟨⟨c, c0⟩, hc⟩ := integerNormalization_map_to_map R⁰ p
rw [Subtype.coe_mk, Algebra.smul_def, algebraMap_apply] at hc
apply isUnit_of_mul_isUnit_right
rw [← hc, (integerNormalization R⁰ p).eq_C_content_mul_primPart, ← hu, ← RingHom.map_mul,
isUnit_iff]
refine
⟨algebraMap R K ((integerNormalization R⁰ p).content * ↑u), isUnit_iff_ne_zero.2 fun con => ?_,
by simp⟩
replace con := (injective_iff_map_eq_zero (algebraMap R K)).1 (IsFractionRing.injective _ _) _ con
rw [mul_eq_zero, content_eq_zero_iff, IsFractionRing.integerNormalization_eq_zero_iff] at con
rcases con with (con | con)
· apply h0 con
· apply Units.ne_zero _ con | theorem | RingTheory | [
"Mathlib.FieldTheory.SplittingField.Construction",
"Mathlib.RingTheory.Localization.Integral",
"Mathlib.RingTheory.IntegralClosure.IntegrallyClosed",
"Mathlib.RingTheory.Polynomial.Content"
] | Mathlib/RingTheory/Polynomial/GaussLemma.lean | isUnit_or_eq_zero_of_isUnit_integerNormalization_primPart | null |
IsPrimitive.irreducible_iff_irreducible_map_fraction_map {p : R[X]} (hp : p.IsPrimitive) :
Irreducible p ↔ Irreducible (p.map (algebraMap R K)) := by
refine
⟨fun hi => ⟨fun h => hi.not_isUnit (hp.isUnit_iff_isUnit_map.2 h), fun a b hab => ?_⟩,
hp.irreducible_of_irreducible_map_of_injective (IsFractionRing.injective _ _)⟩
obtain ⟨⟨c, c0⟩, hc⟩ := integerNormalization_map_to_map R⁰ a
obtain ⟨⟨d, d0⟩, hd⟩ := integerNormalization_map_to_map R⁰ b
rw [Algebra.smul_def, algebraMap_apply, Subtype.coe_mk] at hc hd
rw [mem_nonZeroDivisors_iff_ne_zero] at c0 d0
have hcd0 : c * d ≠ 0 := mul_ne_zero c0 d0
rw [Ne, ← C_eq_zero] at hcd0
have h1 : C c * C d * p = integerNormalization R⁰ a * integerNormalization R⁰ b := by
apply map_injective (algebraMap R K) (IsFractionRing.injective _ _) _
rw [Polynomial.map_mul, Polynomial.map_mul, Polynomial.map_mul, hc, hd, map_C, map_C, hab]
ring
obtain ⟨u, hu⟩ :
Associated (c * d)
(content (integerNormalization R⁰ a) * content (integerNormalization R⁰ b)) := by
rw [← dvd_dvd_iff_associated, ← normalize_eq_normalize_iff, normalize.map_mul,
normalize.map_mul, normalize_content, normalize_content, ←
mul_one (normalize c * normalize d), ← hp.content_eq_one, ← content_C, ← content_C, ←
content_mul, ← content_mul, ← content_mul, h1]
rw [← RingHom.map_mul, eq_comm, (integerNormalization R⁰ a).eq_C_content_mul_primPart,
(integerNormalization R⁰ b).eq_C_content_mul_primPart, mul_assoc, mul_comm _ (C _ * _), ←
mul_assoc, ← mul_assoc, ← RingHom.map_mul, ← hu, RingHom.map_mul, mul_assoc, mul_assoc, ←
mul_assoc (C (u : R))] at h1
have h0 : a ≠ 0 ∧ b ≠ 0 := by
classical
rw [Ne, Ne, ← not_or, ← mul_eq_zero, ← hab]
intro con
apply hp.ne_zero (map_injective (algebraMap R K) (IsFractionRing.injective _ _) _)
simp [con]
rcases hi.isUnit_or_isUnit (mul_left_cancel₀ hcd0 h1).symm with (h | h)
· right
apply
isUnit_or_eq_zero_of_isUnit_integerNormalization_primPart h0.2
(isUnit_of_mul_isUnit_right h)
· left
apply isUnit_or_eq_zero_of_isUnit_integerNormalization_primPart h0.1 h | theorem | RingTheory | [
"Mathlib.FieldTheory.SplittingField.Construction",
"Mathlib.RingTheory.Localization.Integral",
"Mathlib.RingTheory.IntegralClosure.IntegrallyClosed",
"Mathlib.RingTheory.Polynomial.Content"
] | Mathlib/RingTheory/Polynomial/GaussLemma.lean | IsPrimitive.irreducible_iff_irreducible_map_fraction_map | **Gauss's Lemma** for GCD domains states that a primitive polynomial is irreducible iff it is
irreducible in the fraction field. |
IsPrimitive.dvd_of_fraction_map_dvd_fraction_map {p q : R[X]} (hp : p.IsPrimitive)
(hq : q.IsPrimitive) (h_dvd : p.map (algebraMap R K) ∣ q.map (algebraMap R K)) : p ∣ q := by
rcases h_dvd with ⟨r, hr⟩
obtain ⟨⟨s, s0⟩, hs⟩ := integerNormalization_map_to_map R⁰ r
rw [Subtype.coe_mk, Algebra.smul_def, algebraMap_apply] at hs
have h : p ∣ q * C s := by
use integerNormalization R⁰ r
apply map_injective (algebraMap R K) (IsFractionRing.injective _ _)
rw [Polynomial.map_mul, Polynomial.map_mul, hs, hr, mul_assoc, mul_comm r]
simp
rw [← hp.dvd_primPart_iff_dvd, primPart_mul, hq.primPart_eq, Associated.dvd_iff_dvd_right] at h
· exact h
· symm
rcases isUnit_primPart_C s with ⟨u, hu⟩
use u
rw [hu]
iterate 2
apply mul_ne_zero hq.ne_zero
rw [Ne, C_eq_zero]
contrapose! s0
simp [s0, mem_nonZeroDivisors_iff_ne_zero]
variable (K) | theorem | RingTheory | [
"Mathlib.FieldTheory.SplittingField.Construction",
"Mathlib.RingTheory.Localization.Integral",
"Mathlib.RingTheory.IntegralClosure.IntegrallyClosed",
"Mathlib.RingTheory.Polynomial.Content"
] | Mathlib/RingTheory/Polynomial/GaussLemma.lean | IsPrimitive.dvd_of_fraction_map_dvd_fraction_map | null |
IsPrimitive.dvd_iff_fraction_map_dvd_fraction_map {p q : R[X]} (hp : p.IsPrimitive)
(hq : q.IsPrimitive) : p ∣ q ↔ p.map (algebraMap R K) ∣ q.map (algebraMap R K) :=
⟨fun ⟨a, b⟩ => ⟨a.map (algebraMap R K), b.symm ▸ Polynomial.map_mul (algebraMap R K)⟩, fun h =>
hp.dvd_of_fraction_map_dvd_fraction_map hq h⟩ | theorem | RingTheory | [
"Mathlib.FieldTheory.SplittingField.Construction",
"Mathlib.RingTheory.Localization.Integral",
"Mathlib.RingTheory.IntegralClosure.IntegrallyClosed",
"Mathlib.RingTheory.Polynomial.Content"
] | Mathlib/RingTheory/Polynomial/GaussLemma.lean | IsPrimitive.dvd_iff_fraction_map_dvd_fraction_map | null |
IsPrimitive.Int.irreducible_iff_irreducible_map_cast {p : ℤ[X]} (hp : p.IsPrimitive) :
Irreducible p ↔ Irreducible (p.map (Int.castRingHom ℚ)) :=
hp.irreducible_iff_irreducible_map_fraction_map | theorem | RingTheory | [
"Mathlib.FieldTheory.SplittingField.Construction",
"Mathlib.RingTheory.Localization.Integral",
"Mathlib.RingTheory.IntegralClosure.IntegrallyClosed",
"Mathlib.RingTheory.Polynomial.Content"
] | Mathlib/RingTheory/Polynomial/GaussLemma.lean | IsPrimitive.Int.irreducible_iff_irreducible_map_cast | **Gauss's Lemma** for `ℤ` states that a primitive integer polynomial is irreducible iff it is
irreducible over `ℚ`. |
IsPrimitive.Int.dvd_iff_map_cast_dvd_map_cast (p q : ℤ[X]) (hp : p.IsPrimitive)
(hq : q.IsPrimitive) : p ∣ q ↔ p.map (Int.castRingHom ℚ) ∣ q.map (Int.castRingHom ℚ) :=
hp.dvd_iff_fraction_map_dvd_fraction_map ℚ hq | theorem | RingTheory | [
"Mathlib.FieldTheory.SplittingField.Construction",
"Mathlib.RingTheory.Localization.Integral",
"Mathlib.RingTheory.IntegralClosure.IntegrallyClosed",
"Mathlib.RingTheory.Polynomial.Content"
] | Mathlib/RingTheory/Polynomial/GaussLemma.lean | IsPrimitive.Int.dvd_iff_map_cast_dvd_map_cast | null |
gaussNorm : ℝ := if h : p.support.Nonempty then p.support.sup' h fun i ↦
(v (p.coeff i) * c ^ i) else 0
@[simp] | def | RingTheory | [
"Mathlib.RingTheory.PowerSeries.GaussNorm"
] | Mathlib/RingTheory/Polynomial/GaussNorm.lean | gaussNorm | Given a polynomial `p` in `R[X]`, a function `v : R → ℝ` and a real number `c`, the Gauss norm
is defined as the supremum of the set of all values of `v (p.coeff i) * c ^ i` for all `i` in the
support of `p`. |
gaussNorm_zero : gaussNorm v c 0 = 0 := by simp [gaussNorm] | lemma | RingTheory | [
"Mathlib.RingTheory.PowerSeries.GaussNorm"
] | Mathlib/RingTheory/Polynomial/GaussNorm.lean | gaussNorm_zero | null |
exists_eq_gaussNorm [ZeroHomClass F R ℝ] :
∃ i, p.gaussNorm v c = v (p.coeff i) * c ^ i := by
by_cases h_supp : p.support.Nonempty
· simp only [gaussNorm, h_supp]
obtain ⟨i, hi1, hi2⟩ := Finset.exists_mem_eq_sup' h_supp fun i ↦ (v (p.coeff i) * c ^ i)
exact ⟨i, hi2⟩
· simp_all
@[simp] | theorem | RingTheory | [
"Mathlib.RingTheory.PowerSeries.GaussNorm"
] | Mathlib/RingTheory/Polynomial/GaussNorm.lean | exists_eq_gaussNorm | null |
gaussNorm_C [ZeroHomClass F R ℝ] (r : R) : (C r).gaussNorm v c = v r := by
by_cases hr : r = 0 <;> simp [gaussNorm, support_C, hr]
@[simp] | lemma | RingTheory | [
"Mathlib.RingTheory.PowerSeries.GaussNorm"
] | Mathlib/RingTheory/Polynomial/GaussNorm.lean | gaussNorm_C | null |
gaussNorm_monomial [ZeroHomClass F R ℝ] (n : ℕ) (r : R) :
(monomial n r).gaussNorm v c = v r * c ^ n := by
by_cases hr : r = 0 <;> simp [gaussNorm, support_monomial, hr]
variable {c} | theorem | RingTheory | [
"Mathlib.RingTheory.PowerSeries.GaussNorm"
] | Mathlib/RingTheory/Polynomial/GaussNorm.lean | gaussNorm_monomial | null |
private sup'_nonneg_of_ne_zero [NonnegHomClass F R ℝ] {p : R[X]} (h : p.support.Nonempty)
(hc : 0 ≤ c) : 0 ≤ p.support.sup' h fun i ↦ (v (p.coeff i) * c ^ i) := by
simp only [Finset.le_sup'_iff, mem_support_iff]
use p.natDegree
simp_all only [support_nonempty, ne_eq, coeff_natDegree, leadingCoeff_eq_zero, not_false_eq_true,
true_and]
positivity | lemma | RingTheory | [
"Mathlib.RingTheory.PowerSeries.GaussNorm"
] | Mathlib/RingTheory/Polynomial/GaussNorm.lean | sup'_nonneg_of_ne_zero | null |
private aux_bdd [ZeroHomClass F R ℝ] : BddAbove {x | ∃ i, v (p.coeff i) * c ^ i = x} := by
let f : p.support → ℝ := fun i ↦ v (p.coeff i) * c ^ i.val
have h_fin : (f '' ⊤ ∪ {0}).Finite := by
apply Set.Finite.union _ <| Set.finite_singleton 0
apply Set.Finite.image f
rw [Set.top_eq_univ, Set.finite_univ_iff, ← @Finset.coe_sort_coe]
exact Finite.of_fintype p.support
apply Set.Finite.bddAbove <| Set.Finite.subset h_fin _
intro x hx
obtain ⟨i, hi⟩ := hx
rw [← hi]
by_cases hi : i ∈ p.support
· left
use ⟨i, hi⟩
simp [f]
· right
simp [Polynomial.notMem_support_iff.mp hi]
@[simp] | lemma | RingTheory | [
"Mathlib.RingTheory.PowerSeries.GaussNorm"
] | Mathlib/RingTheory/Polynomial/GaussNorm.lean | aux_bdd | null |
gaussNorm_coe_powerSeries [ZeroHomClass F R ℝ] [NonnegHomClass F R ℝ]
(hc : 0 ≤ c) : (p.toPowerSeries).gaussNorm v c = p.gaussNorm v c := by
by_cases hp : p = 0
· simp [hp]
· simp only [PowerSeries.gaussNorm, coeff_coe, gaussNorm, support_nonempty, ne_eq, hp,
not_false_eq_true, ↓reduceDIte]
apply le_antisymm
· apply ciSup_le
intro n
by_cases h : n ∈ p.support
· exact Finset.le_sup' (fun j ↦ v (p.coeff j) * c ^ j) h
· simp_all [sup'_nonneg_of_ne_zero v (support_nonempty.mpr hp) hc]
· obtain ⟨i, hi⟩ := exists_eq_gaussNorm v c p
simp only [gaussNorm, support_nonempty.mpr hp, ↓reduceDIte] at hi
rw [hi]
exact le_ciSup (aux_bdd v p) i
@[simp] | theorem | RingTheory | [
"Mathlib.RingTheory.PowerSeries.GaussNorm"
] | Mathlib/RingTheory/Polynomial/GaussNorm.lean | gaussNorm_coe_powerSeries | null |
gaussNorm_eq_zero_iff [ZeroHomClass F R ℝ] [NonnegHomClass F R ℝ]
(h_eq_zero : ∀ x : R, v x = 0 → x = 0) (hc : 0 < c) : p.gaussNorm v c = 0 ↔ p = 0 := by
rw [← gaussNorm_coe_powerSeries _ _ (le_of_lt hc),
PowerSeries.gaussNorm_eq_zero_iff h_eq_zero hc (by simpa only [coeff_coe] using aux_bdd v p),
coe_eq_zero_iff] | theorem | RingTheory | [
"Mathlib.RingTheory.PowerSeries.GaussNorm"
] | Mathlib/RingTheory/Polynomial/GaussNorm.lean | gaussNorm_eq_zero_iff | null |
gaussNorm_nonneg (hc : 0 ≤ c) [NonnegHomClass F R ℝ] : 0 ≤ p.gaussNorm v c := by
by_cases hp : p.support.Nonempty <;>
simp_all [gaussNorm, sup'_nonneg_of_ne_zero, -Finset.le_sup'_iff] | theorem | RingTheory | [
"Mathlib.RingTheory.PowerSeries.GaussNorm"
] | Mathlib/RingTheory/Polynomial/GaussNorm.lean | gaussNorm_nonneg | null |
le_gaussNorm [ZeroHomClass F R ℝ] [NonnegHomClass F R ℝ] (hc : 0 ≤ c) (i : ℕ) :
v (p.coeff i) * c ^ i ≤ p.gaussNorm v c := by
rw [← gaussNorm_coe_powerSeries _ _ hc, ← coeff_coe]
apply PowerSeries.le_gaussNorm
simpa using aux_bdd v p | lemma | RingTheory | [
"Mathlib.RingTheory.PowerSeries.GaussNorm"
] | Mathlib/RingTheory/Polynomial/GaussNorm.lean | le_gaussNorm | null |
@[simp]
gaussNorm_C [ZeroHomClass F R ℝ] [NonnegHomClass F R ℝ] (hc : 0 ≤ c) :
(C r).gaussNorm v c = v r := by
simp [← Polynomial.coe_C, hc]
@[simp] | theorem | RingTheory | [
"Mathlib.RingTheory.PowerSeries.GaussNorm"
] | Mathlib/RingTheory/Polynomial/GaussNorm.lean | gaussNorm_C | null |
gaussNorm_monomial [ZeroHomClass F R ℝ] [NonnegHomClass F R ℝ] (hc : 0 ≤ c) (n : ℕ) :
(monomial n r).gaussNorm v c = v r * c ^ n := by
simp [← Polynomial.coe_monomial, hc] | theorem | RingTheory | [
"Mathlib.RingTheory.PowerSeries.GaussNorm"
] | Mathlib/RingTheory/Polynomial/GaussNorm.lean | gaussNorm_monomial | null |
noncomputable preHilbertPoly (d k : ℕ) : F[X] :=
(d.factorial : F)⁻¹ • ((ascPochhammer F d).comp (Polynomial.X - (C (k : F)) + 1)) | def | RingTheory | [
"Mathlib.Algebra.Polynomial.AlgebraMap",
"Mathlib.Algebra.Polynomial.Eval.SMul",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.Order.Interval.Set.Infinite",
"Mathlib.RingTheory.Polynomial.Pochhammer",
"Mathlib.RingTheory.PowerSeries.WellKnown",
"Mathlib.Tactic.FieldSimp"
] | Mathlib/RingTheory/Polynomial/HilbertPoly.lean | preHilbertPoly | For any field `F` and natural numbers `d` and `k`, `Polynomial.preHilbertPoly F d k`
is defined as `(d.factorial : F)⁻¹ • ((ascPochhammer F d).comp (X - (C (k : F)) + 1))`.
This is the most basic form of Hilbert polynomials. `Polynomial.preHilbertPoly ℚ d 0`
is exactly the Hilbert polynomial of the polynomial ring `ℚ[X_0,...,X_d]` viewed as
a graded module over itself. In fact, `Polynomial.preHilbertPoly F d k` is the
same as `Polynomial.hilbertPoly ((X : F[X]) ^ k) (d + 1)` for any field `F` and
`d k : ℕ` (see the lemma `Polynomial.hilbertPoly_X_pow_succ`). See also the lemma
`Polynomial.preHilbertPoly_eq_choose_sub_add`, which states that if `CharZero F`,
then for any `d k n : ℕ` with `k ≤ n`, `(Polynomial.preHilbertPoly F d k).eval (n : F)`
equals `(n - k + d).choose d`. |
natDegree_preHilbertPoly [CharZero F] (d k : ℕ) :
(preHilbertPoly F d k).natDegree = d := by
have hne : (d ! : F) ≠ 0 := by norm_cast; positivity
rw [preHilbertPoly, natDegree_smul _ (inv_ne_zero hne), natDegree_comp, ascPochhammer_natDegree,
add_comm_sub, ← C_1, ← map_sub, natDegree_add_C, natDegree_X, mul_one] | lemma | RingTheory | [
"Mathlib.Algebra.Polynomial.AlgebraMap",
"Mathlib.Algebra.Polynomial.Eval.SMul",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.Order.Interval.Set.Infinite",
"Mathlib.RingTheory.Polynomial.Pochhammer",
"Mathlib.RingTheory.PowerSeries.WellKnown",
"Mathlib.Tactic.FieldSimp"
] | Mathlib/RingTheory/Polynomial/HilbertPoly.lean | natDegree_preHilbertPoly | null |
coeff_preHilbertPoly_self [CharZero F] (d k : ℕ) :
(preHilbertPoly F d k).coeff d = (d ! : F)⁻¹ := by
delta preHilbertPoly
have hne : (d ! : F) ≠ 0 := by norm_cast; positivity
have heq : d = ((ascPochhammer F d).comp (X - C (k : F) + 1)).natDegree :=
(natDegree_preHilbertPoly F d k).symm.trans (natDegree_smul _ (inv_ne_zero hne))
nth_rw 3 [heq]
calc
_ = (d ! : F)⁻¹ • ((ascPochhammer F d).comp (X - C ((k : F) - 1))).leadingCoeff := by
simp only [sub_add, ← C_1, ← map_sub, coeff_smul, coeff_natDegree]
_ = (d ! : F)⁻¹ := by
simp only [leadingCoeff_comp (ne_of_eq_of_ne (natDegree_X_sub_C _) one_ne_zero), Monic.def.1
(monic_ascPochhammer _ _), leadingCoeff_X_sub_C, one_pow, smul_eq_mul, mul_one] | lemma | RingTheory | [
"Mathlib.Algebra.Polynomial.AlgebraMap",
"Mathlib.Algebra.Polynomial.Eval.SMul",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.Order.Interval.Set.Infinite",
"Mathlib.RingTheory.Polynomial.Pochhammer",
"Mathlib.RingTheory.PowerSeries.WellKnown",
"Mathlib.Tactic.FieldSimp"
] | Mathlib/RingTheory/Polynomial/HilbertPoly.lean | coeff_preHilbertPoly_self | null |
leadingCoeff_preHilbertPoly [CharZero F] (d k : ℕ) :
(preHilbertPoly F d k).leadingCoeff = (d ! : F)⁻¹ := by
rw [leadingCoeff, natDegree_preHilbertPoly, coeff_preHilbertPoly_self] | lemma | RingTheory | [
"Mathlib.Algebra.Polynomial.AlgebraMap",
"Mathlib.Algebra.Polynomial.Eval.SMul",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.Order.Interval.Set.Infinite",
"Mathlib.RingTheory.Polynomial.Pochhammer",
"Mathlib.RingTheory.PowerSeries.WellKnown",
"Mathlib.Tactic.FieldSimp"
] | Mathlib/RingTheory/Polynomial/HilbertPoly.lean | leadingCoeff_preHilbertPoly | null |
preHilbertPoly_eq_choose_sub_add [CharZero F] (d : ℕ) {k n : ℕ} (hkn : k ≤ n) :
(preHilbertPoly F d k).eval (n : F) = (n - k + d).choose d := by
have : (d ! : F) ≠ 0 := by norm_cast; positivity
calc
_ = (↑d !)⁻¹ * eval (↑(n - k + 1)) (ascPochhammer F d) := by simp [cast_sub hkn, preHilbertPoly]
_ = (n - k + d).choose d := by
rw [ascPochhammer_nat_eq_natCast_ascFactorial];
simp [field, ascFactorial_eq_factorial_mul_choose]
variable {F} | lemma | RingTheory | [
"Mathlib.Algebra.Polynomial.AlgebraMap",
"Mathlib.Algebra.Polynomial.Eval.SMul",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.Order.Interval.Set.Infinite",
"Mathlib.RingTheory.Polynomial.Pochhammer",
"Mathlib.RingTheory.PowerSeries.WellKnown",
"Mathlib.Tactic.FieldSimp"
] | Mathlib/RingTheory/Polynomial/HilbertPoly.lean | preHilbertPoly_eq_choose_sub_add | null |
noncomputable hilbertPoly (p : F[X]) : (d : ℕ) → F[X]
| 0 => 0
| d + 1 => ∑ i ∈ p.support, (p.coeff i) • preHilbertPoly F d i | def | RingTheory | [
"Mathlib.Algebra.Polynomial.AlgebraMap",
"Mathlib.Algebra.Polynomial.Eval.SMul",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.Order.Interval.Set.Infinite",
"Mathlib.RingTheory.Polynomial.Pochhammer",
"Mathlib.RingTheory.PowerSeries.WellKnown",
"Mathlib.Tactic.FieldSimp"
] | Mathlib/RingTheory/Polynomial/HilbertPoly.lean | hilbertPoly | `Polynomial.hilbertPoly p 0 = 0`; for any `d : ℕ`, `Polynomial.hilbertPoly p (d + 1)`
is defined as `∑ i ∈ p.support, (p.coeff i) • Polynomial.preHilbertPoly F d i`. If
`M` is a graded module whose Poincaré series can be written as `p(X)/(1 - X)ᵈ` for some
`p : ℚ[X]` with integer coefficients, then `Polynomial.hilbertPoly p d` is the Hilbert
polynomial of `M`. See also `Polynomial.coeff_mul_invOneSubPow_eq_hilbertPoly_eval`,
which says that `PowerSeries.coeff F n (p * PowerSeries.invOneSubPow F d)` equals
`(Polynomial.hilbertPoly p d).eval (n : F)` for any large enough `n : ℕ`. |
hilbertPoly_zero_left (d : ℕ) : hilbertPoly (0 : F[X]) d = 0 := by
delta hilbertPoly; induction d with
| zero => simp only
| succ d _ => simp only [coeff_zero, zero_smul, Finset.sum_const_zero] | lemma | RingTheory | [
"Mathlib.Algebra.Polynomial.AlgebraMap",
"Mathlib.Algebra.Polynomial.Eval.SMul",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.Order.Interval.Set.Infinite",
"Mathlib.RingTheory.Polynomial.Pochhammer",
"Mathlib.RingTheory.PowerSeries.WellKnown",
"Mathlib.Tactic.FieldSimp"
] | Mathlib/RingTheory/Polynomial/HilbertPoly.lean | hilbertPoly_zero_left | null |
hilbertPoly_zero_right (p : F[X]) : hilbertPoly p 0 = 0 := rfl | lemma | RingTheory | [
"Mathlib.Algebra.Polynomial.AlgebraMap",
"Mathlib.Algebra.Polynomial.Eval.SMul",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.Order.Interval.Set.Infinite",
"Mathlib.RingTheory.Polynomial.Pochhammer",
"Mathlib.RingTheory.PowerSeries.WellKnown",
"Mathlib.Tactic.FieldSimp"
] | Mathlib/RingTheory/Polynomial/HilbertPoly.lean | hilbertPoly_zero_right | null |
hilbertPoly_succ (p : F[X]) (d : ℕ) :
hilbertPoly p (d + 1) = ∑ i ∈ p.support, (p.coeff i) • preHilbertPoly F d i := rfl | lemma | RingTheory | [
"Mathlib.Algebra.Polynomial.AlgebraMap",
"Mathlib.Algebra.Polynomial.Eval.SMul",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.Order.Interval.Set.Infinite",
"Mathlib.RingTheory.Polynomial.Pochhammer",
"Mathlib.RingTheory.PowerSeries.WellKnown",
"Mathlib.Tactic.FieldSimp"
] | Mathlib/RingTheory/Polynomial/HilbertPoly.lean | hilbertPoly_succ | null |
hilbertPoly_X_pow_succ (d k : ℕ) :
hilbertPoly ((X : F[X]) ^ k) (d + 1) = preHilbertPoly F d k := by
delta hilbertPoly; simp | lemma | RingTheory | [
"Mathlib.Algebra.Polynomial.AlgebraMap",
"Mathlib.Algebra.Polynomial.Eval.SMul",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.Order.Interval.Set.Infinite",
"Mathlib.RingTheory.Polynomial.Pochhammer",
"Mathlib.RingTheory.PowerSeries.WellKnown",
"Mathlib.Tactic.FieldSimp"
] | Mathlib/RingTheory/Polynomial/HilbertPoly.lean | hilbertPoly_X_pow_succ | null |
hilbertPoly_add_left (p q : F[X]) (d : ℕ) :
hilbertPoly (p + q) d = hilbertPoly p d + hilbertPoly q d := by
delta hilbertPoly
induction d with
| zero => simp only [add_zero]
| succ d _ =>
simp only
rw [← sum_def _ fun _ r => r • _]
exact sum_add_index _ _ _ (fun _ => zero_smul ..) (fun _ _ _ => add_smul ..) | lemma | RingTheory | [
"Mathlib.Algebra.Polynomial.AlgebraMap",
"Mathlib.Algebra.Polynomial.Eval.SMul",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.Order.Interval.Set.Infinite",
"Mathlib.RingTheory.Polynomial.Pochhammer",
"Mathlib.RingTheory.PowerSeries.WellKnown",
"Mathlib.Tactic.FieldSimp"
] | Mathlib/RingTheory/Polynomial/HilbertPoly.lean | hilbertPoly_add_left | null |
hilbertPoly_smul (a : F) (p : F[X]) (d : ℕ) :
hilbertPoly (a • p) d = a • hilbertPoly p d := by
delta hilbertPoly
induction d with
| zero => simp only [smul_zero]
| succ d _ =>
simp only
rw [← sum_def _ fun _ r => r • _, ← sum_def _ fun _ r => r • _, Polynomial.smul_sum,
sum_smul_index' _ _ _ fun i => zero_smul F (preHilbertPoly F d i)]
simp only [smul_assoc]
variable (F) in | lemma | RingTheory | [
"Mathlib.Algebra.Polynomial.AlgebraMap",
"Mathlib.Algebra.Polynomial.Eval.SMul",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.Order.Interval.Set.Infinite",
"Mathlib.RingTheory.Polynomial.Pochhammer",
"Mathlib.RingTheory.PowerSeries.WellKnown",
"Mathlib.Tactic.FieldSimp"
] | Mathlib/RingTheory/Polynomial/HilbertPoly.lean | hilbertPoly_smul | null |
noncomputable hilbertPoly_linearMap (d : ℕ) : F[X] →ₗ[F] F[X] where
toFun p := hilbertPoly p d
map_add' p q := hilbertPoly_add_left p q d
map_smul' r p := hilbertPoly_smul r p d
variable [CharZero F] | def | RingTheory | [
"Mathlib.Algebra.Polynomial.AlgebraMap",
"Mathlib.Algebra.Polynomial.Eval.SMul",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.Order.Interval.Set.Infinite",
"Mathlib.RingTheory.Polynomial.Pochhammer",
"Mathlib.RingTheory.PowerSeries.WellKnown",
"Mathlib.Tactic.FieldSimp"
] | Mathlib/RingTheory/Polynomial/HilbertPoly.lean | hilbertPoly_linearMap | The function that sends any `p : F[X]` to `Polynomial.hilbertPoly p d` is an `F`-linear map from
`F[X]` to `F[X]`. |
coeff_mul_invOneSubPow_eq_hilbertPoly_eval
{p : F[X]} (d : ℕ) {n : ℕ} (hn : p.natDegree < n) :
(p * invOneSubPow F d : F⟦X⟧).coeff n = (hilbertPoly p d).eval (n : F) := by
delta hilbertPoly; induction d with
| zero => simp only [invOneSubPow_zero, Units.val_one, mul_one, coeff_coe, eval_zero]
exact coeff_eq_zero_of_natDegree_lt hn
| succ d hd =>
simp only [eval_finset_sum, eval_smul, smul_eq_mul]
rw [← Finset.sum_coe_sort]
have h_le (i : p.support) : (i : ℕ) ≤ n :=
le_trans (le_natDegree_of_ne_zero <| mem_support_iff.1 i.2) hn.le
have h (i : p.support) : eval ↑n (preHilbertPoly F d ↑i) = (n + d - ↑i).choose d := by
rw [preHilbertPoly_eq_choose_sub_add _ _ (h_le i), Nat.sub_add_comm (h_le i)]
simp_rw [h]
rw [Finset.sum_coe_sort _ (fun x => (p.coeff ↑x) * (_ + d - ↑x).choose _),
PowerSeries.coeff_mul, Finset.Nat.sum_antidiagonal_eq_sum_range_succ_mk,
invOneSubPow_val_eq_mk_sub_one_add_choose_of_pos _ _ (zero_lt_succ d)]
simp only [coeff_coe, coeff_mk]
symm
refine Finset.sum_subset_zero_on_sdiff (fun s hs ↦ ?_) (fun x hx ↦ ?_) (fun x hx ↦ ?_)
· rw [Finset.mem_range_succ_iff]
exact h_le ⟨s, hs⟩
· simp only [Finset.mem_sdiff, mem_support_iff, not_not] at hx
rw [hx.2, zero_mul]
· rw [add_comm, Nat.add_sub_assoc (h_le ⟨x, hx⟩), succ_eq_add_one, add_tsub_cancel_right] | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.AlgebraMap",
"Mathlib.Algebra.Polynomial.Eval.SMul",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.Order.Interval.Set.Infinite",
"Mathlib.RingTheory.Polynomial.Pochhammer",
"Mathlib.RingTheory.PowerSeries.WellKnown",
"Mathlib.Tactic.FieldSimp"
] | Mathlib/RingTheory/Polynomial/HilbertPoly.lean | coeff_mul_invOneSubPow_eq_hilbertPoly_eval | The key property of Hilbert polynomials. If `F` is a field with characteristic `0`, `p : F[X]` and
`d : ℕ`, then for any large enough `n : ℕ`, `(Polynomial.hilbertPoly p d).eval (n : F)` equals the
coefficient of `Xⁿ` in the power series expansion of `p/(1 - X)ᵈ`. |
existsUnique_hilbertPoly (p : F[X]) (d : ℕ) :
∃! h : F[X], ∃ N : ℕ, ∀ n > N,
(p * invOneSubPow F d : F⟦X⟧).coeff n = h.eval (n : F) := by
use hilbertPoly p d; constructor
· use p.natDegree
exact fun n => coeff_mul_invOneSubPow_eq_hilbertPoly_eval d
· rintro h ⟨N, hhN⟩
apply eq_of_infinite_eval_eq h (hilbertPoly p d)
apply ((Set.Ioi_infinite (max N p.natDegree)).image cast_injective.injOn).mono
rintro x ⟨n, hn, rfl⟩
simp only [Set.mem_Ioi, sup_lt_iff, Set.mem_setOf_eq] at hn ⊢
rw [← coeff_mul_invOneSubPow_eq_hilbertPoly_eval d hn.2, hhN n hn.1] | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.AlgebraMap",
"Mathlib.Algebra.Polynomial.Eval.SMul",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.Order.Interval.Set.Infinite",
"Mathlib.RingTheory.Polynomial.Pochhammer",
"Mathlib.RingTheory.PowerSeries.WellKnown",
"Mathlib.Tactic.FieldSimp"
] | Mathlib/RingTheory/Polynomial/HilbertPoly.lean | existsUnique_hilbertPoly | The polynomial satisfying the key property of `Polynomial.hilbertPoly p d` is unique. |
eq_hilbertPoly_of_forall_coeff_eq_eval
{p h : F[X]} {d : ℕ} (N : ℕ) (hhN : ∀ n > N,
PowerSeries.coeff (R := F) n (p * invOneSubPow F d) = h.eval (n : F)) :
h = hilbertPoly p d :=
ExistsUnique.unique (existsUnique_hilbertPoly p d) ⟨N, hhN⟩
⟨p.natDegree, fun _ x => coeff_mul_invOneSubPow_eq_hilbertPoly_eval d x⟩ | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.AlgebraMap",
"Mathlib.Algebra.Polynomial.Eval.SMul",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.Order.Interval.Set.Infinite",
"Mathlib.RingTheory.Polynomial.Pochhammer",
"Mathlib.RingTheory.PowerSeries.WellKnown",
"Mathlib.Tactic.FieldSimp"
] | Mathlib/RingTheory/Polynomial/HilbertPoly.lean | eq_hilbertPoly_of_forall_coeff_eq_eval | If `h : F[X]` and there exists some `N : ℕ` such that for any number `n : ℕ` bigger than `N`
we have `PowerSeries.coeff F n (p * invOneSubPow F d) = h.eval (n : F)`, then `h` is exactly
`Polynomial.hilbertPoly p d`. |
hilbertPoly_mul_one_sub_succ (p : F[X]) (d : ℕ) :
hilbertPoly (p * (1 - X)) (d + 1) = hilbertPoly p d := by
apply eq_hilbertPoly_of_forall_coeff_eq_eval (p * (1 - X)).natDegree
intro n hn
have heq : 1 - PowerSeries.X = ((1 - X : F[X]) : F⟦X⟧) := by simp only [coe_sub, coe_one, coe_X]
rw [← one_sub_pow_mul_invOneSubPow_val_add_eq_invOneSubPow_val F d 1, pow_one, ← mul_assoc, heq,
← coe_mul, coeff_mul_invOneSubPow_eq_hilbertPoly_eval (d + 1) hn] | lemma | RingTheory | [
"Mathlib.Algebra.Polynomial.AlgebraMap",
"Mathlib.Algebra.Polynomial.Eval.SMul",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.Order.Interval.Set.Infinite",
"Mathlib.RingTheory.Polynomial.Pochhammer",
"Mathlib.RingTheory.PowerSeries.WellKnown",
"Mathlib.Tactic.FieldSimp"
] | Mathlib/RingTheory/Polynomial/HilbertPoly.lean | hilbertPoly_mul_one_sub_succ | null |
hilbertPoly_mul_one_sub_pow_add (p : F[X]) (d e : ℕ) :
hilbertPoly (p * (1 - X) ^ e) (d + e) = hilbertPoly p d := by
induction e with
| zero => simp
| succ e he => rw [pow_add, pow_one, ← mul_assoc, ← add_assoc, hilbertPoly_mul_one_sub_succ, he] | lemma | RingTheory | [
"Mathlib.Algebra.Polynomial.AlgebraMap",
"Mathlib.Algebra.Polynomial.Eval.SMul",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.Order.Interval.Set.Infinite",
"Mathlib.RingTheory.Polynomial.Pochhammer",
"Mathlib.RingTheory.PowerSeries.WellKnown",
"Mathlib.Tactic.FieldSimp"
] | Mathlib/RingTheory/Polynomial/HilbertPoly.lean | hilbertPoly_mul_one_sub_pow_add | null |
hilbertPoly_eq_zero_of_le_rootMultiplicity_one
{p : F[X]} {d : ℕ} (hdp : d ≤ p.rootMultiplicity 1) :
hilbertPoly p d = 0 := by
by_cases hp : p = 0
· rw [hp, hilbertPoly_zero_left]
· rcases exists_eq_pow_rootMultiplicity_mul_and_not_dvd p hp 1 with ⟨q, hq1, hq2⟩
have heq : p = q * (-1) ^ p.rootMultiplicity 1 * (1 - X) ^ p.rootMultiplicity 1 := by
simp only [mul_assoc, ← mul_pow, neg_mul, one_mul, neg_sub]
exact hq1.trans (mul_comm _ _)
rw [heq, ← zero_add d, ← Nat.sub_add_cancel hdp, pow_add (1 - X), ← mul_assoc,
hilbertPoly_mul_one_sub_pow_add, hilbertPoly] | lemma | RingTheory | [
"Mathlib.Algebra.Polynomial.AlgebraMap",
"Mathlib.Algebra.Polynomial.Eval.SMul",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.Order.Interval.Set.Infinite",
"Mathlib.RingTheory.Polynomial.Pochhammer",
"Mathlib.RingTheory.PowerSeries.WellKnown",
"Mathlib.Tactic.FieldSimp"
] | Mathlib/RingTheory/Polynomial/HilbertPoly.lean | hilbertPoly_eq_zero_of_le_rootMultiplicity_one | null |
natDegree_hilbertPoly_of_ne_zero_of_rootMultiplicity_lt
{p : F[X]} {d : ℕ} (hp : p ≠ 0) (hpd : p.rootMultiplicity 1 < d) :
(hilbertPoly p d).natDegree = d - p.rootMultiplicity 1 - 1 := by
rcases exists_eq_pow_rootMultiplicity_mul_and_not_dvd p hp 1 with ⟨q, hq1, hq2⟩
have heq : p = q * (-1) ^ p.rootMultiplicity 1 * (1 - X) ^ p.rootMultiplicity 1 := by
simp only [mul_assoc, ← mul_pow, neg_mul, one_mul, neg_sub]
exact hq1.trans (mul_comm _ _)
nth_rw 1 [heq, ← Nat.sub_add_cancel (le_of_lt hpd), hilbertPoly_mul_one_sub_pow_add,
← Nat.sub_add_cancel (Nat.le_sub_of_add_le' <| add_one_le_of_lt hpd)]
delta hilbertPoly
apply natDegree_eq_of_le_of_coeff_ne_zero
· apply natDegree_sum_le_of_forall_le _ _ <| fun _ _ => ?_
apply le_trans (natDegree_smul_le _ _)
rw [natDegree_preHilbertPoly]
· have : (fun (x : ℕ) (a : F) => a) = fun x a => a * 1 ^ x := by simp only [one_pow, mul_one]
simp only [finset_sum_coeff, coeff_smul, smul_eq_mul, coeff_preHilbertPoly_self,
← Finset.sum_mul, ← sum_def _ (fun _ a => a), this, ← eval_eq_sum, eval_mul, eval_pow,
eval_neg, eval_one, _root_.mul_eq_zero, pow_eq_zero_iff', neg_eq_zero, one_ne_zero, ne_eq,
false_and, or_false, inv_eq_zero, cast_eq_zero, not_or]
exact ⟨(not_iff_not.2 dvd_iff_isRoot).1 hq2, factorial_ne_zero _⟩ | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.AlgebraMap",
"Mathlib.Algebra.Polynomial.Eval.SMul",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.Order.Interval.Set.Infinite",
"Mathlib.RingTheory.Polynomial.Pochhammer",
"Mathlib.RingTheory.PowerSeries.WellKnown",
"Mathlib.Tactic.FieldSimp"
] | Mathlib/RingTheory/Polynomial/HilbertPoly.lean | natDegree_hilbertPoly_of_ne_zero_of_rootMultiplicity_lt | null |
natDegree_hilbertPoly_of_ne_zero
{p : F[X]} {d : ℕ} (hh : hilbertPoly p d ≠ 0) :
(hilbertPoly p d).natDegree = d - p.rootMultiplicity 1 - 1 := by
have hp : p ≠ 0 := by
intro h
rw [h] at hh
exact hh (hilbertPoly_zero_left d)
have hpd : p.rootMultiplicity 1 < d := by
by_contra h
exact hh (hilbertPoly_eq_zero_of_le_rootMultiplicity_one <| not_lt.1 h)
exact natDegree_hilbertPoly_of_ne_zero_of_rootMultiplicity_lt hp hpd | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.AlgebraMap",
"Mathlib.Algebra.Polynomial.Eval.SMul",
"Mathlib.Algebra.Polynomial.Roots",
"Mathlib.Order.Interval.Set.Infinite",
"Mathlib.RingTheory.Polynomial.Pochhammer",
"Mathlib.RingTheory.PowerSeries.WellKnown",
"Mathlib.Tactic.FieldSimp"
] | Mathlib/RingTheory/Polynomial/HilbertPoly.lean | natDegree_hilbertPoly_of_ne_zero | null |
mem_span_C_X_sub_C_X_sub_C_iff_eval_eval_eq_zero {b : R[X]} {P : R[X][X]} :
P ∈ Ideal.span {C (X - C a), X - C b} ↔ (P.eval b).eval a = 0 := by
rw [Ideal.mem_span_pair]
constructor <;> intro h
· rcases h with ⟨_, _, rfl⟩
simp only [eval_C, eval_X, eval_add, eval_sub, eval_mul, add_zero, mul_zero, sub_self]
· rcases dvd_iff_isRoot.mpr h with ⟨p, hp⟩
rcases @X_sub_C_dvd_sub_C_eval _ b _ P with ⟨q, hq⟩
exact ⟨C p, q, by rw [mul_comm, mul_comm q, eq_add_of_sub_eq' hq, hp, C_mul]⟩ | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.RingDivision",
"Mathlib.RingTheory.Adjoin.Polynomial",
"Mathlib.RingTheory.Ideal.Maps"
] | Mathlib/RingTheory/Polynomial/Ideal.lean | mem_span_C_X_sub_C_X_sub_C_iff_eval_eval_eq_zero | null |
ker_evalRingHom (x : R) : RingHom.ker (evalRingHom x) = Ideal.span {X - C x} := by
ext y
simp [Ideal.mem_span_singleton, dvd_iff_isRoot, RingHom.mem_ker]
@[simp] | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.RingDivision",
"Mathlib.RingTheory.Adjoin.Polynomial",
"Mathlib.RingTheory.Ideal.Maps"
] | Mathlib/RingTheory/Polynomial/Ideal.lean | ker_evalRingHom | null |
ker_modByMonicHom {q : R[X]} (hq : q.Monic) :
LinearMap.ker (Polynomial.modByMonicHom q) = (Ideal.span {q}).restrictScalars R :=
Submodule.ext fun _ => (mem_ker_modByMonic hq).trans Ideal.mem_span_singleton.symm
@[simp] | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.RingDivision",
"Mathlib.RingTheory.Adjoin.Polynomial",
"Mathlib.RingTheory.Ideal.Maps"
] | Mathlib/RingTheory/Polynomial/Ideal.lean | ker_modByMonicHom | null |
ker_constantCoeff : RingHom.ker constantCoeff = .span {(X : R[X])} := by
refine le_antisymm (fun p hp ↦ ?_) (by simp [Ideal.span_le])
simp only [RingHom.mem_ker, constantCoeff_apply, ← Polynomial.X_dvd_iff] at hp
rwa [Ideal.mem_span_singleton]
open Algebra in | lemma | RingTheory | [
"Mathlib.Algebra.Polynomial.RingDivision",
"Mathlib.RingTheory.Adjoin.Polynomial",
"Mathlib.RingTheory.Ideal.Maps"
] | Mathlib/RingTheory/Polynomial/Ideal.lean | ker_constantCoeff | null |
_root_.Algebra.mem_ideal_map_adjoin {R S : Type*} [CommSemiring R] [Semiring S] [Algebra R S]
(x : S) (I : Ideal R) {y : adjoin R ({x} : Set S)} :
y ∈ I.map (algebraMap R (adjoin R ({x} : Set S))) ↔
∃ p : R[X], (∀ i, p.coeff i ∈ I) ∧ Polynomial.aeval x p = y := by
constructor
· intro H
induction H using Submodule.span_induction with
| mem a ha =>
obtain ⟨a, ha, rfl⟩ := ha
exact ⟨C a, fun i ↦ by rw [coeff_C]; aesop, aeval_C _ _⟩
| zero => exact ⟨0, by simp, aeval_zero _⟩
| add a b ha hb ha' hb' =>
obtain ⟨a, ha, ha'⟩ := ha'
obtain ⟨b, hb, hb'⟩ := hb'
exact ⟨a + b, fun i ↦ by simpa using add_mem (ha i) (hb i), by simp [ha', hb']⟩
| smul a b hb hb' =>
obtain ⟨b', hb, hb'⟩ := hb'
obtain ⟨a, ha⟩ := a
rw [Algebra.adjoin_singleton_eq_range_aeval] at ha
obtain ⟨p, hp : aeval x p = a⟩ := ha
refine ⟨p * b', fun i ↦ ?_, by simp [hp, hb']⟩
rw [coeff_mul]
exact sum_mem fun i hi ↦ Ideal.mul_mem_left _ _ (hb _)
· rintro ⟨p, hp, hp'⟩
have : y = ∑ i ∈ p.support, p.coeff i • ⟨_, (X ^ i).aeval_mem_adjoin_singleton _ x⟩ := by
trans ∑ i ∈ p.support, ⟨_, (C (p.coeff i) * X ^ i).aeval_mem_adjoin_singleton _ x⟩
· ext1
simp only [AddSubmonoidClass.coe_finset_sum, ← map_sum, ← hp', ← as_sum_support_C_mul_X_pow]
· congr with i
simp [Algebra.smul_def]
simp_rw [this, Algebra.smul_def]
exact sum_mem fun i _ ↦ Ideal.mul_mem_right _ _ (Ideal.mem_map_of_mem _ (hp i)) | lemma | RingTheory | [
"Mathlib.Algebra.Polynomial.RingDivision",
"Mathlib.RingTheory.Adjoin.Polynomial",
"Mathlib.RingTheory.Ideal.Maps"
] | Mathlib/RingTheory/Polynomial/Ideal.lean | _root_.Algebra.mem_ideal_map_adjoin | null |
noncomputable integralNormalization (p : R[X]) : R[X] :=
p.sum fun i a ↦
monomial i (if p.degree = i then 1 else a * p.leadingCoeff ^ (p.natDegree - 1 - i))
@[simp] | def | RingTheory | [
"Mathlib.Algebra.Polynomial.Monic",
"Mathlib.RingTheory.Polynomial.ScaleRoots"
] | Mathlib/RingTheory/Polynomial/IntegralNormalization.lean | integralNormalization | If `p : R[X]` is a nonzero polynomial with root `z`, `integralNormalization p` is
a monic polynomial with root `leadingCoeff f * z`.
Moreover, `integralNormalization 0 = 0`. |
integralNormalization_zero : integralNormalization (0 : R[X]) = 0 := by
simp [integralNormalization]
@[simp] | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.Monic",
"Mathlib.RingTheory.Polynomial.ScaleRoots"
] | Mathlib/RingTheory/Polynomial/IntegralNormalization.lean | integralNormalization_zero | null |
integralNormalization_C {x : R} (hx : x ≠ 0) : integralNormalization (C x) = 1 := by
simp [integralNormalization, sum_def, support_C hx, degree_C hx]
variable {p : R[X]} | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.Monic",
"Mathlib.RingTheory.Polynomial.ScaleRoots"
] | Mathlib/RingTheory/Polynomial/IntegralNormalization.lean | integralNormalization_C | null |
integralNormalization_coeff {i : ℕ} :
(integralNormalization p).coeff i =
if p.degree = i then 1 else coeff p i * p.leadingCoeff ^ (p.natDegree - 1 - i) := by
have : p.coeff i = 0 → p.degree ≠ i := fun hc hd => coeff_ne_zero_of_eq_degree hd hc
simp +contextual [sum_def, integralNormalization, coeff_monomial, this,
mem_support_iff] | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.Monic",
"Mathlib.RingTheory.Polynomial.ScaleRoots"
] | Mathlib/RingTheory/Polynomial/IntegralNormalization.lean | integralNormalization_coeff | null |
support_integralNormalization_subset :
(integralNormalization p).support ⊆ p.support := by
intro
simp +contextual [sum_def, integralNormalization, coeff_monomial, mem_support_iff] | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.Monic",
"Mathlib.RingTheory.Polynomial.ScaleRoots"
] | Mathlib/RingTheory/Polynomial/IntegralNormalization.lean | support_integralNormalization_subset | null |
integralNormalization_coeff_degree {i : ℕ} (hi : p.degree = i) :
(integralNormalization p).coeff i = 1 := by rw [integralNormalization_coeff, if_pos hi] | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.Monic",
"Mathlib.RingTheory.Polynomial.ScaleRoots"
] | Mathlib/RingTheory/Polynomial/IntegralNormalization.lean | integralNormalization_coeff_degree | null |
integralNormalization_coeff_natDegree (hp : p ≠ 0) :
(integralNormalization p).coeff (natDegree p) = 1 :=
integralNormalization_coeff_degree (degree_eq_natDegree hp) | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.Monic",
"Mathlib.RingTheory.Polynomial.ScaleRoots"
] | Mathlib/RingTheory/Polynomial/IntegralNormalization.lean | integralNormalization_coeff_natDegree | null |
integralNormalization_coeff_degree_ne {i : ℕ} (hi : p.degree ≠ i) :
coeff (integralNormalization p) i = coeff p i * p.leadingCoeff ^ (p.natDegree - 1 - i) := by
rw [integralNormalization_coeff, if_neg hi] | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.Monic",
"Mathlib.RingTheory.Polynomial.ScaleRoots"
] | Mathlib/RingTheory/Polynomial/IntegralNormalization.lean | integralNormalization_coeff_degree_ne | null |
integralNormalization_coeff_ne_natDegree {i : ℕ} (hi : i ≠ natDegree p) :
coeff (integralNormalization p) i = coeff p i * p.leadingCoeff ^ (p.natDegree - 1 - i) :=
integralNormalization_coeff_degree_ne (degree_ne_of_natDegree_ne hi.symm) | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.Monic",
"Mathlib.RingTheory.Polynomial.ScaleRoots"
] | Mathlib/RingTheory/Polynomial/IntegralNormalization.lean | integralNormalization_coeff_ne_natDegree | null |
monic_integralNormalization (hp : p ≠ 0) : Monic (integralNormalization p) :=
monic_of_degree_le p.natDegree
(Finset.sup_le fun i h =>
WithBot.coe_le_coe.2 <| le_natDegree_of_mem_supp i <| support_integralNormalization_subset h)
(integralNormalization_coeff_natDegree hp) | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.Monic",
"Mathlib.RingTheory.Polynomial.ScaleRoots"
] | Mathlib/RingTheory/Polynomial/IntegralNormalization.lean | monic_integralNormalization | null |
integralNormalization_coeff_mul_leadingCoeff_pow (i : ℕ) (hp : 1 ≤ natDegree p) :
(integralNormalization p).coeff i * p.leadingCoeff ^ i =
p.coeff i * p.leadingCoeff ^ (p.natDegree - 1) := by
rw [integralNormalization_coeff]
split_ifs with h
· simp [natDegree_eq_of_degree_eq_some h, leadingCoeff,
← pow_succ', tsub_add_cancel_of_le (natDegree_eq_of_degree_eq_some h ▸ hp)]
· simp only [mul_assoc, ← pow_add]
by_cases h' : i < p.degree
· rw [tsub_add_cancel_of_le]
rw [le_tsub_iff_right hp, Nat.succ_le_iff]
exact coe_lt_degree.mp h'
· simp [coeff_eq_zero_of_degree_lt (lt_of_le_of_ne (le_of_not_gt h') h)] | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.Monic",
"Mathlib.RingTheory.Polynomial.ScaleRoots"
] | Mathlib/RingTheory/Polynomial/IntegralNormalization.lean | integralNormalization_coeff_mul_leadingCoeff_pow | null |
integralNormalization_mul_C_leadingCoeff (p : R[X]) :
integralNormalization p * C p.leadingCoeff = scaleRoots p p.leadingCoeff := by
ext i
rw [coeff_mul_C, integralNormalization_coeff]
split_ifs with h
· simp [natDegree_eq_of_degree_eq_some h, leadingCoeff]
· simp only [coeff_scaleRoots]
by_cases h' : i < p.degree
· rw [mul_assoc, ← pow_succ, tsub_right_comm, tsub_add_cancel_of_le]
rw [le_tsub_iff_left (coe_lt_degree.mp h').le, Nat.succ_le_iff]
exact coe_lt_degree.mp h'
· simp [coeff_eq_zero_of_degree_lt (lt_of_le_of_ne (le_of_not_gt h') h)] | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.Monic",
"Mathlib.RingTheory.Polynomial.ScaleRoots"
] | Mathlib/RingTheory/Polynomial/IntegralNormalization.lean | integralNormalization_mul_C_leadingCoeff | null |
integralNormalization_degree : (integralNormalization p).degree = p.degree := by
apply le_antisymm
· exact Finset.sup_mono p.support_integralNormalization_subset
· rw [← degree_scaleRoots, ← integralNormalization_mul_C_leadingCoeff]
exact (degree_mul_le _ _).trans (add_le_of_nonpos_right degree_C_le)
variable {A : Type*} [CommSemiring S] [Semiring A] | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.Monic",
"Mathlib.RingTheory.Polynomial.ScaleRoots"
] | Mathlib/RingTheory/Polynomial/IntegralNormalization.lean | integralNormalization_degree | null |
leadingCoeff_smul_integralNormalization (p : S[X]) :
p.leadingCoeff • integralNormalization p = scaleRoots p p.leadingCoeff := by
rw [Algebra.smul_def, algebraMap_eq, mul_comm, integralNormalization_mul_C_leadingCoeff] | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.Monic",
"Mathlib.RingTheory.Polynomial.ScaleRoots"
] | Mathlib/RingTheory/Polynomial/IntegralNormalization.lean | leadingCoeff_smul_integralNormalization | null |
integralNormalization_eval₂_leadingCoeff_mul_of_commute (h : 1 ≤ p.natDegree) (f : R →+* A)
(x : A) (h₁ : Commute (f p.leadingCoeff) x) (h₂ : ∀ {r r'}, Commute (f r) (f r')) :
(integralNormalization p).eval₂ f (f p.leadingCoeff * x) =
f p.leadingCoeff ^ (p.natDegree - 1) * p.eval₂ f x := by
rw [eval₂_eq_sum_range, eval₂_eq_sum_range, Finset.mul_sum]
apply Finset.sum_congr
· rw [natDegree_eq_of_degree_eq p.integralNormalization_degree]
intro n _hn
rw [h₁.mul_pow, ← mul_assoc, ← f.map_pow, ← f.map_mul,
integralNormalization_coeff_mul_leadingCoeff_pow _ h, f.map_mul, h₂.eq, f.map_pow, mul_assoc] | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.Monic",
"Mathlib.RingTheory.Polynomial.ScaleRoots"
] | Mathlib/RingTheory/Polynomial/IntegralNormalization.lean | integralNormalization_eval₂_leadingCoeff_mul_of_commute | null |
integralNormalization_eval₂_leadingCoeff_mul (h : 1 ≤ p.natDegree) (f : R →+* S) (x : S) :
(integralNormalization p).eval₂ f (f p.leadingCoeff * x) =
f p.leadingCoeff ^ (p.natDegree - 1) * p.eval₂ f x :=
integralNormalization_eval₂_leadingCoeff_mul_of_commute h _ _ (.all _ _) (.all _ _) | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.Monic",
"Mathlib.RingTheory.Polynomial.ScaleRoots"
] | Mathlib/RingTheory/Polynomial/IntegralNormalization.lean | integralNormalization_eval₂_leadingCoeff_mul | null |
integralNormalization_eval₂_eq_zero_of_commute {p : R[X]} (f : R →+* A) {z : A}
(hz : eval₂ f z p = 0) (h₁ : Commute (f p.leadingCoeff) z) (h₂ : ∀ {r r'}, Commute (f r) (f r'))
(inj : ∀ x : R, f x = 0 → x = 0) :
eval₂ f (f p.leadingCoeff * z) (integralNormalization p) = 0 := by
obtain (h | h) := p.natDegree.eq_zero_or_pos
· by_cases h0 : coeff p 0 = 0
· rw [eq_C_of_natDegree_eq_zero h]
simp [h0]
· rw [eq_C_of_natDegree_eq_zero h, eval₂_C] at hz
exact absurd (inj _ hz) h0
· rw [integralNormalization_eval₂_leadingCoeff_mul_of_commute h _ _ h₁ h₂, hz, mul_zero] | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.Monic",
"Mathlib.RingTheory.Polynomial.ScaleRoots"
] | Mathlib/RingTheory/Polynomial/IntegralNormalization.lean | integralNormalization_eval₂_eq_zero_of_commute | null |
integralNormalization_eval₂_eq_zero {p : R[X]} (f : R →+* S) {z : S} (hz : eval₂ f z p = 0)
(inj : ∀ x : R, f x = 0 → x = 0) :
eval₂ f (f p.leadingCoeff * z) (integralNormalization p) = 0 :=
integralNormalization_eval₂_eq_zero_of_commute _ hz (.all _ _) (.all _ _) inj | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.Monic",
"Mathlib.RingTheory.Polynomial.ScaleRoots"
] | Mathlib/RingTheory/Polynomial/IntegralNormalization.lean | integralNormalization_eval₂_eq_zero | null |
integralNormalization_aeval_eq_zero [Algebra S A] {f : S[X]} {z : A} (hz : aeval z f = 0)
(inj : ∀ x : S, algebraMap S A x = 0 → x = 0) :
aeval (algebraMap S A f.leadingCoeff * z) (integralNormalization f) = 0 :=
integralNormalization_eval₂_eq_zero_of_commute (algebraMap S A) hz
(Algebra.commute_algebraMap_left _ _) (.map (.all _ _) _) inj | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.Monic",
"Mathlib.RingTheory.Polynomial.ScaleRoots"
] | Mathlib/RingTheory/Polynomial/IntegralNormalization.lean | integralNormalization_aeval_eq_zero | null |
@[simp]
support_integralNormalization {f : R[X]} :
(integralNormalization f).support = f.support := by
nontriviality R using Subsingleton.eq_zero
have : IsDomain R := {}
by_cases hf : f = 0; · simp [hf]
ext i
refine ⟨fun h => support_integralNormalization_subset h, ?_⟩
simp only [integralNormalization_coeff, mem_support_iff]
intro hfi
split_ifs with hi <;> simp [hf, hfi] | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.Monic",
"Mathlib.RingTheory.Polynomial.ScaleRoots"
] | Mathlib/RingTheory/Polynomial/IntegralNormalization.lean | support_integralNormalization | null |
Polynomial.Monic.irreducible_of_irreducible_map_of_isPrime_nilradical
{R S : Type*} [CommRing R] [(nilradical R).IsPrime] [CommRing S] [IsDomain S]
(φ : R →+* S) (f : R[X]) (hm : f.Monic) (hi : Irreducible (f.map φ)) : Irreducible f := by
let R' := R ⧸ nilradical R
let ψ : R' →+* S := Ideal.Quotient.lift (nilradical R) φ
(haveI := RingHom.ker_isPrime φ; nilradical_le_prime (RingHom.ker φ))
let ι := algebraMap R R'
rw [show φ = ψ.comp ι from rfl, ← map_map] at hi
replace hi := hm.map ι |>.irreducible_of_irreducible_map _ _ hi
refine ⟨fun h ↦ hi.1 <| (mapRingHom ι).isUnit_map h, fun a b h ↦ ?_⟩
wlog hb : IsUnit (b.map ι) generalizing a b
· exact (this b a (mul_comm a b ▸ h)
(hi.2 (by rw [h, Polynomial.map_mul]) |>.resolve_right hb)).symm
have hn (i : ℕ) (hi : i ≠ 0) : IsNilpotent (b.coeff i) := by
obtain ⟨_, _, h⟩ := Polynomial.isUnit_iff.1 hb
simpa only [coeff_map, coeff_C, hi, ite_false, ← RingHom.mem_ker,
show RingHom.ker ι = nilradical R from Ideal.mk_ker] using congr(coeff $(h.symm) i)
refine .inr <| isUnit_of_coeff_isUnit_isNilpotent (isUnit_of_mul_isUnit_right
(x := a.coeff f.natDegree) <| (IsUnit.neg_iff _).1 ?_) hn
have hc : f.leadingCoeff = _ := congr(coeff $h f.natDegree)
rw [hm, coeff_mul, Finset.Nat.sum_antidiagonal_eq_sum_range_succ fun i j ↦ a.coeff i * b.coeff j,
Finset.sum_range_succ, ← sub_eq_iff_eq_add, Nat.sub_self] at hc
rw [← add_sub_cancel_left 1 (-(_ * _)), ← sub_eq_add_neg, hc]
exact IsNilpotent.isUnit_sub_one <| show _ ∈ nilradical R from sum_mem fun i hi ↦
Ideal.mul_mem_left _ _ <| hn _ <| Nat.sub_ne_zero_of_lt (List.mem_range.1 hi) | theorem | RingTheory | [
"Mathlib.Algebra.Polynomial.Eval.Irreducible",
"Mathlib.RingTheory.Polynomial.Nilpotent"
] | Mathlib/RingTheory/Polynomial/IrreducibleRing.lean | Polynomial.Monic.irreducible_of_irreducible_map_of_isPrime_nilradical | A polynomial over an irreducible ring `R` is irreducible if it is monic and irreducible after
mapping into an integral domain `S` (https://math.stackexchange.com/a/4843432/235999).
A generalization to `Polynomial.Monic.irreducible_of_irreducible_map`. |
isNilpotent_C_mul_pow_X_of_isNilpotent (n : ℕ) (hnil : IsNilpotent r) :
IsNilpotent ((C r) * X ^ n) := by
refine Commute.isNilpotent_mul_right (commute_X_pow _ _).symm ?_
obtain ⟨m, hm⟩ := hnil
refine ⟨m, ?_⟩
rw [← C_pow, hm, C_0] | lemma | RingTheory | [
"Mathlib.Algebra.Polynomial.AlgebraMap",
"Mathlib.Algebra.Polynomial.Div",
"Mathlib.Algebra.Polynomial.Identities",
"Mathlib.RingTheory.Ideal.Quotient.Operations",
"Mathlib.RingTheory.Nilpotent.Basic",
"Mathlib.RingTheory.Nilpotent.Lemmas"
] | Mathlib/RingTheory/Polynomial/Nilpotent.lean | isNilpotent_C_mul_pow_X_of_isNilpotent | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.