Skip to content

Commit dba5de8

Browse files
committed
chore(Algebra/Polynomial/Basic) : replace monomial_add with map_add (leanprover-community#31664)
`monomial_add n` is a homomorphism.
1 parent b22f001 commit dba5de8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Mathlib/Algebra/Polynomial/Basic.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ theorem monomial_zero_right (n : ℕ) : monomial n (0 : R) = 0 :=
404404
theorem monomial_zero_one : monomial 0 (1 : R) = 1 :=
405405
rfl
406406

407-
-- TODO: can't we just delete this one?
407+
@[deprecated map_add (since := "2025-11-15")]
408408
theorem monomial_add (n : ℕ) (r s : R) : monomial n (r + s) = monomial n r + monomial n s :=
409409
(monomial n).map_add _ _
410410

@@ -1116,10 +1116,10 @@ theorem coeff_sub (p q : R[X]) (n : ℕ) : coeff (p - q) n = coeff p n - coeff q
11161116

11171117
@[simp]
11181118
theorem monomial_neg (n : ℕ) (a : R) : monomial n (-a) = -monomial n a := by
1119-
rw [eq_neg_iff_add_eq_zero, ← monomial_add, neg_add_cancel, monomial_zero_right]
1119+
rw [eq_neg_iff_add_eq_zero, ← map_add, neg_add_cancel, monomial_zero_right]
11201120

11211121
theorem monomial_sub (n : ℕ) : monomial n (a - b) = monomial n a - monomial n b := by
1122-
rw [sub_eq_add_neg, monomial_add, monomial_neg, sub_eq_add_neg]
1122+
rw [sub_eq_add_neg, map_add, monomial_neg, sub_eq_add_neg]
11231123

11241124
@[simp]
11251125
theorem support_neg {p : R[X]} : (-p).support = p.support := by

Mathlib/RingTheory/ReesAlgebra.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ theorem monomial_mem_adjoin_monomial {I : Ideal R} {n : ℕ} {r : R} (hr : r ∈
8383
rw [add_comm n 1, smul_eq_mul, ← monomial_mul_monomial]
8484
exact Subalgebra.mul_mem _ (Algebra.subset_adjoin (Set.mem_image_of_mem _ hr)) (hn hs)
8585
· intro x y hx hy
86-
rw [monomial_add]
86+
rw [map_add]
8787
exact Subalgebra.add_mem _ hx hy
8888

8989
theorem adjoin_monomial_eq_reesAlgebra :

0 commit comments

Comments
 (0)