Theorem: MvPolynomial.IsWeightedHomogeneous.weightedHomogeneousComponent_ne
File: Mathlib/RingTheory/MvPolynomial/WeightedHomogeneous.lean

tactic: intro hn
state_before: R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
m n : M
p : MvPolynomial σ R
hp : IsWeightedHomogeneous w p m
⊢ n ≠ m → (weightedHomogeneousComponent w n) p = 0
state_after: R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
m n : M
p : MvPolynomial σ R
hp : IsWeightedHomogeneous w p m
hn : n ≠ m
⊢ (weightedHomogeneousComponent w n) p = 0

tactic: ext x
state_before: R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
m n : M
p : MvPolynomial σ R
hp : IsWeightedHomogeneous w p m
hn : n ≠ m
⊢ (weightedHomogeneousComponent w n) p = 0
state_after: case a
R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
m n : M
p : MvPolynomial σ R
hp : IsWeightedHomogeneous w p m
hn : n ≠ m
x : σ →₀ ℕ
⊢ coeff x ((weightedHomogeneousComponent w n) p) = coeff x 0

tactic: rw [coeff_weightedHomogeneousComponent]
state_before: case a
R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
m n : M
p : MvPolynomial σ R
hp : IsWeightedHomogeneous w p m
hn : n ≠ m
x : σ →₀ ℕ
⊢ coeff x ((weightedHomogeneousComponent w n) p) = coeff x 0
state_after: case a
R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
m n : M
p : MvPolynomial σ R
hp : IsWeightedHomogeneous w p m
hn : n ≠ m
x : σ →₀ ℕ
⊢ (if (weightedDegree w) x = n then coeff x p else 0) = coeff x 0

tactic: by_cases zero_coeff : coeff x p = 0
state_before: case a
R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
m n : M
p : MvPolynomial σ R
hp : IsWeightedHomogeneous w p m
hn : n ≠ m
x : σ →₀ ℕ
⊢ (if (weightedDegree w) x = n then coeff x p else 0) = coeff x 0
state_after: case pos
R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
m n : M
p : MvPolynomial σ R
hp : IsWeightedHomogeneous w p m
hn : n ≠ m
x : σ →₀ ℕ
zero_coeff : coeff x p = 0
⊢ (if (weightedDegree w) x = n then coeff x p else 0) = coeff x 0

case neg
R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
m n : M
p : MvPolynomial σ R
hp : IsWeightedHomogeneous w p m
hn : n ≠ m
x : σ →₀ ℕ
zero_coeff : ¬coeff x p = 0
⊢ (if (weightedDegree w) x = n then coeff x p else 0) = coeff x 0

tactic: split_ifs
state_before: case pos
R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
m n : M
p : MvPolynomial σ R
hp : IsWeightedHomogeneous w p m
hn : n ≠ m
x : σ →₀ ℕ
zero_coeff : coeff x p = 0
⊢ (if (weightedDegree w) x = n then coeff x p else 0) = coeff x 0
state_after: case pos
R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
m n : M
p : MvPolynomial σ R
hp : IsWeightedHomogeneous w p m
hn : n ≠ m
x : σ →₀ ℕ
zero_coeff : coeff x p = 0
h✝ : (weightedDegree w) x = n
⊢ coeff x p = coeff x 0

case neg
R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
m n : M
p : MvPolynomial σ R
hp : IsWeightedHomogeneous w p m
hn : n ≠ m
x : σ →₀ ℕ
zero_coeff : coeff x p = 0
h✝ : ¬(weightedDegree w) x = n
⊢ 0 = coeff x 0

tactic: rw [zero_coeff]
state_before: case pos
R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
m n : M
p : MvPolynomial σ R
hp : IsWeightedHomogeneous w p m
hn : n ≠ m
x : σ →₀ ℕ
zero_coeff : coeff x p = 0
h✝ : (weightedDegree w) x = n
⊢ coeff x p = coeff x 0
state_after: case pos
R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
m n : M
p : MvPolynomial σ R
hp : IsWeightedHomogeneous w p m
hn : n ≠ m
x : σ →₀ ℕ
zero_coeff : coeff x p = 0
h✝ : (weightedDegree w) x = n
⊢ 0 = coeff x 0

tactic: rw [coeff_zero]
state_before: case pos
R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
m n : M
p : MvPolynomial σ R
hp : IsWeightedHomogeneous w p m
hn : n ≠ m
x : σ →₀ ℕ
zero_coeff : coeff x p = 0
h✝ : (weightedDegree w) x = n
⊢ 0 = coeff x 0
state_after: no goals

tactic: rw [coeff_zero]
state_before: case neg
R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
m n : M
p : MvPolynomial σ R
hp : IsWeightedHomogeneous w p m
hn : n ≠ m
x : σ →₀ ℕ
zero_coeff : coeff x p = 0
h✝ : ¬(weightedDegree w) x = n
⊢ 0 = coeff x 0
state_after: no goals

tactic: rw [if_neg]
state_before: case neg
R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
m n : M
p : MvPolynomial σ R
hp : IsWeightedHomogeneous w p m
hn : n ≠ m
x : σ →₀ ℕ
zero_coeff : ¬coeff x p = 0
⊢ (if (weightedDegree w) x = n then coeff x p else 0) = coeff x 0
state_after: case neg
R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
m n : M
p : MvPolynomial σ R
hp : IsWeightedHomogeneous w p m
hn : n ≠ m
x : σ →₀ ℕ
zero_coeff : ¬coeff x p = 0
⊢ 0 = coeff x 0

case neg.hnc
R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
m n : M
p : MvPolynomial σ R
hp : IsWeightedHomogeneous w p m
hn : n ≠ m
x : σ →₀ ℕ
zero_coeff : ¬coeff x p = 0
⊢ ¬(weightedDegree w) x = n

tactic: rw [coeff_zero]
state_before: case neg
R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
m n : M
p : MvPolynomial σ R
hp : IsWeightedHomogeneous w p m
hn : n ≠ m
x : σ →₀ ℕ
zero_coeff : ¬coeff x p = 0
⊢ 0 = coeff x 0
state_after: no goals

tactic: rw [hp zero_coeff]
state_before: case neg.hnc
R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
m n : M
p : MvPolynomial σ R
hp : IsWeightedHomogeneous w p m
hn : n ≠ m
x : σ →₀ ℕ
zero_coeff : ¬coeff x p = 0
⊢ ¬(weightedDegree w) x = n
state_after: case neg.hnc
R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
m n : M
p : MvPolynomial σ R
hp : IsWeightedHomogeneous w p m
hn : n ≠ m
x : σ →₀ ℕ
zero_coeff : ¬coeff x p = 0
⊢ ¬m = n

tactic: exact Ne.symm hn
state_before: case neg.hnc
R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : AddCommMonoid M
w : σ → M
n✝ : M
φ ψ : MvPolynomial σ R
m n : M
p : MvPolynomial σ R
hp : IsWeightedHomogeneous w p m
hn : n ≠ m
x : σ →₀ ℕ
zero_coeff : ¬coeff x p = 0
⊢ ¬m = n
state_after: no goals