@@ -512,8 +512,11 @@ theorem degree_mul [NoZeroDivisors R] {f g : MvPolynomial σ R} (hf : f ≠ 0) (
512512 tauto
513513
514514/-- Multiplicativity of leading coefficients -/
515- theorem leadingCoeff_mul [NoZeroDivisors R] {f g : MvPolynomial σ R} (hf : f ≠ 0 ) (hg : g ≠ 0 ) :
515+ @[simp] theorem leadingCoeff_mul [NoZeroDivisors R] {f g : MvPolynomial σ R} :
516516 m.leadingCoeff (f * g) = m.leadingCoeff f * m.leadingCoeff g := by
517+ by_cases! +distrib h : f = 0 ∨ g = 0
518+ · cases h <;> simp [*]
519+ obtain ⟨hf, hg⟩ := h
517520 rw [leadingCoeff, degree_mul hf hg, ← coeff_mul_of_degree_add]
518521
519522/-- Monomial degree of powers -/
@@ -949,7 +952,7 @@ lemma sPolynomial_monomial_mul [NoZeroDivisors R] (p₁ p₂ : MvPolynomial σ R
949952 have hm2 := (monomial_eq_zero (s := d₂)).not.mpr hc2
950953 simp_rw [m.degree_mul hm1 hp1, m.degree_mul hm2 hp2,
951954 mul_sub, ← mul_assoc _ _ p₁, ← mul_assoc _ _ p₂, monomial_mul,
952- m.leadingCoeff_mul hm1 hp1, m.leadingCoeff_mul hm2 hp2 , m.leadingCoeff_monomial,
955+ m.leadingCoeff_mul, m.leadingCoeff_monomial,
953956 degree_monomial, hc1, hc2, reduceIte, mul_right_comm, mul_comm c₂ c₁]
954957 rw [tsub_add_tsub_cancel (sup_le_sup (self_le_add_left _ _) (self_le_add_left _ _)) (by simp),
955958 tsub_add_tsub_cancel (sup_le_sup (self_le_add_left _ _) (self_le_add_left _ _)) (by simp),
0 commit comments