Theorem: exists_isOpen_singleton_of_isOpen_finite
File: Mathlib/Topology/Separation.lean

tactic: lift s to Finset X using hfin
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T0Space X
s : Set X
hfin : s.Finite
hne : s.Nonempty
ho : IsOpen s
⊢ ∃ x ∈ s, IsOpen {x}
state_after: case intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T0Space X
s : Finset X
hne : (↑s).Nonempty
ho : IsOpen ↑s
⊢ ∃ x ∈ ↑s, IsOpen {x}

tactic: induction' s using Finset.strongInductionOn with s ihs
state_before: case intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T0Space X
s : Finset X
hne : (↑s).Nonempty
ho : IsOpen ↑s
⊢ ∃ x ∈ ↑s, IsOpen {x}
state_after: case intro.a
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T0Space X
s : Finset X
ihs : ∀ t ⊂ s, (↑t).Nonempty → IsOpen ↑t → ∃ x ∈ ↑t, IsOpen {x}
hne : (↑s).Nonempty
ho : IsOpen ↑s
⊢ ∃ x ∈ ↑s, IsOpen {x}

tactic: rcases em (∃ t, t ⊂ s ∧ t.Nonempty ∧ IsOpen (t : Set X)) with (⟨t, hts, htne, hto⟩ | ht)
state_before: case intro.a
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T0Space X
s : Finset X
ihs : ∀ t ⊂ s, (↑t).Nonempty → IsOpen ↑t → ∃ x ∈ ↑t, IsOpen {x}
hne : (↑s).Nonempty
ho : IsOpen ↑s
⊢ ∃ x ∈ ↑s, IsOpen {x}
state_after: case intro.a.inl.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T0Space X
s : Finset X
ihs : ∀ t ⊂ s, (↑t).Nonempty → IsOpen ↑t → ∃ x ∈ ↑t, IsOpen {x}
hne : (↑s).Nonempty
ho : IsOpen ↑s
t : Finset X
hts : t ⊂ s
htne : t.Nonempty
hto : IsOpen ↑t
⊢ ∃ x ∈ ↑s, IsOpen {x}

case intro.a.inr
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T0Space X
s : Finset X
ihs : ∀ t ⊂ s, (↑t).Nonempty → IsOpen ↑t → ∃ x ∈ ↑t, IsOpen {x}
hne : (↑s).Nonempty
ho : IsOpen ↑s
ht : ¬∃ t ⊂ s, t.Nonempty ∧ IsOpen ↑t
⊢ ∃ x ∈ ↑s, IsOpen {x}

tactic: rcases ihs t hts htne hto with ⟨x, hxt, hxo⟩
state_before: case intro.a.inl.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T0Space X
s : Finset X
ihs : ∀ t ⊂ s, (↑t).Nonempty → IsOpen ↑t → ∃ x ∈ ↑t, IsOpen {x}
hne : (↑s).Nonempty
ho : IsOpen ↑s
t : Finset X
hts : t ⊂ s
htne : t.Nonempty
hto : IsOpen ↑t
⊢ ∃ x ∈ ↑s, IsOpen {x}
state_after: case intro.a.inl.intro.intro.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T0Space X
s : Finset X
ihs : ∀ t ⊂ s, (↑t).Nonempty → IsOpen ↑t → ∃ x ∈ ↑t, IsOpen {x}
hne : (↑s).Nonempty
ho : IsOpen ↑s
t : Finset X
hts : t ⊂ s
htne : t.Nonempty
hto : IsOpen ↑t
x : X
hxt : x ∈ ↑t
hxo : IsOpen {x}
⊢ ∃ x ∈ ↑s, IsOpen {x}

tactic: exact ⟨x, hts.1 hxt, hxo⟩
state_before: case intro.a.inl.intro.intro.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T0Space X
s : Finset X
ihs : ∀ t ⊂ s, (↑t).Nonempty → IsOpen ↑t → ∃ x ∈ ↑t, IsOpen {x}
hne : (↑s).Nonempty
ho : IsOpen ↑s
t : Finset X
hts : t ⊂ s
htne : t.Nonempty
hto : IsOpen ↑t
x : X
hxt : x ∈ ↑t
hxo : IsOpen {x}
⊢ ∃ x ∈ ↑s, IsOpen {x}
state_after: no goals

tactic: rsuffices ⟨x, hx⟩ : ∃ x, s.toSet = {x}
state_before: case intro.a.inr
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T0Space X
s : Finset X
ihs : ∀ t ⊂ s, (↑t).Nonempty → IsOpen ↑t → ∃ x ∈ ↑t, IsOpen {x}
hne : (↑s).Nonempty
ho : IsOpen ↑s
ht : ¬∃ t ⊂ s, t.Nonempty ∧ IsOpen ↑t
⊢ ∃ x ∈ ↑s, IsOpen {x}
state_after: case intro.a.inr.intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T0Space X
s : Finset X
ihs : ∀ t ⊂ s, (↑t).Nonempty → IsOpen ↑t → ∃ x ∈ ↑t, IsOpen {x}
hne : (↑s).Nonempty
ho : IsOpen ↑s
ht : ¬∃ t ⊂ s, t.Nonempty ∧ IsOpen ↑t
x : X
hx : ↑s = {x}
⊢ ∃ x ∈ ↑s, IsOpen {x}

X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T0Space X
s : Finset X
ihs : ∀ t ⊂ s, (↑t).Nonempty → IsOpen ↑t → ∃ x ∈ ↑t, IsOpen {x}
hne : (↑s).Nonempty
ho : IsOpen ↑s
ht : ¬∃ t ⊂ s, t.Nonempty ∧ IsOpen ↑t
⊢ ∃ x, ↑s = {x}

tactic: refine minimal_nonempty_open_eq_singleton ho hne ?_
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T0Space X
s : Finset X
ihs : ∀ t ⊂ s, (↑t).Nonempty → IsOpen ↑t → ∃ x ∈ ↑t, IsOpen {x}
hne : (↑s).Nonempty
ho : IsOpen ↑s
ht : ¬∃ t ⊂ s, t.Nonempty ∧ IsOpen ↑t
⊢ ∃ x, ↑s = {x}
state_after: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T0Space X
s : Finset X
ihs : ∀ t ⊂ s, (↑t).Nonempty → IsOpen ↑t → ∃ x ∈ ↑t, IsOpen {x}
hne : (↑s).Nonempty
ho : IsOpen ↑s
ht : ¬∃ t ⊂ s, t.Nonempty ∧ IsOpen ↑t
⊢ ∀ t ⊆ ↑s, t.Nonempty → IsOpen t → t = ↑s

tactic: refine fun t hts htne hto => of_not_not fun hts' => ht ?_
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T0Space X
s : Finset X
ihs : ∀ t ⊂ s, (↑t).Nonempty → IsOpen ↑t → ∃ x ∈ ↑t, IsOpen {x}
hne : (↑s).Nonempty
ho : IsOpen ↑s
ht : ¬∃ t ⊂ s, t.Nonempty ∧ IsOpen ↑t
⊢ ∀ t ⊆ ↑s, t.Nonempty → IsOpen t → t = ↑s
state_after: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T0Space X
s : Finset X
ihs : ∀ t ⊂ s, (↑t).Nonempty → IsOpen ↑t → ∃ x ∈ ↑t, IsOpen {x}
hne : (↑s).Nonempty
ho : IsOpen ↑s
ht : ¬∃ t ⊂ s, t.Nonempty ∧ IsOpen ↑t
t : Set X
hts : t ⊆ ↑s
htne : t.Nonempty
hto : IsOpen t
hts' : ¬t = ↑s
⊢ ∃ t ⊂ s, t.Nonempty ∧ IsOpen ↑t

tactic: lift t to Finset X using s.finite_toSet.subset hts
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T0Space X
s : Finset X
ihs : ∀ t ⊂ s, (↑t).Nonempty → IsOpen ↑t → ∃ x ∈ ↑t, IsOpen {x}
hne : (↑s).Nonempty
ho : IsOpen ↑s
ht : ¬∃ t ⊂ s, t.Nonempty ∧ IsOpen ↑t
t : Set X
hts : t ⊆ ↑s
htne : t.Nonempty
hto : IsOpen t
hts' : ¬t = ↑s
⊢ ∃ t ⊂ s, t.Nonempty ∧ IsOpen ↑t
state_after: case intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T0Space X
s : Finset X
ihs : ∀ t ⊂ s, (↑t).Nonempty → IsOpen ↑t → ∃ x ∈ ↑t, IsOpen {x}
hne : (↑s).Nonempty
ho : IsOpen ↑s
ht : ¬∃ t ⊂ s, t.Nonempty ∧ IsOpen ↑t
t : Finset X
hts : ↑t ⊆ ↑s
htne : (↑t).Nonempty
hto : IsOpen ↑t
hts' : ¬↑t = ↑s
⊢ ∃ t ⊂ s, t.Nonempty ∧ IsOpen ↑t

tactic: exact ⟨t, ssubset_iff_subset_ne.2 ⟨hts, mt Finset.coe_inj.2 hts'⟩, htne, hto⟩
state_before: case intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T0Space X
s : Finset X
ihs : ∀ t ⊂ s, (↑t).Nonempty → IsOpen ↑t → ∃ x ∈ ↑t, IsOpen {x}
hne : (↑s).Nonempty
ho : IsOpen ↑s
ht : ¬∃ t ⊂ s, t.Nonempty ∧ IsOpen ↑t
t : Finset X
hts : ↑t ⊆ ↑s
htne : (↑t).Nonempty
hto : IsOpen ↑t
hts' : ¬↑t = ↑s
⊢ ∃ t ⊂ s, t.Nonempty ∧ IsOpen ↑t
state_after: no goals

tactic: exact ⟨x, hx.symm ▸ rfl, hx ▸ ho⟩
state_before: case intro.a.inr.intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T0Space X
s : Finset X
ihs : ∀ t ⊂ s, (↑t).Nonempty → IsOpen ↑t → ∃ x ∈ ↑t, IsOpen {x}
hne : (↑s).Nonempty
ho : IsOpen ↑s
ht : ¬∃ t ⊂ s, t.Nonempty ∧ IsOpen ↑t
x : X
hx : ↑s = {x}
⊢ ∃ x ∈ ↑s, IsOpen {x}
state_after: no goals