Skip to content

Commit ae5f1c0

Browse files
chore: fix naming of coeff_C_ne_zero (#39632)
Split off from #39623
1 parent 2b7518f commit ae5f1c0

5 files changed

Lines changed: 10 additions & 6 deletions

File tree

Mathlib/Algebra/Polynomial/Basic.lean

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,9 @@ theorem coeff_C : coeff (C a) n = ite (n = 0) a 0 := by
640640
theorem coeff_C_zero : coeff (C a) 0 = a :=
641641
coeff_monomial
642642

643-
theorem coeff_C_ne_zero (h : n ≠ 0) : (C a).coeff n = 0 := by rw [coeff_C, if_neg h]
643+
theorem coeff_C_of_ne_zero (h : n ≠ 0) : (C a).coeff n = 0 := by rw [coeff_C, if_neg h]
644+
645+
@[deprecated (since := "2026-05-20")] alias coeff_C_ne_zero := coeff_C_of_ne_zero
644646

645647
@[simp]
646648
lemma coeff_C_succ {r : R} {n : ℕ} : coeff (C r) (n + 1) = 0 := by simp [coeff_C]

Mathlib/Algebra/Polynomial/Eval/Defs.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ theorem eval₂_mul_C' (h : Commute (f a) x) : eval₂ f x (p * C a) = eval₂ f
162162
intro k
163163
by_cases hk : k = 0
164164
· simp only [hk, h, coeff_C_zero]
165-
· simp only [coeff_C_ne_zero hk, map_zero, Commute.zero_left]
165+
· simp only [coeff_C_of_ne_zero hk, map_zero, Commute.zero_left]
166166

167167
theorem eval₂_list_prod_noncomm (ps : List R[X])
168168
(hf : ∀ p ∈ ps, ∀ (k), Commute (f <| coeff p k) x) :

Mathlib/RingTheory/HahnSeries/HEval.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ theorem heval_C (r : R) : heval x (C r) = r • 1 := by
192192
ext g
193193
simp only [heval_apply, coeff_hsum, smulFamily_toFun, powers_toFun, HahnSeries.coeff_smul,
194194
HahnSeries.coeff_one, smul_eq_mul, mul_ite, mul_one, mul_zero]
195-
rw [finsum_eq_single _ 0 (fun n hn ↦ by simp [coeff_ne_zero_C hn])]
195+
rw [finsum_eq_single _ 0 (fun n hn ↦ by simp [coeff_C_of_ne_zero hn])]
196196
by_cases hg : g = 0 <;> simp
197197

198198
theorem heval_X (hx : 0 < x.orderTop) : heval x X = x := by

Mathlib/RingTheory/Polynomial/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ theorem isPrime_map_C_iff_isPrime (P : Ideal R) :
599599
constructor
600600
· rintro h (- | n)
601601
· rwa [coeff_C_zero]
602-
· simp only [coeff_C_ne_zero (Nat.succ_ne_zero _), Submodule.zero_mem]
602+
· simp only [coeff_C_of_ne_zero (Nat.succ_ne_zero _), Submodule.zero_mem]
603603
· intro h
604604
simpa only [coeff_C_zero] using h 0
605605
· intro h

Mathlib/RingTheory/PowerSeries/Basic.lean

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,14 @@ theorem coeff_C (n : ℕ) (a : R) : coeff n (C a : R⟦X⟧) = if n = 0 then a e
185185
theorem coeff_zero_C (a : R) : coeff 0 (C a) = a := by
186186
rw [coeff_C, if_pos rfl]
187187

188-
theorem coeff_ne_zero_C {a : R} {n : ℕ} (h : n ≠ 0) : coeff n (C a) = 0 := by
188+
theorem coeff_C_of_ne_zero {a : R} {n : ℕ} (h : n ≠ 0) : coeff n (C a) = 0 := by
189189
rw [coeff_C, if_neg h]
190190

191+
@[deprecated (since := "2026-05-20")] alias coeff_ne_zero_C := coeff_C_of_ne_zero
192+
191193
@[simp]
192194
theorem coeff_succ_C {a : R} {n : ℕ} : coeff (n + 1) (C a) = 0 :=
193-
coeff_ne_zero_C n.succ_ne_zero
195+
coeff_C_of_ne_zero n.succ_ne_zero
194196

195197
@[grind inj]
196198
theorem C_injective : Function.Injective (C (R := R)) := MvPowerSeries.C_injective

0 commit comments

Comments
 (0)