Theorem: MvPolynomial.weightedHomogeneousComponent_finsupp
File: Mathlib/RingTheory/MvPolynomial/WeightedHomogeneous.lean

Proof steps:
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
⊢ (Function.support fun m => (weightedHomogeneousComponent w m) φ).Finite
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
⊢ (Function.support fun m => (weightedHomogeneousComponent w m) φ) ⊆ (fun d => (weight w) d) '' ↑φ.support
tactic: suffices
    (Function.support fun m => weightedHomogeneousComponent w m φ) ⊆
      (fun d => weight w d) '' φ.support by
    exact Finite.subset ((fun d : σ →₀ ℕ => (weight w) d) '' ↑(support φ)).toFinite this
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
⊢ (Function.support fun m => (weightedHomogeneousComponent w m) φ) ⊆ (fun d => (weight w) d) '' ↑φ.support
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 : M
hm : m ∈ Function.support fun m => (weightedHomogeneousComponent w m) φ
⊢ m ∈ (fun d => (weight w) d) '' ↑φ.support
tactic: intro m hm
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 : M
hm : m ∈ Function.support fun m => (weightedHomogeneousComponent w m) φ
⊢ m ∈ (fun d => (weight w) d) '' ↑φ.support
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 : M
hm : m ∈ Function.support fun m => (weightedHomogeneousComponent w m) φ
hm' : m ∉ (fun d => (weight w) d) '' ↑φ.support
⊢ False
tactic: by_contra hm'
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 : M
hm : m ∈ Function.support fun m => (weightedHomogeneousComponent w m) φ
hm' : m ∉ (fun d => (weight w) d) '' ↑φ.support
⊢ False
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 : M
hm : m ∈ Function.support fun m => (weightedHomogeneousComponent w m) φ
hm' : m ∉ (fun d => (weight w) d) '' ↑φ.support
⊢ (fun m => (weightedHomogeneousComponent w m) φ) m = 0
tactic: apply hm
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 : M
hm : m ∈ Function.support fun m => (weightedHomogeneousComponent w m) φ
hm' : m ∉ (fun d => (weight w) d) '' ↑φ.support
⊢ (fun m => (weightedHomogeneousComponent w m) φ) m = 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 : M
hm' : m ∉ (fun d => (weight w) d) '' ↑φ.support
hm : ¬(weightedHomogeneousComponent w m) φ = 0
⊢ (fun m => (weightedHomogeneousComponent w m) φ) m = 0
tactic: simp only [mem_support, Ne] at hm
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 : M
hm' : m ∉ (fun d => (weight w) d) '' ↑φ.support
hm : ¬(weightedHomogeneousComponent w m) φ = 0
⊢ (fun m => (weightedHomogeneousComponent w m) φ) m = 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 : M
hm : ¬(weightedHomogeneousComponent w m) φ = 0
hm' : ∀ x ∈ ↑φ.support, ¬(weight w) x = m
⊢ (fun m => (weightedHomogeneousComponent w m) φ) m = 0
tactic: simp only [Set.mem_image, not_exists, not_and] at hm'
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 : M
hm : ¬(weightedHomogeneousComponent w m) φ = 0
hm' : ∀ x ∈ ↑φ.support, ¬(weight w) x = m
⊢ (fun m => (weightedHomogeneousComponent w m) φ) m = 0
state_after: no goals
tactic: exact weightedHomogeneousComponent_eq_zero' m φ hm'