-- Mathlib/RingTheory/MvPowerSeries/Basic.lean
theorem coeff_eq_zero_of_constantCoeff_nilpotent
    {f : MvPowerSeries σ R} {m : ℕ} (hf : constantCoeff σ R f ^ m = 0)
    {d : σ →₀ ℕ} {n : ℕ} (hn : m + degree d ≤ n) : coeff R d (f ^ n) = 0

Proof state:
σ : Type u_1
R : Type u_3
inst✝ : CommSemiring R
f : MvPowerSeries σ R
m : ℕ
hf : (constantCoeff σ R) f ^ m = 0
d : σ →₀ ℕ
n : ℕ
hn : m + d.degree ≤ n
k : ℕ →₀ σ →₀ ℕ
hk : (range n).sum ⇑k = d ∧ k.support ⊆ range n
s : Finset ℕ := Finset.filter (fun i => k i = 0) (range n)
hs_def : s = Finset.filter (fun i => k i = 0) (range n)
hs : s ⊆ range n
hs' : ∀ i ∈ s, (coeff R (k i)) f = (constantCoeff σ R) f
hs'' : ∀ i ∈ s, k i = 0
⊢ ∀ x ∈ range n \ s, 1 ≤ (fun x => (k x).degree) x

Tactic:
simp only [hs_def, mem_filter, mem_sdiff, mem_range, not_and, and_imp]

Result:
σ : Type u_1
R : Type u_3
inst✝ : CommSemiring R
f : MvPowerSeries σ R
m : ℕ
hf : (constantCoeff σ R) f ^ m = 0
d : σ →₀ ℕ
n : ℕ
hn : m + d.degree ≤ n
k : ℕ →₀ σ →₀ ℕ
hk : (range n).sum ⇑k = d ∧ k.support ⊆ range n
s : Finset ℕ := Finset.filter (fun i => k i = 0) (range n)
hs_def : s = Finset.filter (fun i => k i = 0) (range n)
hs : s ⊆ range n
hs' : ∀ i ∈ s, (coeff R (k i)) f = (constantCoeff σ R) f
hs'' : ∀ i ∈ s, k i = 0
⊢ ∀ x < n, (x < n → ¬k x = 0) → 1 ≤ (k x).degree

Proof state:
σ : Type u_1
R : Type u_3
inst✝ : CommSemiring R
f : MvPowerSeries σ R
m : ℕ
hf : (constantCoeff σ R) f ^ m = 0
d : σ →₀ ℕ
n : ℕ
hn : m + d.degree ≤ n
⊢ ∑ l ∈ (range n).finsuppAntidiag d, ∏ i ∈ range n, (coeff R (l i)) f = 0

Tactic:
apply sum_eq_zero

Result:
case h
σ : Type u_1
R : Type u_3
inst✝ : CommSemiring R
f : MvPowerSeries σ R
m : ℕ
hf : (constantCoeff σ R) f ^ m = 0
d : σ →₀ ℕ
n : ℕ
hn : m + d.degree ≤ n
⊢ ∀ x ∈ (range n).finsuppAntidiag d, ∏ i ∈ range n, (coeff R (x i)) f = 0

Proof state:
σ : Type u_1
R : Type u_3
inst✝ : CommSemiring R
f : MvPowerSeries σ R
m : ℕ
hf : (constantCoeff σ R) f ^ m = 0
d : σ →₀ ℕ
n : ℕ
hn : m + d.degree ≤ n
k : ℕ →₀ σ →₀ ℕ
hk : (range n).sum ⇑k = d ∧ k.support ⊆ range n
s : Finset ℕ := Finset.filter (fun i => k i = 0) (range n)
hs_def : s = Finset.filter (fun i => k i = 0) (range n)
hs : s ⊆ range n
hs' : ∀ i ∈ s, (coeff R (k i)) f = (constantCoeff σ R) f
hs'' : ∀ i ∈ s, k i = 0
⊢ m + #(range n \ Finset.filter (fun i => k i = 0) (range n)) ≤ m + d.degree

Tactic:
simp only [add_comm m, Nat.add_le_add_iff_right, ← hk.1,
  ← sum_sdiff (hs), sum_eq_zero (s := s) hs'', add_zero]

Result:
σ : Type u_1
R : Type u_3
inst✝ : CommSemiring R
f : MvPowerSeries σ R
m : ℕ
hf : (constantCoeff σ R) f ^ m = 0
d : σ →₀ ℕ
n : ℕ
hn : m + d.degree ≤ n
k : ℕ →₀ σ →₀ ℕ
hk : (range n).sum ⇑k = d ∧ k.support ⊆ range n
s : Finset ℕ := Finset.filter (fun i => k i = 0) (range n)
hs_def : s = Finset.filter (fun i => k i = 0) (range n)
hs : s ⊆ range n
hs' : ∀ i ∈ s, (coeff R (k i)) f = (constantCoeff σ R) f
hs'' : ∀ i ∈ s, k i = 0
⊢ #(range n \ Finset.filter (fun i => k i = 0) (range n)) ≤ (∑ x ∈ range n \ s, k x).degree

Proof state:
case h.h
σ : Type u_1
R : Type u_3
inst✝ : CommSemiring R
f : MvPowerSeries σ R
m : ℕ
hf : (constantCoeff σ R) f ^ m = 0
d : σ →₀ ℕ
n : ℕ
hn : m + d.degree ≤ n
k : ℕ →₀ σ →₀ ℕ
hk : (range n).sum ⇑k = d ∧ k.support ⊆ range n
s : Finset ℕ := Finset.filter (fun i => k i = 0) (range n)
hs_def : s = Finset.filter (fun i => k i = 0) (range n)
hs : s ⊆ range n
hs' : ∀ i ∈ s, (coeff R (k i)) f = (constantCoeff σ R) f
hs'' : ∀ i ∈ s, k i = 0
⊢ ∏ x ∈ s, (coeff R (k x)) f = 0

Tactic:
rw [prod_congr rfl hs', prod_const]

Result:
case h.h
σ : Type u_1
R : Type u_3
inst✝ : CommSemiring R
f : MvPowerSeries σ R
m : ℕ
hf : (constantCoeff σ R) f ^ m = 0
d : σ →₀ ℕ
n : ℕ
hn : m + d.degree ≤ n
k : ℕ →₀ σ →₀ ℕ
hk : (range n).sum ⇑k = d ∧ k.support ⊆ range n
s : Finset ℕ := Finset.filter (fun i => k i = 0) (range n)
hs_def : s = Finset.filter (fun i => k i = 0) (range n)
hs : s ⊆ range n
hs' : ∀ i ∈ s, (coeff R (k i)) f = (constantCoeff σ R) f
hs'' : ∀ i ∈ s, k i = 0
⊢ (constantCoeff σ R) f ^ #s = 0