-- Mathlib/RingTheory/MvPolynomial/Homogeneous.lean
lemma finSuccEquiv_coeff_isHomogeneous {N : ℕ} {φ : MvPolynomial (Fin (N+1)) R} {n : ℕ}
    (hφ : φ.IsHomogeneous n) (i j : ℕ) (h : i + j = n) :
    ((finSuccEquiv _ _ φ).coeff i).IsHomogeneous j

Proof state:
R : Type u_3
inst✝ : CommSemiring R
N : ℕ
φ : MvPolynomial (Fin (N + 1)) R
n : ℕ
hφ : φ.IsHomogeneous n
i j : ℕ
h : i + j = n
⊢ (((finSuccEquiv R N) φ).coeff i).IsHomogeneous j

Tactic:
intro d hd

Result:
R : Type u_3
inst✝ : CommSemiring R
N : ℕ
φ : MvPolynomial (Fin (N + 1)) R
n : ℕ
hφ : φ.IsHomogeneous n
i j : ℕ
h : i + j = n
d : Fin N →₀ ℕ
hd : coeff d (((finSuccEquiv R N) φ).coeff i) ≠ 0
⊢ (weight 1) d = j

Proof state:
R : Type u_3
inst✝ : CommSemiring R
N : ℕ
φ : MvPolynomial (Fin (N + 1)) R
n : ℕ
hφ : φ.IsHomogeneous n
i j : ℕ
h : i + j = n
d : Fin N →₀ ℕ
hd : coeff d (((finSuccEquiv R N) φ).coeff i) ≠ 0
⊢ (weight 1) d = j

Tactic:
rw [finSuccEquiv_coeff_coeff] at hd

Result:
R : Type u_3
inst✝ : CommSemiring R
N : ℕ
φ : MvPolynomial (Fin (N + 1)) R
n : ℕ
hφ : φ.IsHomogeneous n
i j : ℕ
h : i + j = n
d : Fin N →₀ ℕ
hd : coeff (cons i d) φ ≠ 0
⊢ (weight 1) d = j

Proof state:
R : Type u_3
inst✝ : CommSemiring R
N : ℕ
φ : MvPolynomial (Fin (N + 1)) R
n : ℕ
hφ : φ.IsHomogeneous n
i j : ℕ
h : i + j = n
d : Fin N →₀ ℕ
hd : coeff (cons i d) φ ≠ 0
⊢ (weight 1) (cons i d) = i + j

Tactic:
simpa [Finset.sum_subset_zero_on_sdiff (g := d.cons i)
 (d.cons_support (y := i)) (by simp) (fun _ _ ↦ rfl), ← h] using hφ hd

Result:
no goals

Proof state:
R : Type u_3
inst✝ : CommSemiring R
N : ℕ
φ : MvPolynomial (Fin (N + 1)) R
n : ℕ
hφ : φ.IsHomogeneous n
i j : ℕ
h : i + j = n
d : Fin N →₀ ℕ
hd : coeff (cons i d) φ ≠ 0
⊢ ∀ x ∈ insert 0 (Finset.map (Fin.succEmb N) d.support) \ (cons i d).support, (cons i d) x = 0

Tactic:
simp

Result:
no goals

Proof state:
R : Type u_3
inst✝ : CommSemiring R
N : ℕ
φ : MvPolynomial (Fin (N + 1)) R
n : ℕ
hφ : φ.IsHomogeneous n
i j : ℕ
h : i + j = n
d : Fin N →₀ ℕ
hd : coeff (cons i d) φ ≠ 0
h' : (d.sum fun x e => e) = j
⊢ (d.sum fun i c => c) = j

Tactic:
exact h'

Result:
no goals

Proof state:
R : Type u_3
inst✝ : CommSemiring R
N : ℕ
φ : MvPolynomial (Fin (N + 1)) R
n : ℕ
hφ : φ.IsHomogeneous n
i j : ℕ
h : i + j = n
d : Fin N →₀ ℕ
hd : coeff (cons i d) φ ≠ 0
h' : (weight 1) (cons i d) = i + j
⊢ (weight 1) d = j

Tactic:
simp only [weight_apply, Pi.one_apply, smul_eq_mul, mul_one, Finsupp.sum_cons,
  add_right_inj] at h' ⊢

Result:
R : Type u_3
inst✝ : CommSemiring R
N : ℕ
φ : MvPolynomial (Fin (N + 1)) R
n : ℕ
hφ : φ.IsHomogeneous n
i j : ℕ
h : i + j = n
d : Fin N →₀ ℕ
hd : coeff (cons i d) φ ≠ 0
h' : (d.sum fun x e => e) = j
⊢ (d.sum fun i c => c) = j

Proof state:
R : Type u_3
inst✝ : CommSemiring R
N : ℕ
φ : MvPolynomial (Fin (N + 1)) R
n : ℕ
hφ : φ.IsHomogeneous n
i j : ℕ
h : i + j = n
d : Fin N →₀ ℕ
hd : coeff (cons i d) φ ≠ 0
⊢ (weight 1) d = j

Tactic:
have h' : (weight 1) (Finsupp.cons i d) = i + j := by
  simpa [Finset.sum_subset_zero_on_sdiff (g := d.cons i)
   (d.cons_support (y := i)) (by simp) (fun _ _ ↦ rfl), ← h] using hφ hd

Result:
R : Type u_3
inst✝ : CommSemiring R
N : ℕ
φ : MvPolynomial (Fin (N + 1)) R
n : ℕ
hφ : φ.IsHomogeneous n
i j : ℕ
h : i + j = n
d : Fin N →₀ ℕ
hd : coeff (cons i d) φ ≠ 0
h' : (weight 1) (cons i d) = i + j
⊢ (weight 1) d = j