diff --git a/Mathlib/Algebra/Polynomial/Basic.lean b/Mathlib/Algebra/Polynomial/Basic.lean index 241907d7553837..db5c596a13dd02 100644 --- a/Mathlib/Algebra/Polynomial/Basic.lean +++ b/Mathlib/Algebra/Polynomial/Basic.lean @@ -640,7 +640,9 @@ theorem coeff_C : coeff (C a) n = ite (n = 0) a 0 := by theorem coeff_C_zero : coeff (C a) 0 = a := coeff_monomial -theorem coeff_C_ne_zero (h : n ≠ 0) : (C a).coeff n = 0 := by rw [coeff_C, if_neg h] +theorem coeff_C_of_ne_zero (h : n ≠ 0) : (C a).coeff n = 0 := by rw [coeff_C, if_neg h] + +@[deprecated (since := "2026-05-20")] alias coeff_C_ne_zero := coeff_C_of_ne_zero @[simp] lemma coeff_C_succ {r : R} {n : ℕ} : coeff (C r) (n + 1) = 0 := by simp [coeff_C] diff --git a/Mathlib/Algebra/Polynomial/Eval/Defs.lean b/Mathlib/Algebra/Polynomial/Eval/Defs.lean index 5fe05c66524d0c..6d22b9537852d4 100644 --- a/Mathlib/Algebra/Polynomial/Eval/Defs.lean +++ b/Mathlib/Algebra/Polynomial/Eval/Defs.lean @@ -162,7 +162,7 @@ theorem eval₂_mul_C' (h : Commute (f a) x) : eval₂ f x (p * C a) = eval₂ f intro k by_cases hk : k = 0 · simp only [hk, h, coeff_C_zero] - · simp only [coeff_C_ne_zero hk, map_zero, Commute.zero_left] + · simp only [coeff_C_of_ne_zero hk, map_zero, Commute.zero_left] theorem eval₂_list_prod_noncomm (ps : List R[X]) (hf : ∀ p ∈ ps, ∀ (k), Commute (f <| coeff p k) x) : diff --git a/Mathlib/RingTheory/HahnSeries/HEval.lean b/Mathlib/RingTheory/HahnSeries/HEval.lean index 05998483a58937..c5d26e685b07bb 100644 --- a/Mathlib/RingTheory/HahnSeries/HEval.lean +++ b/Mathlib/RingTheory/HahnSeries/HEval.lean @@ -192,7 +192,7 @@ theorem heval_C (r : R) : heval x (C r) = r • 1 := by ext g simp only [heval_apply, coeff_hsum, smulFamily_toFun, powers_toFun, HahnSeries.coeff_smul, HahnSeries.coeff_one, smul_eq_mul, mul_ite, mul_one, mul_zero] - rw [finsum_eq_single _ 0 (fun n hn ↦ by simp [coeff_ne_zero_C hn])] + rw [finsum_eq_single _ 0 (fun n hn ↦ by simp [coeff_C_of_ne_zero hn])] by_cases hg : g = 0 <;> simp theorem heval_X (hx : 0 < x.orderTop) : heval x X = x := by diff --git a/Mathlib/RingTheory/Polynomial/Basic.lean b/Mathlib/RingTheory/Polynomial/Basic.lean index 26312de6203838..acce808e31fc35 100644 --- a/Mathlib/RingTheory/Polynomial/Basic.lean +++ b/Mathlib/RingTheory/Polynomial/Basic.lean @@ -599,7 +599,7 @@ theorem isPrime_map_C_iff_isPrime (P : Ideal R) : constructor · rintro h (- | n) · rwa [coeff_C_zero] - · simp only [coeff_C_ne_zero (Nat.succ_ne_zero _), Submodule.zero_mem] + · simp only [coeff_C_of_ne_zero (Nat.succ_ne_zero _), Submodule.zero_mem] · intro h simpa only [coeff_C_zero] using h 0 · intro h diff --git a/Mathlib/RingTheory/PowerSeries/Basic.lean b/Mathlib/RingTheory/PowerSeries/Basic.lean index 3e7f3f924bad9e..881c5dbbeeab85 100644 --- a/Mathlib/RingTheory/PowerSeries/Basic.lean +++ b/Mathlib/RingTheory/PowerSeries/Basic.lean @@ -185,12 +185,14 @@ theorem coeff_C (n : ℕ) (a : R) : coeff n (C a : R⟦X⟧) = if n = 0 then a e theorem coeff_zero_C (a : R) : coeff 0 (C a) = a := by rw [coeff_C, if_pos rfl] -theorem coeff_ne_zero_C {a : R} {n : ℕ} (h : n ≠ 0) : coeff n (C a) = 0 := by +theorem coeff_C_of_ne_zero {a : R} {n : ℕ} (h : n ≠ 0) : coeff n (C a) = 0 := by rw [coeff_C, if_neg h] +@[deprecated (since := "2026-05-20")] alias coeff_ne_zero_C := coeff_C_of_ne_zero + @[simp] theorem coeff_succ_C {a : R} {n : ℕ} : coeff (n + 1) (C a) = 0 := - coeff_ne_zero_C n.succ_ne_zero + coeff_C_of_ne_zero n.succ_ne_zero @[grind inj] theorem C_injective : Function.Injective (C (R := R)) := MvPowerSeries.C_injective