Theorem: Set.Nontrivial.einfsep_exists_of_finite
File: Mathlib/Topology/MetricSpace/Infsep.lean

tactic: classical
  cases nonempty_fintype s
  simp_rw [einfsep_of_fintype]
  rcases Finset.exists_mem_eq_inf s.offDiag.toFinset (by simpa) (uncurry edist) with ⟨w, hxy, hed⟩
  simp_rw [mem_toFinset] at hxy
  exact ⟨w.fst, hxy.1, w.snd, hxy.2.1, hxy.2.2, hed⟩
state_before: α : Type u_1
β : Type u_2
inst✝¹ : EDist α
x y : α
s t : Set α
inst✝ : Finite ↑s
hs : s.Nontrivial
⊢ ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ s.einfsep = edist x y
state_after: no goals

tactic: cases nonempty_fintype s
state_before: α : Type u_1
β : Type u_2
inst✝¹ : EDist α
x y : α
s t : Set α
inst✝ : Finite ↑s
hs : s.Nontrivial
⊢ ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ s.einfsep = edist x y
state_after: case intro
α : Type u_1
β : Type u_2
inst✝¹ : EDist α
x y : α
s t : Set α
inst✝ : Finite ↑s
hs : s.Nontrivial
val✝ : Fintype ↑s
⊢ ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ s.einfsep = edist x y

tactic: simp_rw [einfsep_of_fintype]
state_before: case intro
α : Type u_1
β : Type u_2
inst✝¹ : EDist α
x y : α
s t : Set α
inst✝ : Finite ↑s
hs : s.Nontrivial
val✝ : Fintype ↑s
⊢ ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ s.einfsep = edist x y
state_after: case intro
α : Type u_1
β : Type u_2
inst✝¹ : EDist α
x y : α
s t : Set α
inst✝ : Finite ↑s
hs : s.Nontrivial
val✝ : Fintype ↑s
⊢ ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ s.offDiag.toFinset.inf (uncurry edist) = edist x y

tactic: rcases Finset.exists_mem_eq_inf s.offDiag.toFinset (by simpa) (uncurry edist) with ⟨w, hxy, hed⟩
state_before: case intro
α : Type u_1
β : Type u_2
inst✝¹ : EDist α
x y : α
s t : Set α
inst✝ : Finite ↑s
hs : s.Nontrivial
val✝ : Fintype ↑s
⊢ ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ s.offDiag.toFinset.inf (uncurry edist) = edist x y
state_after: case intro.intro.intro
α : Type u_1
β : Type u_2
inst✝¹ : EDist α
x y : α
s t : Set α
inst✝ : Finite ↑s
hs : s.Nontrivial
val✝ : Fintype ↑s
w : α × α
hxy : w ∈ s.offDiag.toFinset
hed : s.offDiag.toFinset.inf (uncurry edist) = uncurry edist w
⊢ ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ s.offDiag.toFinset.inf (uncurry edist) = edist x y

tactic: simp_rw [mem_toFinset] at hxy
state_before: case intro.intro.intro
α : Type u_1
β : Type u_2
inst✝¹ : EDist α
x y : α
s t : Set α
inst✝ : Finite ↑s
hs : s.Nontrivial
val✝ : Fintype ↑s
w : α × α
hxy : w ∈ s.offDiag.toFinset
hed : s.offDiag.toFinset.inf (uncurry edist) = uncurry edist w
⊢ ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ s.offDiag.toFinset.inf (uncurry edist) = edist x y
state_after: case intro.intro.intro
α : Type u_1
β : Type u_2
inst✝¹ : EDist α
x y : α
s t : Set α
inst✝ : Finite ↑s
hs : s.Nontrivial
val✝ : Fintype ↑s
w : α × α
hed : s.offDiag.toFinset.inf (uncurry edist) = uncurry edist w
hxy : w ∈ s.offDiag
⊢ ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ s.offDiag.toFinset.inf (uncurry edist) = edist x y

tactic: exact ⟨w.fst, hxy.1, w.snd, hxy.2.1, hxy.2.2, hed⟩
state_before: case intro.intro.intro
α : Type u_1
β : Type u_2
inst✝¹ : EDist α
x y : α
s t : Set α
inst✝ : Finite ↑s
hs : s.Nontrivial
val✝ : Fintype ↑s
w : α × α
hed : s.offDiag.toFinset.inf (uncurry edist) = uncurry edist w
hxy : w ∈ s.offDiag
⊢ ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ s.offDiag.toFinset.inf (uncurry edist) = edist x y
state_after: no goals

tactic: simpa
state_before: α : Type u_1
β : Type u_2
inst✝¹ : EDist α
x y : α
s t : Set α
inst✝ : Finite ↑s
hs : s.Nontrivial
val✝ : Fintype ↑s
⊢ s.offDiag.toFinset.Nonempty
state_after: no goals