Theorem: MvPolynomial.NewtonIdentities.disjUnion_filter_pairs_eq_pairs
File: Mathlib/RingTheory/MvPolynomial/NewtonIdentities.lean

tactic: simp only [disjUnion_eq_union, Finset.ext_iff, pairs, filter_filter, mem_filter]
state_before: σ : Type u_1
inst✝² : Fintype σ
inst✝¹ : DecidableEq σ
R : Type u_2
inst✝ : CommRing R
k : ℕ
⊢ (filter (fun t => t.1.card < k) (MvPolynomial.NewtonIdentities.pairs σ k)).disjUnion
      (filter (fun t => t.1.card = k) (MvPolynomial.NewtonIdentities.pairs σ k)) ⋯ =
    MvPolynomial.NewtonIdentities.pairs σ k
state_after: σ : Type u_1
inst✝² : Fintype σ
inst✝¹ : DecidableEq σ
R : Type u_2
inst✝ : CommRing R
k : ℕ
⊢ ∀ (a : Finset σ × σ),
    a ∈
        filter (fun a => (a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)) ∧ a.1.card < k) univ ∪
          filter (fun a => (a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)) ∧ a.1.card = k) univ ↔
      a ∈ univ ∧ a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)

tactic: intro a
state_before: σ : Type u_1
inst✝² : Fintype σ
inst✝¹ : DecidableEq σ
R : Type u_2
inst✝ : CommRing R
k : ℕ
⊢ ∀ (a : Finset σ × σ),
    a ∈
        filter (fun a => (a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)) ∧ a.1.card < k) univ ∪
          filter (fun a => (a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)) ∧ a.1.card = k) univ ↔
      a ∈ univ ∧ a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)
state_after: σ : Type u_1
inst✝² : Fintype σ
inst✝¹ : DecidableEq σ
R : Type u_2
inst✝ : CommRing R
k : ℕ
a : Finset σ × σ
⊢ a ∈
      filter (fun a => (a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)) ∧ a.1.card < k) univ ∪
        filter (fun a => (a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)) ∧ a.1.card = k) univ ↔
    a ∈ univ ∧ a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)

tactic: rw [← filter_or, mem_filter]
state_before: σ : Type u_1
inst✝² : Fintype σ
inst✝¹ : DecidableEq σ
R : Type u_2
inst✝ : CommRing R
k : ℕ
a : Finset σ × σ
⊢ a ∈
      filter (fun a => (a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)) ∧ a.1.card < k) univ ∪
        filter (fun a => (a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)) ∧ a.1.card = k) univ ↔
    a ∈ univ ∧ a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)
state_after: σ : Type u_1
inst✝² : Fintype σ
inst✝¹ : DecidableEq σ
R : Type u_2
inst✝ : CommRing R
k : ℕ
a : Finset σ × σ
⊢ a ∈ univ ∧
      ((a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)) ∧ a.1.card < k ∨
        (a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)) ∧ a.1.card = k) ↔
    a ∈ univ ∧ a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)

tactic: refine ⟨fun ha ↦ by tauto, fun ha ↦ ?_⟩
state_before: σ : Type u_1
inst✝² : Fintype σ
inst✝¹ : DecidableEq σ
R : Type u_2
inst✝ : CommRing R
k : ℕ
a : Finset σ × σ
⊢ a ∈ univ ∧
      ((a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)) ∧ a.1.card < k ∨
        (a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)) ∧ a.1.card = k) ↔
    a ∈ univ ∧ a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)
state_after: σ : Type u_1
inst✝² : Fintype σ
inst✝¹ : DecidableEq σ
R : Type u_2
inst✝ : CommRing R
k : ℕ
a : Finset σ × σ
ha : a ∈ univ ∧ a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)
⊢ a ∈ univ ∧
    ((a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)) ∧ a.1.card < k ∨
      (a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)) ∧ a.1.card = k)

tactic: have hacard := le_iff_lt_or_eq.mp ha.2.1
state_before: σ : Type u_1
inst✝² : Fintype σ
inst✝¹ : DecidableEq σ
R : Type u_2
inst✝ : CommRing R
k : ℕ
a : Finset σ × σ
ha : a ∈ univ ∧ a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)
⊢ a ∈ univ ∧
    ((a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)) ∧ a.1.card < k ∨
      (a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)) ∧ a.1.card = k)
state_after: σ : Type u_1
inst✝² : Fintype σ
inst✝¹ : DecidableEq σ
R : Type u_2
inst✝ : CommRing R
k : ℕ
a : Finset σ × σ
ha : a ∈ univ ∧ a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)
hacard : a.1.card < k ∨ a.1.card = k
⊢ a ∈ univ ∧
    ((a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)) ∧ a.1.card < k ∨
      (a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)) ∧ a.1.card = k)

tactic: tauto
state_before: σ : Type u_1
inst✝² : Fintype σ
inst✝¹ : DecidableEq σ
R : Type u_2
inst✝ : CommRing R
k : ℕ
a : Finset σ × σ
ha : a ∈ univ ∧ a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)
hacard : a.1.card < k ∨ a.1.card = k
⊢ a ∈ univ ∧
    ((a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)) ∧ a.1.card < k ∨
      (a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)) ∧ a.1.card = k)
state_after: no goals

tactic: tauto
state_before: σ : Type u_1
inst✝² : Fintype σ
inst✝¹ : DecidableEq σ
R : Type u_2
inst✝ : CommRing R
k : ℕ
a : Finset σ × σ
ha :
  a ∈ univ ∧
    ((a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)) ∧ a.1.card < k ∨
      (a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)) ∧ a.1.card = k)
⊢ a ∈ univ ∧ a.1.card ≤ k ∧ (a.1.card = k → a.2 ∈ a.1)
state_after: no goals