-- Mathlib/Combinatorics/SimpleGraph/Triangle/Counting.lean
private lemma triple_eq_triple_of_mem (hst : Disjoint s t) (hsu : Disjoint s u) (htu : Disjoint t u)
    {x₁ x₂ y₁ y₂ z₁ z₂ : α} (h : ({x₁, y₁, z₁} : Finset α) = {x₂, y₂, z₂})
    (hx₁ : x₁ ∈ s) (hx₂ : x₂ ∈ s) (hy₁ : y₁ ∈ t) (hy₂ : y₂ ∈ t) (hz₁ : z₁ ∈ u) (hz₂ : z₂ ∈ u) :
    (x₁, y₁, z₁) = (x₂, y₂, z₂)

Proof state:
α : Type u_1
s t u : Finset α
inst✝ : DecidableEq α
hst : Disjoint s t
hsu : Disjoint s u
htu : Disjoint t u
x₁ x₂ y₁ y₂ z₁ z₂ : α
h : {x₁, y₁, z₁} = {x₂, y₂, z₂}
hx₁ : x₁ ∈ s
hx₂ : x₂ ∈ s
hy₁ : y₁ ∈ t
hy₂ : y₂ ∈ t
hz₁ : z₁ ∈ u
hz₂ : z₂ ∈ u
⊢ (x₁, y₁, z₁) = (x₂, y₂, z₂)

Tactic:
simp only [Finset.Subset.antisymm_iff, subset_iff, mem_insert, mem_singleton, forall_eq_or_imp,
  forall_eq] at h

Result:
α : Type u_1
s t u : Finset α
inst✝ : DecidableEq α
hst : Disjoint s t
hsu : Disjoint s u
htu : Disjoint t u
x₁ x₂ y₁ y₂ z₁ z₂ : α
hx₁ : x₁ ∈ s
hx₂ : x₂ ∈ s
hy₁ : y₁ ∈ t
hy₂ : y₂ ∈ t
hz₁ : z₁ ∈ u
hz₂ : z₂ ∈ u
h :
  ((x₁ = x₂ ∨ x₁ = y₂ ∨ x₁ = z₂) ∧ (y₁ = x₂ ∨ y₁ = y₂ ∨ y₁ = z₂) ∧ (z₁ = x₂ ∨ z₁ = y₂ ∨ z₁ = z₂)) ∧
    (x₂ = x₁ ∨ x₂ = y₁ ∨ x₂ = z₁) ∧ (y₂ = x₁ ∨ y₂ = y₁ ∨ y₂ = z₁) ∧ (z₂ = x₁ ∨ z₂ = y₁ ∨ z₂ = z₁)
⊢ (x₁, y₁, z₁) = (x₂, y₂, z₂)

Proof state:
case refine_6
α : Type u_1
s t u : Finset α
inst✝ : DecidableEq α
hst : ∀ ⦃a : α⦄, a ∈ s → a ∉ t
hsu : ∀ ⦃a : α⦄, a ∈ s → a ∉ u
htu : ∀ ⦃a : α⦄, a ∈ t → a ∉ u
x₁ x₂ y₁ y₂ z₁ z₂ : α
hx₁ : x₁ ∈ s
hx₂ : x₂ ∈ s
hy₁ : y₁ ∈ t
hy₂ : y₂ ∈ t
hz₁ : z₁ ∈ u
hz₂ : z₂ ∈ u
h :
  (x₁ = x₂ ∨ x₁ = y₂ ∨ x₁ = z₂) ∧
    (y₁ = y₂ ∨ y₁ = x₂ ∨ y₁ = z₂) ∧
      (z₁ = z₂ ∨ z₁ = x₂ ∨ z₁ = y₂) ∧
        (x₂ = x₁ ∨ x₂ = y₁ ∨ x₂ = z₁) ∧ (y₂ = x₁ ∨ y₂ = y₁ ∨ y₂ = z₁) ∧ (z₂ = x₁ ∨ z₂ = y₁ ∨ z₂ = z₁)
⊢ ¬z₁ = y₂

Tactic:
rintro rfl

Result:
case refine_6
α : Type u_1
s t u : Finset α
inst✝ : DecidableEq α
hst : ∀ ⦃a : α⦄, a ∈ s → a ∉ t
hsu : ∀ ⦃a : α⦄, a ∈ s → a ∉ u
htu : ∀ ⦃a : α⦄, a ∈ t → a ∉ u
x₁ x₂ y₁ z₁ z₂ : α
hx₁ : x₁ ∈ s
hx₂ : x₂ ∈ s
hy₁ : y₁ ∈ t
hz₁ : z₁ ∈ u
hz₂ : z₂ ∈ u
hy₂ : z₁ ∈ t
h :
  (x₁ = x₂ ∨ x₁ = z₁ ∨ x₁ = z₂) ∧
    (y₁ = z₁ ∨ y₁ = x₂ ∨ y₁ = z₂) ∧
      (z₁ = z₂ ∨ z₁ = x₂ ∨ z₁ = z₁) ∧
        (x₂ = x₁ ∨ x₂ = y₁ ∨ x₂ = z₁) ∧ (z₁ = x₁ ∨ z₁ = y₁ ∨ z₁ = z₁) ∧ (z₂ = x₁ ∨ z₂ = y₁ ∨ z₂ = z₁)
⊢ False

Proof state:
α : Type u_1
s t u : Finset α
inst✝ : DecidableEq α
hst : ∀ ⦃a : α⦄, a ∈ s → a ∉ t
hsu : ∀ ⦃a : α⦄, a ∈ s → a ∉ u
htu : ∀ ⦃a : α⦄, a ∈ t → a ∉ u
x₁ x₂ y₁ y₂ z₁ z₂ : α
hx₁ : x₁ ∈ s
hx₂ : x₂ ∈ s
hy₁ : y₁ ∈ t
hy₂ : y₂ ∈ t
hz₁ : z₁ ∈ u
hz₂ : z₂ ∈ u
h :
  ((x₁ = x₂ ∨ x₁ = y₂ ∨ x₁ = z₂) ∧ (y₁ = x₂ ∨ y₁ = y₂ ∨ y₁ = z₂) ∧ (z₁ = x₂ ∨ z₁ = y₂ ∨ z₁ = z₂)) ∧
    (x₂ = x₁ ∨ x₂ = y₁ ∨ x₂ = z₁) ∧ (y₂ = x₁ ∨ y₂ = y₁ ∨ y₂ = z₁) ∧ (z₂ = x₁ ∨ z₂ = y₁ ∨ z₂ = z₁)
⊢ (x₁, y₁, z₁) = (x₂, y₂, z₂)

Tactic:
rw [Prod.mk.inj_iff, Prod.mk.inj_iff]

Result:
α : Type u_1
s t u : Finset α
inst✝ : DecidableEq α
hst : ∀ ⦃a : α⦄, a ∈ s → a ∉ t
hsu : ∀ ⦃a : α⦄, a ∈ s → a ∉ u
htu : ∀ ⦃a : α⦄, a ∈ t → a ∉ u
x₁ x₂ y₁ y₂ z₁ z₂ : α
hx₁ : x₁ ∈ s
hx₂ : x₂ ∈ s
hy₁ : y₁ ∈ t
hy₂ : y₂ ∈ t
hz₁ : z₁ ∈ u
hz₂ : z₂ ∈ u
h :
  ((x₁ = x₂ ∨ x₁ = y₂ ∨ x₁ = z₂) ∧ (y₁ = x₂ ∨ y₁ = y₂ ∨ y₁ = z₂) ∧ (z₁ = x₂ ∨ z₁ = y₂ ∨ z₁ = z₂)) ∧
    (x₂ = x₁ ∨ x₂ = y₁ ∨ x₂ = z₁) ∧ (y₂ = x₁ ∨ y₂ = y₁ ∨ y₂ = z₁) ∧ (z₂ = x₁ ∨ z₂ = y₁ ∨ z₂ = z₁)
⊢ x₁ = x₂ ∧ y₁ = y₂ ∧ z₁ = z₂

Proof state:
α : Type u_1
s t u : Finset α
inst✝ : DecidableEq α
hst : Disjoint s t
hsu : Disjoint s u
htu : Disjoint t u
x₁ x₂ y₁ y₂ z₁ z₂ : α
hx₁ : x₁ ∈ s
hx₂ : x₂ ∈ s
hy₁ : y₁ ∈ t
hy₂ : y₂ ∈ t
hz₁ : z₁ ∈ u
hz₂ : z₂ ∈ u
h :
  ((x₁ = x₂ ∨ x₁ = y₂ ∨ x₁ = z₂) ∧ (y₁ = x₂ ∨ y₁ = y₂ ∨ y₁ = z₂) ∧ (z₁ = x₂ ∨ z₁ = y₂ ∨ z₁ = z₂)) ∧
    (x₂ = x₁ ∨ x₂ = y₁ ∨ x₂ = z₁) ∧ (y₂ = x₁ ∨ y₂ = y₁ ∨ y₂ = z₁) ∧ (z₂ = x₁ ∨ z₂ = y₁ ∨ z₂ = z₁)
⊢ (x₁, y₁, z₁) = (x₂, y₂, z₂)

Tactic:
rw [disjoint_left] at hst hsu htu

Result:
α : Type u_1
s t u : Finset α
inst✝ : DecidableEq α
hst : ∀ ⦃a : α⦄, a ∈ s → a ∉ t
hsu : ∀ ⦃a : α⦄, a ∈ s → a ∉ u
htu : ∀ ⦃a : α⦄, a ∈ t → a ∉ u
x₁ x₂ y₁ y₂ z₁ z₂ : α
hx₁ : x₁ ∈ s
hx₂ : x₂ ∈ s
hy₁ : y₁ ∈ t
hy₂ : y₂ ∈ t
hz₁ : z₁ ∈ u
hz₂ : z₂ ∈ u
h :
  ((x₁ = x₂ ∨ x₁ = y₂ ∨ x₁ = z₂) ∧ (y₁ = x₂ ∨ y₁ = y₂ ∨ y₁ = z₂) ∧ (z₁ = x₂ ∨ z₁ = y₂ ∨ z₁ = z₂)) ∧
    (x₂ = x₁ ∨ x₂ = y₁ ∨ x₂ = z₁) ∧ (y₂ = x₁ ∨ y₂ = y₁ ∨ y₂ = z₁) ∧ (z₂ = x₁ ∨ z₂ = y₁ ∨ z₂ = z₁)
⊢ (x₁, y₁, z₁) = (x₂, y₂, z₂)

Proof state:
α : Type u_1
s t u : Finset α
inst✝ : DecidableEq α
hst : ∀ ⦃a : α⦄, a ∈ s → a ∉ t
hsu : ∀ ⦃a : α⦄, a ∈ s → a ∉ u
htu : ∀ ⦃a : α⦄, a ∈ t → a ∉ u
x₁ x₂ y₁ y₂ z₁ z₂ : α
hx₁ : x₁ ∈ s
hx₂ : x₂ ∈ s
hy₁ : y₁ ∈ t
hy₂ : y₂ ∈ t
hz₁ : z₁ ∈ u
hz₂ : z₂ ∈ u
h :
  ((x₁ = x₂ ∨ x₁ = y₂ ∨ x₁ = z₂) ∧ (y₁ = x₂ ∨ y₁ = y₂ ∨ y₁ = z₂) ∧ (z₁ = x₂ ∨ z₁ = y₂ ∨ z₁ = z₂)) ∧
    (x₂ = x₁ ∨ x₂ = y₁ ∨ x₂ = z₁) ∧ (y₂ = x₁ ∨ y₂ = y₁ ∨ y₂ = z₁) ∧ (z₂ = x₁ ∨ z₂ = y₁ ∨ z₂ = z₁)
⊢ x₁ = x₂ ∧ y₁ = y₂ ∧ z₁ = z₂

Tactic:
simp only [and_assoc, @or_left_comm _ (y₁ = y₂), @or_comm _ (z₁ = z₂),
  @or_left_comm _ (z₁ = z₂)] at h

Result:
α : Type u_1
s t u : Finset α
inst✝ : DecidableEq α
hst : ∀ ⦃a : α⦄, a ∈ s → a ∉ t
hsu : ∀ ⦃a : α⦄, a ∈ s → a ∉ u
htu : ∀ ⦃a : α⦄, a ∈ t → a ∉ u
x₁ x₂ y₁ y₂ z₁ z₂ : α
hx₁ : x₁ ∈ s
hx₂ : x₂ ∈ s
hy₁ : y₁ ∈ t
hy₂ : y₂ ∈ t
hz₁ : z₁ ∈ u
hz₂ : z₂ ∈ u
h :
  (x₁ = x₂ ∨ x₁ = y₂ ∨ x₁ = z₂) ∧
    (y₁ = y₂ ∨ y₁ = x₂ ∨ y₁ = z₂) ∧
      (z₁ = z₂ ∨ z₁ = x₂ ∨ z₁ = y₂) ∧
        (x₂ = x₁ ∨ x₂ = y₁ ∨ x₂ = z₁) ∧ (y₂ = x₁ ∨ y₂ = y₁ ∨ y₂ = z₁) ∧ (z₂ = x₁ ∨ z₂ = y₁ ∨ z₂ = z₁)
⊢ x₁ = x₂ ∧ y₁ = y₂ ∧ z₁ = z₂

Proof state:
case refine_6
α : Type u_1
s t u : Finset α
inst✝ : DecidableEq α
hst : ∀ ⦃a : α⦄, a ∈ s → a ∉ t
hsu : ∀ ⦃a : α⦄, a ∈ s → a ∉ u
htu : ∀ ⦃a : α⦄, a ∈ t → a ∉ u
x₁ x₂ y₁ z₁ z₂ : α
hx₁ : x₁ ∈ s
hx₂ : x₂ ∈ s
hy₁ : y₁ ∈ t
hz₁ : z₁ ∈ u
hz₂ : z₂ ∈ u
hy₂ : z₁ ∈ t
h :
  (x₁ = x₂ ∨ x₁ = z₁ ∨ x₁ = z₂) ∧
    (y₁ = z₁ ∨ y₁ = x₂ ∨ y₁ = z₂) ∧
      (z₁ = z₂ ∨ z₁ = x₂ ∨ z₁ = z₁) ∧
        (x₂ = x₁ ∨ x₂ = y₁ ∨ x₂ = z₁) ∧ (z₁ = x₁ ∨ z₁ = y₁ ∨ z₁ = z₁) ∧ (z₂ = x₁ ∨ z₂ = y₁ ∨ z₂ = z₁)
⊢ False

Tactic:
solve_by_elim

Result:
no goals