Theorem: Sym2.filter_image_quotient_mk''_not_isDiag
File: Mathlib/Data/Sym/Sym2.lean

tactic: ext z
state_before: α : Type u_1
β : Type ?u.118486
γ : Type ?u.118489
inst✝ : DecidableEq α
s : Finset α
⊢ filter (fun a => ¬IsDiag a) (image Quotient.mk'' (s ×ˢ s)) = image Quotient.mk'' (offDiag s)

tactic: induction z using Sym2.inductionOn
state_before: case a
α : Type u_1
β : Type ?u.118486
γ : Type ?u.118489
inst✝ : DecidableEq α
s : Finset α
z : Sym2 α
⊢ z ∈ filter (fun a => ¬IsDiag a) (image Quotient.mk'' (s ×ˢ s)) ↔ z ∈ image Quotient.mk'' (offDiag s)

tactic: simp only [mem_image, mem_offDiag, mem_filter, Prod.exists, mem_product]
state_before: case a.hf
α : Type u_1
β : Type ?u.118486
γ : Type ?u.118489
inst✝ : DecidableEq α
s : Finset α
x✝ y✝ : α
⊢ Quotient.mk (Rel.setoid α) (x✝, y✝) ∈ filter (fun a => ¬IsDiag a) (image Quotient.mk'' (s ×ˢ s)) ↔
    Quotient.mk (Rel.setoid α) (x✝, y✝) ∈ image Quotient.mk'' (offDiag s)

tactic: constructor
state_before: case a.hf
α : Type u_1
β : Type ?u.118486
γ : Type ?u.118489
inst✝ : DecidableEq α
s : Finset α
x✝ y✝ : α
⊢ (∃ a b, (a ∈ s ∧ b ∈ s) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)) ∧
      ¬IsDiag (Quotient.mk (Rel.setoid α) (x✝, y✝)) ↔
    ∃ a b, (a ∈ s ∧ b ∈ s ∧ a ≠ b) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)

tactic: rintro ⟨⟨a, b, ⟨ha, hb⟩, (h : Quotient.mk _ _ = _)⟩, hab⟩
state_before: case a.hf.mp
α : Type u_1
β : Type ?u.118486
γ : Type ?u.118489
inst✝ : DecidableEq α
s : Finset α
x✝ y✝ : α
⊢ (∃ a b, (a ∈ s ∧ b ∈ s) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)) ∧
      ¬IsDiag (Quotient.mk (Rel.setoid α) (x✝, y✝)) →
    ∃ a b, (a ∈ s ∧ b ∈ s ∧ a ≠ b) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)

tactic: rw [← h, Sym2.mk''_isDiag_iff] at hab
state_before: case a.hf.mp.intro.intro.intro.intro.intro
α : Type u_1
β : Type ?u.118486
γ : Type ?u.118489
inst✝ : DecidableEq α
s : Finset α
x✝ y✝ : α
hab : ¬IsDiag (Quotient.mk (Rel.setoid α) (x✝, y✝))
a b : α
h : Quotient.mk (Rel.setoid α) (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)
ha : a ∈ s
hb : b ∈ s
⊢ ∃ a b, (a ∈ s ∧ b ∈ s ∧ a ≠ b) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)

tactic: exact ⟨a, b, ⟨ha, hb, hab⟩, h⟩
state_before: case a.hf.mp.intro.intro.intro.intro.intro
α : Type u_1
β : Type ?u.118486
γ : Type ?u.118489
inst✝ : DecidableEq α
s : Finset α
x✝ y✝ a b : α
hab : ¬a = b
h : Quotient.mk (Rel.setoid α) (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)
ha : a ∈ s
hb : b ∈ s
⊢ ∃ a b, (a ∈ s ∧ b ∈ s ∧ a ≠ b) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)

tactic: rintro ⟨a, b, ⟨ha, hb, hab⟩, (h : Quotient.mk _ _ = _)⟩
state_before: case a.hf.mpr
α : Type u_1
β : Type ?u.118486
γ : Type ?u.118489
inst✝ : DecidableEq α
s : Finset α
x✝ y✝ : α
⊢ (∃ a b, (a ∈ s ∧ b ∈ s ∧ a ≠ b) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)) →
    (∃ a b, (a ∈ s ∧ b ∈ s) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)) ∧
      ¬IsDiag (Quotient.mk (Rel.setoid α) (x✝, y✝))

tactic: rw [Ne.def, ← Sym2.mk''_isDiag_iff, h] at hab
state_before: case a.hf.mpr.intro.intro.intro.intro.intro
α : Type u_1
β : Type ?u.118486
γ : Type ?u.118489
inst✝ : DecidableEq α
s : Finset α
x✝ y✝ a b : α
h : Quotient.mk (Rel.setoid α) (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)
ha : a ∈ s
hb : b ∈ s
hab : a ≠ b
⊢ (∃ a b, (a ∈ s ∧ b ∈ s) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)) ∧
    ¬IsDiag (Quotient.mk (Rel.setoid α) (x✝, y✝))

tactic: exact ⟨⟨a, b, ⟨ha, hb⟩, h⟩, hab⟩
state_before: case a.hf.mpr.intro.intro.intro.intro.intro
α : Type u_1
β : Type ?u.118486
γ : Type ?u.118489
inst✝ : DecidableEq α
s : Finset α
x✝ y✝ a b : α
h : Quotient.mk (Rel.setoid α) (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)
ha : a ∈ s
hb : b ∈ s
hab : ¬IsDiag (Quotient.mk (Rel.setoid α) (x✝, y✝))
⊢ (∃ a b, (a ∈ s ∧ b ∈ s) ∧ Quotient.mk'' (a, b) = Quotient.mk (Rel.setoid α) (x✝, y✝)) ∧
    ¬IsDiag (Quotient.mk (Rel.setoid α) (x✝, y✝))