-- Module: Mathlib.RingTheory.MvPolynomial.MonomialOrder
Goal:
σ_1 : Type u_1
m_1 : MonomialOrder.{u_1, u_3} σ_1
R_1 : Type u_2
inst : CommRing R_1
σ : Type u_1
m : MonomialOrder.{u_1, u_3} σ
R : Type u_2
inst_1 : CommRing R
inst_2 : NoZeroDivisors R
p₁ p₂ : MvPolynomial σ R
d₁ d₂ : σ →₀ ℕ
c₁ c₂ : R
hc1 : c₁ ≠ 0
hc2 : c₂ ≠ 0
hp1 : p₁ ≠ 0
hp2 : p₂ ≠ 0
hm1 :
  ¬Eq (α := MvPolynomial σ R) ((monomial d₁ : (a : R) → MvPolynomial σ R) c₁ : MvPolynomial σ R) (0 : MvPolynomial σ R)
hm2 :
  ¬Eq (α := MvPolynomial σ R) ((monomial d₂ : (a : R) → MvPolynomial σ R) c₂ : MvPolynomial σ R) (0 : MvPolynomial σ R)
simp_rw :
  HMul.hMul (α := MvPolynomial σ R)
        ((monomial ((d₁ + m.degree p₁) ⊔ (d₂ + m.degree p₂) - (d₁ + m.degree p₁) + d₁) : (a : R) → MvPolynomial σ R)
            (c₁ * c₂ * m.leadingCoeff p₂) :
          MvPolynomial σ R)
        p₁ -
      HMul.hMul (α := MvPolynomial σ R)
        ((monomial ((d₁ + m.degree p₁) ⊔ (d₂ + m.degree p₂) - (d₂ + m.degree p₂) + d₂) : (a : R) → MvPolynomial σ R)
            (c₁ * c₂ * m.leadingCoeff p₁) :
          MvPolynomial σ R)
        p₂ =
    HMul.hMul (α := MvPolynomial σ R)
        ((monomial
                ((d₁ + m.degree p₁) ⊔ (d₂ + m.degree p₂) - m.degree p₁ ⊔ m.degree p₂ +
                  (m.degree p₁ ⊔ m.degree p₂ - m.degree p₁)) :
              (a : R) → MvPolynomial σ R)
            (c₁ * c₂ * m.leadingCoeff p₂) :
          MvPolynomial σ R)
        p₁ -
      HMul.hMul (α := MvPolynomial σ R)
        ((monomial
                ((d₁ + m.degree p₁) ⊔ (d₂ + m.degree p₂) - m.degree p₁ ⊔ m.degree p₂ +
                  (m.degree p₁ ⊔ m.degree p₂ - m.degree p₂)) :
              (a : R) → MvPolynomial σ R)
            (c₁ * c₂ * m.leadingCoeff p₁) :
          MvPolynomial σ R)
        p₂
⊢ HMul.hMul (α := MvPolynomial σ R)
        ((monomial
                (m.degree
                      (HMul.hMul (α := MvPolynomial σ R)
                        ((monomial d₁ : (a : R) → MvPolynomial σ R) c₁ : MvPolynomial σ R) p₁) ⊔
                    m.degree
                      (HMul.hMul (α := MvPolynomial σ R)
                        ((monomial d₂ : (a : R) → MvPolynomial σ R) c₂ : MvPolynomial σ R) p₂) -
                  m.degree
                    (HMul.hMul (α := MvPolynomial σ R)
                      ((monomial d₁ : (a : R) → MvPolynomial σ R) c₁ : MvPolynomial σ R) p₁)) :
              (a : R) → MvPolynomial σ R)
            (m.leadingCoeff
              (HMul.hMul (α := MvPolynomial σ R) ((monomial d₂ : (a : R) → MvPolynomial σ R) c₂ : MvPolynomial σ R)
                p₂)) :
          MvPolynomial σ R)
        (HMul.hMul (α := MvPolynomial σ R) ((monomial d₁ : (a : R) → MvPolynomial σ R) c₁ : MvPolynomial σ R) p₁) -
      HMul.hMul (α := MvPolynomial σ R)
        ((monomial
                (m.degree
                      (HMul.hMul (α := MvPolynomial σ R)
                        ((monomial d₁ : (a : R) → MvPolynomial σ R) c₁ : MvPolynomial σ R) p₁) ⊔
                    m.degree
                      (HMul.hMul (α := MvPolynomial σ R)
                        ((monomial d₂ : (a : R) → MvPolynomial σ R) c₂ : MvPolynomial σ R) p₂) -
                  m.degree
                    (HMul.hMul (α := MvPolynomial σ R)
                      ((monomial d₂ : (a : R) → MvPolynomial σ R) c₂ : MvPolynomial σ R) p₂)) :
              (a : R) → MvPolynomial σ R)
            (m.leadingCoeff
              (HMul.hMul (α := MvPolynomial σ R) ((monomial d₁ : (a : R) → MvPolynomial σ R) c₁ : MvPolynomial σ R)
                p₁)) :
          MvPolynomial σ R)
        (HMul.hMul (α := MvPolynomial σ R) ((monomial d₂ : (a : R) → MvPolynomial σ R) c₂ : MvPolynomial σ R) p₂) =
    HMul.hMul (α := MvPolynomial σ R)
      ((monomial ((d₁ + m.degree p₁) ⊔ (d₂ + m.degree p₂) - m.degree p₁ ⊔ m.degree p₂) : (a : R) → MvPolynomial σ R)
          (c₁ * c₂) :
        MvPolynomial σ R)
      (HMul.hMul (α := MvPolynomial σ R)
          ((monomial (m.degree p₁ ⊔ m.degree p₂ - m.degree p₁) : (a : R) → MvPolynomial σ R) (m.leadingCoeff p₂) :
            MvPolynomial σ R)
          p₁ -
        HMul.hMul (α := MvPolynomial σ R)
          ((monomial (m.degree p₁ ⊔ m.degree p₂ - m.degree p₂) : (a : R) → MvPolynomial σ R) (m.leadingCoeff p₁) :
            MvPolynomial σ R)
          p₂)

Tactic:
simp_rw [m.degree_mul hm1 hp1, m.degree_mul hm2 hp2,
    mul_sub, ← mul_assoc _ _ p₁, ← mul_assoc _ _ p₂, monomial_mul,
    m.leadingCoeff_mul, m.leadingCoeff_monomial,
    degree_monomial, hc1, hc2, reduceIte, mul_right_comm, mul_comm c₂ c₁]

Premises used: MonomialOrder.degree_monomial, MonomialOrder.leadingCoeff_mul, mul_sub, mul_assoc, MonomialOrder.leadingCoeff_monomial, MvPolynomial.monomial_mul, mul_right_comm, mul_comm, reduceIte, MonomialOrder.degree_mul