Theorem: TopologicalSpace.nhds_mkOfNhds
File: Mathlib/Topology/Order.lean

tactic: letI := TopologicalSpace.mkOfNhds n
state_before: α : Type u
n : α → Filter α
a : α
h₀ : pure ≤ n
h₁ : ∀ (a : α) (s : Set α), s ∈ n a → ∃ t, t ∈ n a ∧ t ⊆ s ∧ ∀ (a' : α), a' ∈ t → s ∈ n a'
⊢ 𝓝 a = n a

tactic: apply le_antisymm <;> intros s hs
state_before: α : Type u
n : α → Filter α
a : α
h₀ : pure ≤ n
h₁ : ∀ (a : α) (s : Set α), s ∈ n a → ∃ t, t ∈ n a ∧ t ⊆ s ∧ ∀ (a' : α), a' ∈ t → s ∈ n a'
this : TopologicalSpace α := TopologicalSpace.mkOfNhds n
⊢ 𝓝 a = n a

tactic: have h₀ : { b | s ∈ n b } ⊆ s := fun b hb => mem_pure.1 <| h₀ b hb
state_before: case a
α : Type u
n : α → Filter α
a : α
h₀ : pure ≤ n
h₁ : ∀ (a : α) (s : Set α), s ∈ n a → ∃ t, t ∈ n a ∧ t ⊆ s ∧ ∀ (a' : α), a' ∈ t → s ∈ n a'
this : TopologicalSpace α := TopologicalSpace.mkOfNhds n
s : Set α
hs : s ∈ n a
⊢ s ∈ 𝓝 a

tactic: have h₁ : { b | s ∈ n b } ∈ 𝓝 a := by
  refine' IsOpen.mem_nhds (fun b (hb : s ∈ n b) => _) hs
  rcases h₁ _ _ hb with ⟨t, ht, -, h⟩
  exact mem_of_superset ht h
state_before: case a
α : Type u
n : α → Filter α
a : α
h₀✝ : pure ≤ n
h₁ : ∀ (a : α) (s : Set α), s ∈ n a → ∃ t, t ∈ n a ∧ t ⊆ s ∧ ∀ (a' : α), a' ∈ t → s ∈ n a'
this : TopologicalSpace α := TopologicalSpace.mkOfNhds n
s : Set α
hs : s ∈ n a
h₀ : {b | s ∈ n b} ⊆ s
⊢ s ∈ 𝓝 a

tactic: exact mem_of_superset h₁ h₀
state_before: case a
α : Type u
n : α → Filter α
a : α
h₀✝ : pure ≤ n
h₁✝ : ∀ (a : α) (s : Set α), s ∈ n a → ∃ t, t ∈ n a ∧ t ⊆ s ∧ ∀ (a' : α), a' ∈ t → s ∈ n a'
this : TopologicalSpace α := TopologicalSpace.mkOfNhds n
s : Set α
hs : s ∈ n a
h₀ : {b | s ∈ n b} ⊆ s
h₁ : {b | s ∈ n b} ∈ 𝓝 a
⊢ s ∈ 𝓝 a

tactic: refine' IsOpen.mem_nhds (fun b (hb : s ∈ n b) => _) hs
state_before: α : Type u
n : α → Filter α
a : α
h₀✝ : pure ≤ n
h₁ : ∀ (a : α) (s : Set α), s ∈ n a → ∃ t, t ∈ n a ∧ t ⊆ s ∧ ∀ (a' : α), a' ∈ t → s ∈ n a'
this : TopologicalSpace α := TopologicalSpace.mkOfNhds n
s : Set α
hs : s ∈ n a
h₀ : {b | s ∈ n b} ⊆ s
⊢ {b | s ∈ n b} ∈ 𝓝 a

tactic: rcases h₁ _ _ hb with ⟨t, ht, -, h⟩
state_before: α : Type u
n : α → Filter α
a : α
h₀✝ : pure ≤ n
h₁ : ∀ (a : α) (s : Set α), s ∈ n a → ∃ t, t ∈ n a ∧ t ⊆ s ∧ ∀ (a' : α), a' ∈ t → s ∈ n a'
this : TopologicalSpace α := TopologicalSpace.mkOfNhds n
s : Set α
hs : s ∈ n a
h₀ : {b | s ∈ n b} ⊆ s
b : α
hb : s ∈ n b
⊢ {b | s ∈ n b} ∈ n b

tactic: exact mem_of_superset ht h
state_before: case intro.intro.intro
α : Type u
n : α → Filter α
a : α
h₀✝ : pure ≤ n
h₁ : ∀ (a : α) (s : Set α), s ∈ n a → ∃ t, t ∈ n a ∧ t ⊆ s ∧ ∀ (a' : α), a' ∈ t → s ∈ n a'
this : TopologicalSpace α := TopologicalSpace.mkOfNhds n
s : Set α
hs : s ∈ n a
h₀ : {b | s ∈ n b} ⊆ s
b : α
hb : s ∈ n b
t : Set α
ht : t ∈ n b
h : ∀ (a' : α), a' ∈ t → s ∈ n a'
⊢ {b | s ∈ n b} ∈ n b

tactic: rcases mem_nhds_iff.1 hs with ⟨t, hts, ht, hat⟩
state_before: case a
α : Type u
n : α → Filter α
a : α
h₀ : pure ≤ n
h₁ : ∀ (a : α) (s : Set α), s ∈ n a → ∃ t, t ∈ n a ∧ t ⊆ s ∧ ∀ (a' : α), a' ∈ t → s ∈ n a'
this : TopologicalSpace α := TopologicalSpace.mkOfNhds n
s : Set α
hs : s ∈ 𝓝 a
⊢ s ∈ n a

tactic: exact (n a).sets_of_superset (ht _ hat) hts
state_before: case a.intro.intro.intro
α : Type u
n : α → Filter α
a : α
h₀ : pure ≤ n
h₁ : ∀ (a : α) (s : Set α), s ∈ n a → ∃ t, t ∈ n a ∧ t ⊆ s ∧ ∀ (a' : α), a' ∈ t → s ∈ n a'
this : TopologicalSpace α := TopologicalSpace.mkOfNhds n
s : Set α
hs : s ∈ 𝓝 a
t : Set α
hts : t ⊆ s
ht : IsOpen t
hat : a ∈ t
⊢ s ∈ n a