-- Mathlib/RingTheory/MvPolynomial/Symmetric/NewtonIdentities.lean
theorem sum_filter_pairs_eq_sum_powersetCard_mem_filter_antidiagonal_sum (k : ℕ) (a : ℕ × ℕ)
    (ha : a ∈ {a ∈ antidiagonal k | a.fst < k}) (f : Finset σ × σ → MvPolynomial σ R) :
    ∑ t ∈ pairs σ k with #t.1 = a.1, f t = ∑ A ∈ powersetCard a.1 univ, ∑ j, f (A, j)

Proof state:
case h
σ : Type u_1
R : Type u_2
inst✝² : CommRing R
inst✝¹ : DecidableEq σ
inst✝ : Fintype σ
k : ℕ
a : ℕ × ℕ
ha : a ∈ filter (fun a => a.1 < k) (antidiagonal k)
f : Finset σ × σ → MvPolynomial σ R
⊢ ∀ (p : Finset σ × σ),
    p ∈ filter (fun t => #t.1 = a.1) (MvPolynomial.NewtonIdentities.pairs σ k) ↔
      p.1 ∈ powersetCard a.1 univ ∧ p.2 ∈ univ

Tactic:
simp only [mem_filter, mem_powersetCard_univ, mem_univ, and_true, and_iff_right_iff_imp]

Result:
case h
σ : Type u_1
R : Type u_2
inst✝² : CommRing R
inst✝¹ : DecidableEq σ
inst✝ : Fintype σ
k : ℕ
a : ℕ × ℕ
ha : a ∈ filter (fun a => a.1 < k) (antidiagonal k)
f : Finset σ × σ → MvPolynomial σ R
⊢ ∀ (p : Finset σ × σ), #p.1 = a.1 → p ∈ MvPolynomial.NewtonIdentities.pairs σ k

Proof state:
σ : Type u_1
R : Type u_2
inst✝² : CommRing R
inst✝¹ : DecidableEq σ
inst✝ : Fintype σ
k : ℕ
a : ℕ × ℕ
ha : a ∈ filter (fun a => a.1 < k) (antidiagonal k)
f : Finset σ × σ → MvPolynomial σ R
⊢ ∑ t ∈ filter (fun t => #t.1 = a.1) (MvPolynomial.NewtonIdentities.pairs σ k), f t =
    ∑ A ∈ powersetCard a.1 univ, ∑ j : σ, f (A, j)

Tactic:
apply sum_finset_product

Result:
case h
σ : Type u_1
R : Type u_2
inst✝² : CommRing R
inst✝¹ : DecidableEq σ
inst✝ : Fintype σ
k : ℕ
a : ℕ × ℕ
ha : a ∈ filter (fun a => a.1 < k) (antidiagonal k)
f : Finset σ × σ → MvPolynomial σ R
⊢ ∀ (p : Finset σ × σ),
    p ∈ filter (fun t => #t.1 = a.1) (MvPolynomial.NewtonIdentities.pairs σ k) ↔
      p.1 ∈ powersetCard a.1 univ ∧ p.2 ∈ univ

Proof state:
case hab
σ : Type u_1
R : Type u_2
inst✝² : CommRing R
inst✝¹ : DecidableEq σ
inst✝ : Fintype σ
k : ℕ
a : ℕ × ℕ
ha : a ∈ filter (fun a => a.1 < k) (antidiagonal k)
f : Finset σ × σ → MvPolynomial σ R
p : Finset σ × σ
hp : #p.1 = a.1
⊢ #p.1 < k

Tactic:
aesop

Result:
no goals

Proof state:
case h
σ : Type u_1
R : Type u_2
inst✝² : CommRing R
inst✝¹ : DecidableEq σ
inst✝ : Fintype σ
k : ℕ
a : ℕ × ℕ
ha : a ∈ filter (fun a => a.1 < k) (antidiagonal k)
f : Finset σ × σ → MvPolynomial σ R
p : Finset σ × σ
hp : #p.1 = a.1
⊢ p ∈ MvPolynomial.NewtonIdentities.pairs σ k

Tactic:
have : #p.fst ≤ k := by apply le_of_lt; aesop

Result:
case h
σ : Type u_1
R : Type u_2
inst✝² : CommRing R
inst✝¹ : DecidableEq σ
inst✝ : Fintype σ
k : ℕ
a : ℕ × ℕ
ha : a ∈ filter (fun a => a.1 < k) (antidiagonal k)
f : Finset σ × σ → MvPolynomial σ R
p : Finset σ × σ
hp : #p.1 = a.1
this : #p.1 ≤ k
⊢ p ∈ MvPolynomial.NewtonIdentities.pairs σ k

Proof state:
case h
σ : Type u_1
R : Type u_2
inst✝² : CommRing R
inst✝¹ : DecidableEq σ
inst✝ : Fintype σ
k : ℕ
a : ℕ × ℕ
ha : a ∈ filter (fun a => a.1 < k) (antidiagonal k)
f : Finset σ × σ → MvPolynomial σ R
⊢ ∀ (p : Finset σ × σ), #p.1 = a.1 → p ∈ MvPolynomial.NewtonIdentities.pairs σ k

Tactic:
rintro p hp

Result:
case h
σ : Type u_1
R : Type u_2
inst✝² : CommRing R
inst✝¹ : DecidableEq σ
inst✝ : Fintype σ
k : ℕ
a : ℕ × ℕ
ha : a ∈ filter (fun a => a.1 < k) (antidiagonal k)
f : Finset σ × σ → MvPolynomial σ R
p : Finset σ × σ
hp : #p.1 = a.1
⊢ p ∈ MvPolynomial.NewtonIdentities.pairs σ k

Proof state:
σ : Type u_1
R : Type u_2
inst✝² : CommRing R
inst✝¹ : DecidableEq σ
inst✝ : Fintype σ
k : ℕ
a : ℕ × ℕ
ha : a ∈ filter (fun a => a.1 < k) (antidiagonal k)
f : Finset σ × σ → MvPolynomial σ R
p : Finset σ × σ
hp : #p.1 = a.1
⊢ #p.1 ≤ k

Tactic:
apply le_of_lt

Result:
case hab
σ : Type u_1
R : Type u_2
inst✝² : CommRing R
inst✝¹ : DecidableEq σ
inst✝ : Fintype σ
k : ℕ
a : ℕ × ℕ
ha : a ∈ filter (fun a => a.1 < k) (antidiagonal k)
f : Finset σ × σ → MvPolynomial σ R
p : Finset σ × σ
hp : #p.1 = a.1
⊢ #p.1 < k

Proof state:
case h
σ : Type u_1
R : Type u_2
inst✝² : CommRing R
inst✝¹ : DecidableEq σ
inst✝ : Fintype σ
k : ℕ
a : ℕ × ℕ
ha : a ∈ filter (fun a => a.1 < k) (antidiagonal k)
f : Finset σ × σ → MvPolynomial σ R
p : Finset σ × σ
hp : #p.1 = a.1
this : #p.1 ≤ k
⊢ p ∈ MvPolynomial.NewtonIdentities.pairs σ k

Tactic:
aesop

Result:
no goals