R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : IsWeightedHomogeneous w p n
⊢ ↑(weightedHomogeneousComponent w m) p = if m = n then p else 0
R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : p ∈ weightedHomogeneousSubmodule R w n
⊢ ↑(weightedHomogeneousComponent w m) p = if m = n then p else 0
simp only [mem_weightedHomogeneousSubmodule] at h
case a
R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : IsWeightedHomogeneous w p n
x : σ →₀ ℕ
⊢ coeff x (↑(weightedHomogeneousComponent w m) p) = coeff x (if m = n then p else 0)
R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : IsWeightedHomogeneous w p n
⊢ ↑(weightedHomogeneousComponent w m) p = if m = n then p else 0
ext x
case a
R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : IsWeightedHomogeneous w p n
x : σ →₀ ℕ
⊢ (if ↑(weightedDegree' w) x = m then coeff x p else 0) = coeff x (if m = n then p else 0)
case a
R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : IsWeightedHomogeneous w p n
x : σ →₀ ℕ
⊢ coeff x (↑(weightedHomogeneousComponent w m) p) = coeff x (if m = n then p else 0)
rw [coeff_weightedHomogeneousComponent]
case pos
R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : IsWeightedHomogeneous w p n
x : σ →₀ ℕ
zero_coeff : coeff x p = 0
⊢ (if ↑(weightedDegree' w) x = m then coeff x p else 0) = coeff x (if m = n then p else 0)

case neg
R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : IsWeightedHomogeneous w p n
x : σ →₀ ℕ
zero_coeff : ¬coeff x p = 0
⊢ (if ↑(weightedDegree' w) x = m then coeff x p else 0) = coeff x (if m = n then p else 0)
case a
R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : IsWeightedHomogeneous w p n
x : σ →₀ ℕ
⊢ (if ↑(weightedDegree' w) x = m then coeff x p else 0) = coeff x (if m = n then p else 0)
by_cases zero_coeff : coeff x p = 0
case pos.inl.inl
R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : IsWeightedHomogeneous w p n
x : σ →₀ ℕ
zero_coeff : coeff x p = 0
h✝¹ : ↑(weightedDegree' w) x = m
h✝ : m = n
⊢ coeff x p = coeff x p

case pos.inl.inr
R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : IsWeightedHomogeneous w p n
x : σ →₀ ℕ
zero_coeff : coeff x p = 0
h✝¹ : ↑(weightedDegree' w) x = m
h✝ : ¬m = n
⊢ coeff x p = coeff x 0

case pos.inr.inl
R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : IsWeightedHomogeneous w p n
x : σ →₀ ℕ
zero_coeff : coeff x p = 0
h✝¹ : ¬↑(weightedDegree' w) x = m
h✝ : m = n
⊢ 0 = coeff x p

case pos.inr.inr
R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : IsWeightedHomogeneous w p n
x : σ →₀ ℕ
zero_coeff : coeff x p = 0
h✝¹ : ¬↑(weightedDegree' w) x = m
h✝ : ¬m = n
⊢ 0 = coeff x 0
case pos
R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : IsWeightedHomogeneous w p n
x : σ →₀ ℕ
zero_coeff : coeff x p = 0
⊢ (if ↑(weightedDegree' w) x = m then coeff x p else 0) = coeff x (if m = n then p else 0)
split_ifs
no goals
case pos.inl.inl
R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : IsWeightedHomogeneous w p n
x : σ →₀ ℕ
zero_coeff : coeff x p = 0
h✝¹ : ↑(weightedDegree' w) x = m
h✝ : m = n
⊢ coeff x p = coeff x p

case pos.inl.inr
R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : IsWeightedHomogeneous w p n
x : σ →₀ ℕ
zero_coeff : coeff x p = 0
h✝¹ : ↑(weightedDegree' w) x = m
h✝ : ¬m = n
⊢ coeff x p = coeff x 0

case pos.inr.inl
R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : IsWeightedHomogeneous w p n
x : σ →₀ ℕ
zero_coeff : coeff x p = 0
h✝¹ : ¬↑(weightedDegree' w) x = m
h✝ : m = n
⊢ 0 = coeff x p

case pos.inr.inr
R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : IsWeightedHomogeneous w p n
x : σ →₀ ℕ
zero_coeff : coeff x p = 0
h✝¹ : ¬↑(weightedDegree' w) x = m
h✝ : ¬m = n
⊢ 0 = coeff x 0
all_goals simp only [zero_coeff, coeff_zero]
no goals
case pos.inr.inr
R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : IsWeightedHomogeneous w p n
x : σ →₀ ℕ
zero_coeff : coeff x p = 0
h✝¹ : ¬↑(weightedDegree' w) x = m
h✝ : ¬m = n
⊢ 0 = coeff x 0
simp only [zero_coeff, coeff_zero]
case neg
R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : IsWeightedHomogeneous w p n
x : σ →₀ ℕ
zero_coeff : ¬coeff x p = 0
⊢ (if n = m then coeff x p else 0) = coeff x (if m = n then p else 0)
case neg
R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : IsWeightedHomogeneous w p n
x : σ →₀ ℕ
zero_coeff : ¬coeff x p = 0
⊢ (if ↑(weightedDegree' w) x = m then coeff x p else 0) = coeff x (if m = n then p else 0)
rw [h zero_coeff]
case neg
R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : IsWeightedHomogeneous w p n
x : σ →₀ ℕ
zero_coeff : ¬coeff x p = 0
⊢ (if m = n then coeff x p else 0) = coeff x (if m = n then p else 0)
case neg
R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : IsWeightedHomogeneous w p n
x : σ →₀ ℕ
zero_coeff : ¬coeff x p = 0
⊢ (if n = m then coeff x p else 0) = coeff x (if m = n then p else 0)
simp only [show n = m ↔ m = n from eq_comm]
case neg.inl
R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : IsWeightedHomogeneous w p n
x : σ →₀ ℕ
zero_coeff : ¬coeff x p = 0
h1 : m = n
⊢ coeff x p = coeff x p

case neg.inr
R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : IsWeightedHomogeneous w p n
x : σ →₀ ℕ
zero_coeff : ¬coeff x p = 0
h1 : ¬m = n
⊢ 0 = coeff x 0
case neg
R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : IsWeightedHomogeneous w p n
x : σ →₀ ℕ
zero_coeff : ¬coeff x p = 0
⊢ (if m = n then coeff x p else 0) = coeff x (if m = n then p else 0)
split_ifs with h1
no goals
case neg.inl
R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : IsWeightedHomogeneous w p n
x : σ →₀ ℕ
zero_coeff : ¬coeff x p = 0
h1 : m = n
⊢ coeff x p = coeff x p
rfl
no goals
case neg.inr
R : Type u_3
M : Type u_1
inst✝² : CommSemiring R
σ : Type u_2
inst✝¹ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
inst✝ : DecidableEq M
m n : M
p : MvPolynomial σ R
h : IsWeightedHomogeneous w p n
x : σ →₀ ℕ
zero_coeff : ¬coeff x p = 0
h1 : ¬m = n
⊢ 0 = coeff x 0
simp only [coeff_zero]