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

tactic: suffices
  (Function.support fun m => weightedHomogeneousComponent w m φ) ⊆
    (fun d => weightedDegree w d) '' φ.support by
  exact Finite.subset ((fun d : σ →₀ ℕ => (weightedDegree 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) φ).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 => (weightedDegree 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
⊢ (Function.support fun m => (weightedHomogeneousComponent w m) φ) ⊆ (fun d => (weightedDegree 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 => (weightedDegree w) d) '' ↑φ.support

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) φ
⊢ m ∈ (fun d => (weightedDegree 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 => (weightedDegree w) d) '' ↑φ.support
⊢ False

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 => (weightedDegree 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 => (weightedDegree w) d) '' ↑φ.support
⊢ (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 ∈ Function.support fun m => (weightedHomogeneousComponent w m) φ
hm' : m ∉ (fun d => (weightedDegree 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 => (weightedDegree w) d) '' ↑φ.support
hm : ¬(weightedHomogeneousComponent w m) φ = 0
⊢ (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' : m ∉ (fun d => (weightedDegree 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, ¬(weightedDegree w) x = m
⊢ (fun m => (weightedHomogeneousComponent w m) φ) m = 0

tactic: exact weightedHomogeneousComponent_eq_zero' 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 : ¬(weightedHomogeneousComponent w m) φ = 0
hm' : ∀ x ∈ ↑φ.support, ¬(weightedDegree w) x = m
⊢ (fun m => (weightedHomogeneousComponent w m) φ) m = 0
state_after: no goals

tactic: exact Finite.subset ((fun d : σ →₀ ℕ => (weightedDegree 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
this : (Function.support fun m => (weightedHomogeneousComponent w m) φ) ⊆ (fun d => (weightedDegree w) d) '' ↑φ.support
⊢ (Function.support fun m => (weightedHomogeneousComponent w m) φ).Finite
state_after: no goals