Theorem: _private.Mathlib.RingTheory.MvPolynomial.NewtonIdentities.0.MvPolynomial.NewtonIdentities.weight_add_weight_pairMap
File: Mathlib/RingTheory/MvPolynomial/NewtonIdentities.lean

Proof steps:
state_before: σ : Type u_1
inst✝² : Fintype σ
inst✝¹ : DecidableEq σ
R : Type u_2
inst✝ : CommRing R
k : ℕ
t : Finset σ × σ
h : t ∈ MvPolynomial.NewtonIdentities.pairs σ k
⊢ MvPolynomial.NewtonIdentities.weight σ R k t +
      MvPolynomial.NewtonIdentities.weight σ R k (MvPolynomial.NewtonIdentities.pairMap σ t) =
    0
state_after: σ : Type u_1
inst✝² : Fintype σ
inst✝¹ : DecidableEq σ
R : Type u_2
inst✝ : CommRing R
k : ℕ
t : Finset σ × σ
h : t ∈ MvPolynomial.NewtonIdentities.pairs σ k
⊢ (-1) ^ t.1.card * ((∏ a ∈ t.1, X a) * X t.2 ^ (k - t.1.card)) +
      (-1) ^ (MvPolynomial.NewtonIdentities.pairMap σ t).1.card *
        ((∏ a ∈ (MvPolynomial.NewtonIdentities.pairMap σ t).1, X a) *
          X (MvPolynomial.NewtonIdentities.pairMap σ t).2 ^ (k - (MvPolynomial.NewtonIdentities.pairMap σ t).1.card)) =
    0
tactic: rw [weight, weight]
state_before: σ : Type u_1
inst✝² : Fintype σ
inst✝¹ : DecidableEq σ
R : Type u_2
inst✝ : CommRing R
k : ℕ
t : Finset σ × σ
h : t ∈ MvPolynomial.NewtonIdentities.pairs σ k
⊢ (-1) ^ t.1.card * ((∏ a ∈ t.1, X a) * X t.2 ^ (k - t.1.card)) +
      (-1) ^ (MvPolynomial.NewtonIdentities.pairMap σ t).1.card *
        ((∏ a ∈ (MvPolynomial.NewtonIdentities.pairMap σ t).1, X a) *
          X (MvPolynomial.NewtonIdentities.pairMap σ t).2 ^ (k - (MvPolynomial.NewtonIdentities.pairMap σ t).1.card)) =
    0
state_after: σ : Type u_1
inst✝² : Fintype σ
inst✝¹ : DecidableEq σ
R : Type u_2
inst✝ : CommRing R
k : ℕ
t : Finset σ × σ
h : t.1.card ≤ k ∧ (t.1.card = k → t.2 ∈ t.1)
⊢ (-1) ^ t.1.card * ((∏ a ∈ t.1, X a) * X t.2 ^ (k - t.1.card)) +
      (-1) ^ (MvPolynomial.NewtonIdentities.pairMap σ t).1.card *
        ((∏ a ∈ (MvPolynomial.NewtonIdentities.pairMap σ t).1, X a) *
          X (MvPolynomial.NewtonIdentities.pairMap σ t).2 ^ (k - (MvPolynomial.NewtonIdentities.pairMap σ t).1.card)) =
    0
tactic: rw [mem_pairs] at h
state_before: σ : Type u_1
inst✝² : Fintype σ
inst✝¹ : DecidableEq σ
R : Type u_2
inst✝ : CommRing R
k : ℕ
t : Finset σ × σ
h : t.1.card ≤ k ∧ (t.1.card = k → t.2 ∈ t.1)
⊢ (-1) ^ t.1.card * ((∏ a ∈ t.1, X a) * X t.2 ^ (k - t.1.card)) +
      (-1) ^ (MvPolynomial.NewtonIdentities.pairMap σ t).1.card *
        ((∏ a ∈ (MvPolynomial.NewtonIdentities.pairMap σ t).1, X a) *
          X (MvPolynomial.NewtonIdentities.pairMap σ t).2 ^ (k - (MvPolynomial.NewtonIdentities.pairMap σ t).1.card)) =
    0
state_after: σ : Type u_1
inst✝² : Fintype σ
inst✝¹ : DecidableEq σ
R : Type u_2
inst✝ : CommRing R
k : ℕ
t : Finset σ × σ
h : t.1.card ≤ k ∧ (t.1.card = k → t.2 ∈ t.1)
h2 : ∀ (n : ℕ), -(-1) ^ n = (-1) ^ (n + 1)
⊢ (-1) ^ t.1.card * ((∏ a ∈ t.1, X a) * X t.2 ^ (k - t.1.card)) +
      (-1) ^ (MvPolynomial.NewtonIdentities.pairMap σ t).1.card *
        ((∏ a ∈ (MvPolynomial.NewtonIdentities.pairMap σ t).1, X a) *
          X (MvPolynomial.NewtonIdentities.pairMap σ t).2 ^ (k - (MvPolynomial.NewtonIdentities.pairMap σ t).1.card)) =
    0
tactic: have h2 (n : ℕ) : -(-1 : MvPolynomial σ R) ^ n = (-1) ^ (n + 1) := by
    rw [← neg_one_mul ((-1 : MvPolynomial σ R) ^ n), pow_add, pow_one, mul_comm]
state_before: σ : Type u_1
inst✝² : Fintype σ
inst✝¹ : DecidableEq σ
R : Type u_2
inst✝ : CommRing R
k : ℕ
t : Finset σ × σ
h : t.1.card ≤ k ∧ (t.1.card = k → t.2 ∈ t.1)
h2 : ∀ (n : ℕ), -(-1) ^ n = (-1) ^ (n + 1)
⊢ (-1) ^ t.1.card * ((∏ a ∈ t.1, X a) * X t.2 ^ (k - t.1.card)) +
      (-1) ^ (MvPolynomial.NewtonIdentities.pairMap σ t).1.card *
        ((∏ a ∈ (MvPolynomial.NewtonIdentities.pairMap σ t).1, X a) *
          X (MvPolynomial.NewtonIdentities.pairMap σ t).2 ^ (k - (MvPolynomial.NewtonIdentities.pairMap σ t).1.card)) =
    0
state_after: case inl
σ : Type u_1
inst✝² : Fintype σ
inst✝¹ : DecidableEq σ
R : Type u_2
inst✝ : CommRing R
k : ℕ
t : Finset σ × σ
h : t.1.card ≤ k ∧ (t.1.card = k → t.2 ∈ t.1)
h2 : ∀ (n : ℕ), -(-1) ^ n = (-1) ^ (n + 1)
h1 : t.2 ∈ t.1
⊢ (-1) ^ t.1.card * ((∏ a ∈ t.1, X a) * X t.2 ^ (k - t.1.card)) +
      (-1) ^ (MvPolynomial.NewtonIdentities.pairMap σ t).1.card *
        ((∏ a ∈ (MvPolynomial.NewtonIdentities.pairMap σ t).1, X a) *
          X (MvPolynomial.NewtonIdentities.pairMap σ t).2 ^ (k - (MvPolynomial.NewtonIdentities.pairMap σ t).1.card)) =
    0

case inr
σ : Type u_1
inst✝² : Fintype σ
inst✝¹ : DecidableEq σ
R : Type u_2
inst✝ : CommRing R
k : ℕ
t : Finset σ × σ
h : t.1.card ≤ k ∧ (t.1.card = k → t.2 ∈ t.1)
h2 : ∀ (n : ℕ), -(-1) ^ n = (-1) ^ (n + 1)
h1 : t.2 ∉ t.1
⊢ (-1) ^ t.1.card * ((∏ a ∈ t.1, X a) * X t.2 ^ (k - t.1.card)) +
      (-1) ^ (MvPolynomial.NewtonIdentities.pairMap σ t).1.card *
        ((∏ a ∈ (MvPolynomial.NewtonIdentities.pairMap σ t).1, X a) *
          X (MvPolynomial.NewtonIdentities.pairMap σ t).2 ^ (k - (MvPolynomial.NewtonIdentities.pairMap σ t).1.card)) =
    0
tactic: rcases (em (t.snd ∈ t.fst)) with h1 | h1