The areas / V13. General topology
Mathlib.Topology.Neighborhoods
76 declarations and 3 deprecated aliases. Mathlib docs · Source
Neighborhoods in topological spaces
Each point x of X gets a neighborhood filter 𝓝 x.
Tags
neighborhood
Interior, closure and frontier in terms of neighborhoods
theorem nhds_def' E1 #
∀ {X : Type u} [inst : TopologicalSpace X] (x : X), nhds x = ⨅ s, ⨅ (_ : IsOpen s), ⨅ (_ : x ∈ s), Filter.principal s
theorem nhds_basis_opens E1 #
∀ {X : Type u} [inst : TopologicalSpace X] (x : X), (nhds x).HasBasis (fun s ↦ x ∈ s ∧ IsOpen s) fun s ↦ s
The open sets containing x are a basis for the neighborhood filter. See nhds_basis_opens'
for a variant using open neighborhoods instead.
theorem nhds_basis_closeds E1 #
∀ {X : Type u} [inst : TopologicalSpace X] (x : X), (nhds x).HasBasis (fun s ↦ x ∉ s ∧ IsClosed s) compl
theorem lift'_nhds_interior E0 #
∀ {X : Type u} [inst : TopologicalSpace X] (x : X), (nhds x).lift' interior = nhds x
theorem Filter.HasBasis.nhds_interior E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {ι : Sort v} {x : X} {p : ι → Prop} {s : ι → Set X},
(nhds x).HasBasis p s → (nhds x).HasBasis p fun x ↦ interior (s x)
theorem le_nhds_iff E0 #
∀ {X : Type u} [inst : TopologicalSpace X] {x : X} {f : Filter X}, f ≤ nhds x ↔ ∀ (s : Set X), x ∈ s → IsOpen s → s ∈ f
A filter lies below the neighborhood filter at x iff it contains every open set around x.
theorem nhds_le_of_le E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {x : X} {s : Set X} {f : Filter X},
x ∈ s → IsOpen s → Filter.principal s ≤ f → nhds x ≤ f
To show a filter is above the neighborhood filter at x, it suffices to show that it is above
the principal filter of some open set s containing x.
theorem mem_nhds_iff E0 #
∀ {X : Type u} [inst : TopologicalSpace X] {x : X} {s : Set X}, s ∈ nhds x ↔ ∃ t ⊆ s, IsOpen t ∧ x ∈ t
theorem eventually_nhds_iff E0 #
∀ {X : Type u} [inst : TopologicalSpace X] {x : X} {p : X → Prop},
(∀ᶠ (y : X) in nhds x, p y) ↔ ∃ t, (∀ y ∈ t, p y) ∧ IsOpen t ∧ x ∈ t
A predicate is true in a neighborhood of x iff it is true for all the points in an open set
containing x.
theorem frequently_nhds_iff E0 #
∀ {X : Type u} [inst : TopologicalSpace X] {x : X} {p : X → Prop},
(∃ᶠ (y : X) in nhds x, p y) ↔ ∀ (U : Set X), x ∈ U → IsOpen U → ∃ y ∈ U, p y
theorem mem_interior_iff_mem_nhds E0 #
∀ {X : Type u} [inst : TopologicalSpace X] {x : X} {s : Set X}, x ∈ interior s ↔ s ∈ nhds x
theorem map_nhds E0 #
∀ {X : Type u} [inst : TopologicalSpace X] {α : Type u_1} {x : X} {f : X → α},
Filter.map f (nhds x) = ⨅ s ∈ {s | x ∈ s ∧ IsOpen s}, Filter.principal (f '' s)
theorem mem_of_mem_nhds E0 #
∀ {X : Type u} [inst : TopologicalSpace X] {x : X} {s : Set X}, s ∈ nhds x → x ∈ s
theorem Filter.Eventually.self_of_nhds E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {x : X} {p : X → Prop}, (∀ᶠ (y : X) in nhds x, p y) → p x
If a predicate is true in a neighborhood of x, then it is true for x.
theorem IsOpen.mem_nhds E0 #
∀ {X : Type u} [inst : TopologicalSpace X] {x : X} {s : Set X}, IsOpen s → x ∈ s → s ∈ nhds x
theorem IsOpen.mem_nhds_iff E0 #
∀ {X : Type u} [inst : TopologicalSpace X] {x : X} {s : Set X}, IsOpen s → (s ∈ nhds x ↔ x ∈ s)
theorem IsClosed.compl_mem_nhds E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {x : X} {s : Set X}, IsClosed s → x ∉ s → sᶜ ∈ nhds x
theorem IsOpen.eventually_mem E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {x : X} {s : Set X}, IsOpen s → x ∈ s → ∀ᶠ (x : X) in nhds x, x ∈ s
theorem nhds_basis_opens' E1 #
∀ {X : Type u} [inst : TopologicalSpace X] (x : X), (nhds x).HasBasis (fun s ↦ s ∈ nhds x ∧ IsOpen s) fun x ↦ x
The open neighborhoods of x are a basis for the neighborhood filter. See nhds_basis_opens
for a variant using open sets around x instead.
theorem exists_open_set_nhds E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {s U : Set X}, (∀ x ∈ s, U ∈ nhds x) → ∃ V, s ⊆ V ∧ IsOpen V ∧ V ⊆ U
If U is a neighborhood of each point of a set s then it is a neighborhood of s:
it contains an open set containing s.
theorem exists_open_set_nhds' E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {s U : Set X}, U ∈ ⨆ x ∈ s, nhds x → ∃ V, s ⊆ V ∧ IsOpen V ∧ V ⊆ U
If U is a neighborhood of each point of a set s then it is a neighborhood of s:
it contains an open set containing s.
theorem Filter.Eventually.eventually_nhds E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {x : X} {p : X → Prop},
(∀ᶠ (y : X) in nhds x, p y) → ∀ᶠ (y : X) in nhds x, ∀ᶠ (x : X) in nhds y, p x
If a predicate is true in a neighbourhood of x, then for y sufficiently close
to x this predicate is true in a neighbourhood of y.
theorem eventually_eventually_nhds E0 #
∀ {X : Type u} [inst : TopologicalSpace X] {x : X} {p : X → Prop},
(∀ᶠ (y : X) in nhds x, ∀ᶠ (x : X) in nhds y, p x) ↔ ∀ᶠ (x : X) in nhds x, p x
theorem frequently_frequently_nhds E0 #
∀ {X : Type u} [inst : TopologicalSpace X] {x : X} {p : X → Prop},
(∃ᶠ (x' : X) in nhds x, ∃ᶠ (x'' : X) in nhds x', p x'') ↔ ∃ᶠ (x : X) in nhds x, p x
theorem eventually_mem_nhds_iff E0 #
∀ {X : Type u} [inst : TopologicalSpace X] {x : X} {s : Set X}, (∀ᶠ (x' : X) in nhds x, s ∈ nhds x') ↔ s ∈ nhds x
theorem nhds_bind_nhds E0 #
∀ {X : Type u} [inst : TopologicalSpace X] {x : X}, (nhds x).bind nhds = nhds x
theorem eventually_eventuallyEq_nhds E0 #
∀ {X : Type u} [inst : TopologicalSpace X] {α : Type u_1} {x : X} {f g : X → α},
(∀ᶠ (y : X) in nhds x, f =ᶠ[nhds y] g) ↔ f =ᶠ[nhds x] g
theorem eventually_eventuallyLE_nhds E0 #
∀ {X : Type u} [inst : TopologicalSpace X] {α : Type u_1} {x : X} [inst_1 : LE α] {f g : X → α},
(∀ᶠ (y : X) in nhds x, f ≤ᶠ[nhds y] g) ↔ f ≤ᶠ[nhds x] g
theorem Filter.EventuallyEq.eventuallyEq_nhds E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {α : Type u_1} {x : X} {f g : X → α},
f =ᶠ[nhds x] g → ∀ᶠ (y : X) in nhds x, f =ᶠ[nhds y] g
If two functions are equal in a neighbourhood of x, then for y sufficiently close
to x these functions are equal in a neighbourhood of y.
theorem Filter.EventuallyLE.eventuallyLE_nhds E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {α : Type u_1} {x : X} [inst_1 : LE α] {f g : X → α},
f ≤ᶠ[nhds x] g → ∀ᶠ (y : X) in nhds x, f ≤ᶠ[nhds y] g
If f x ≤ g x in a neighbourhood of x, then for y sufficiently close to x we have
f x ≤ g x in a neighbourhood of y.
theorem all_mem_nhds E1 #
∀ {X : Type u} [inst : TopologicalSpace X] (x : X) (P : Set X → Prop),
(∀ (s t : Set X), s ⊆ t → P s → P t) → ((∀ s ∈ nhds x, P s) ↔ ∀ (s : Set X), IsOpen s → x ∈ s → P s)
theorem all_mem_nhds_filter E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {α : Type u_1} (x : X) (f : Set X → Set α),
(∀ (s t : Set X), s ⊆ t → f s ⊆ f t) →
∀ (l : Filter α), (∀ s ∈ nhds x, f s ∈ l) ↔ ∀ (s : Set X), IsOpen s → x ∈ s → f s ∈ l
theorem tendsto_nhds E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {α : Type u_1} {x : X} {f : α → X} {l : Filter α},
Filter.Tendsto f l (nhds x) ↔ ∀ (s : Set X), IsOpen s → x ∈ s → f ⁻¹' s ∈ l
theorem tendsto_atTop_nhds E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {α : Type u_1} {x : X} [Nonempty α] [inst_2 : SemilatticeSup α] {f : α → X},
Filter.Tendsto f Filter.atTop (nhds x) ↔ ∀ (U : Set X), x ∈ U → IsOpen U → ∃ N, ∀ (n : α), N ≤ n → f n ∈ U
theorem tendsto_const_nhds E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {α : Type u_1} {x : X} {f : Filter α},
Filter.Tendsto (fun x_1 ↦ x) f (nhds x)
theorem tendsto_atTop_of_eventually_const E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {x : X} {ι : Type u_2} [inst_1 : Preorder ι] {u : ι → X} {i₀ : ι},
(∀ i ≥ i₀, u i = x) → Filter.Tendsto u Filter.atTop (nhds x)
theorem tendsto_atBot_of_eventually_const E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {x : X} {ι : Type u_2} [inst_1 : Preorder ι] {u : ι → X} {i₀ : ι},
(∀ i ≤ i₀, u i = x) → Filter.Tendsto u Filter.atBot (nhds x)
theorem pure_le_nhds E1 #
∀ {X : Type u} [inst : TopologicalSpace X], pure ≤ nhds
theorem tendsto_pure_nhds E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {α : Type u_1} (f : α → X) (a : α), Filter.Tendsto f (pure a) (nhds (f a))
theorem OrderTop.tendsto_atTop_nhds E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {α : Type u_1} [inst_1 : PartialOrder α] [inst_2 : OrderTop α] (f : α → X),
Filter.Tendsto f Filter.atTop (nhds (f ⊤))
instance nhds_neBot E0 #
∀ {X : Type u} [inst : TopologicalSpace X] {x : X}, (nhds x).NeBot
theorem tendsto_nhds_of_eventually_eq E0 #
∀ {X : Type u} [inst : TopologicalSpace X] {α : Type u_1} {x : X} {l : Filter α} {f : α → X},
(∀ᶠ (x' : α) in l, f x' = x) → Filter.Tendsto f l (nhds x)
theorem Filter.EventuallyEq.tendsto E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {α : Type u_1} {x : X} {l : Filter α} {f : α → X},
(f =ᶠ[l] fun x_1 ↦ x) → Filter.Tendsto f l (nhds x)
theorem interior_eq_nhds' E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {s : Set X}, interior s = {x | s ∈ nhds x}
theorem interior_eq_nhds E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {s : Set X}, interior s = {x | nhds x ≤ Filter.principal s}
theorem interior_mem_nhds E0 #
∀ {X : Type u} [inst : TopologicalSpace X] {x : X} {s : Set X}, interior s ∈ nhds x ↔ s ∈ nhds x
theorem interior_setOfPred_eq E0 #
∀ {X : Type u} [inst : TopologicalSpace X] {p : X → Prop}, interior {x | p x} = {x | ∀ᶠ (y : X) in nhds x, p y}
theorem isOpen_setOfPred_eventually_nhds E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {p : X → Prop}, IsOpen {x | ∀ᶠ (y : X) in nhds x, p y}
theorem subset_interior_iff_nhds E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {s V : Set X}, s ⊆ interior V ↔ ∀ x ∈ s, V ∈ nhds x
theorem isOpen_iff_nhds E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {s : Set X}, IsOpen s ↔ ∀ x ∈ s, nhds x ≤ Filter.principal s
theorem TopologicalSpace.ext_iff_nhds E1 #
∀ {X : Type u_2} {t t' : TopologicalSpace X}, t = t' ↔ ∀ (x : X), nhds x = nhds x
theorem TopologicalSpace.ext_nhds E1 #
∀ {X : Type u_2} {t t' : TopologicalSpace X}, (∀ (x : X), nhds x = nhds x) → t = t'
Alias of the reverse direction of TopologicalSpace.ext_iff_nhds.
theorem isOpen_iff_mem_nhds E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {s : Set X}, IsOpen s ↔ ∀ x ∈ s, s ∈ nhds x
theorem isOpen_iff_eventually E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {s : Set X}, IsOpen s ↔ ∀ x ∈ s, ∀ᶠ (y : X) in nhds x, y ∈ s
A set s is open iff for every point x in s and every y close to x, y is in s.
theorem isOpen_singleton_iff_nhds_eq_pure E1 #
∀ {X : Type u} [inst : TopologicalSpace X] (x : X), IsOpen {x} ↔ nhds x = pure x
theorem isOpen_singleton_iff_punctured_nhds E1 #
∀ {X : Type u} [inst : TopologicalSpace X] (x : X), IsOpen {x} ↔ nhdsWithin x {x}ᶜ = ⊥
theorem mem_closure_iff_frequently E0 #
∀ {X : Type u} [inst : TopologicalSpace X] {x : X} {s : Set X}, x ∈ closure s ↔ ∃ᶠ (x : X) in nhds x, x ∈ s
theorem Filter.Frequently.mem_closure E0 #
∀ {X : Type u} [inst : TopologicalSpace X] {x : X} {s : Set X}, (∃ᶠ (x : X) in nhds x, x ∈ s) → x ∈ closure s
Alias of the reverse direction of mem_closure_iff_frequently.
theorem isClosed_iff_frequently E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {s : Set X}, IsClosed s ↔ ∀ (x : X), (∃ᶠ (y : X) in nhds x, y ∈ s) → x ∈ s
A set s is closed iff for every point x, if there is a point y close to x that belongs
to s then x is in s.
theorem nhdsWithin_neBot E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {x : X} {s : Set X},
(nhdsWithin x s).NeBot ↔ ∀ ⦃t : Set X⦄, t ∈ nhds x → (t ∩ s).Nonempty
theorem nhdsWithin_mono E1 #
∀ {X : Type u} [inst : TopologicalSpace X] (x : X) {s t : Set X}, s ⊆ t → nhdsWithin x s ≤ nhdsWithin x t
theorem IsClosed.interior_union_left E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {s t : Set X}, IsClosed s → interior (s ∪ t) ⊆ s ∪ interior t
theorem IsClosed.interior_union_right E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {s t : Set X}, IsClosed t → interior (s ∪ t) ⊆ interior s ∪ t
theorem IsOpen.inter_closure E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {s t : Set X}, IsOpen s → s ∩ closure t ⊆ closure (s ∩ t)
theorem IsOpen.closure_inter E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {s t : Set X}, IsOpen t → closure s ∩ t ⊆ closure (s ∩ t)
theorem Dense.open_subset_closure_inter E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {s t : Set X}, Dense s → IsOpen t → t ⊆ closure (t ∩ s)
theorem Dense.inter_of_isOpen_left E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {s t : Set X}, Dense s → Dense t → IsOpen s → Dense (s ∩ t)
The intersection of an open dense set with a dense set is a dense set.
theorem Dense.inter_of_isOpen_right E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {s t : Set X}, Dense s → Dense t → IsOpen t → Dense (s ∩ t)
The intersection of a dense set with an open dense set is a dense set.
theorem Dense.inter_nhds_nonempty E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {x : X} {s t : Set X}, Dense s → t ∈ nhds x → (s ∩ t).Nonempty
theorem closure_sdiff E1 #
∀ {X : Type u} [inst : TopologicalSpace X] {s t : Set X}, closure s \ closure t ⊆ closure (s \ t)
theorem Filter.Frequently.mem_of_closed E0 #
∀ {X : Type u} [inst : TopologicalSpace X] {x : X} {s : Set X}, (∃ᶠ (x : X) in nhds x, x ∈ s) → IsClosed s → x ∈ s
theorem IsClosed.mem_of_frequently_of_tendsto E0 #
∀ {X : Type u} [inst : TopologicalSpace X] {α : Type u_1} {x : X} {s : Set X} {f : α → X} {b : Filter α},
IsClosed s → (∃ᶠ (x : α) in b, f x ∈ s) → Filter.Tendsto f b (nhds x) → x ∈ s
theorem IsClosed.mem_of_tendsto E0 #
∀ {X : Type u} [inst : TopologicalSpace X] {α : Type u_1} {x : X} {s : Set X} {f : α → X} {b : Filter α} [b.NeBot],
IsClosed s → Filter.Tendsto f b (nhds x) → (∀ᶠ (x : α) in b, f x ∈ s) → x ∈ s
theorem mem_closure_of_frequently_of_tendsto E0 #
∀ {X : Type u} [inst : TopologicalSpace X] {α : Type u_1} {x : X} {s : Set X} {f : α → X} {b : Filter α},
(∃ᶠ (x : α) in b, f x ∈ s) → Filter.Tendsto f b (nhds x) → x ∈ closure s
theorem mem_closure_of_tendsto E0 #
∀ {X : Type u} [inst : TopologicalSpace X] {α : Type u_1} {x : X} {s : Set X} {f : α → X} {b : Filter α} [b.NeBot],
Filter.Tendsto f b (nhds x) → (∀ᶠ (x : α) in b, f x ∈ s) → x ∈ closure s
theorem tendsto_inf_principal_nhds_iff_of_forall_eq E0 #
∀ {X : Type u} [inst : TopologicalSpace X] {α : Type u_1} {x : X} {f : α → X} {l : Filter α} {s : Set α},
(∀ a ∉ s, f a = x) → (Filter.Tendsto f (l ⊓ Filter.principal s) (nhds x) ↔ Filter.Tendsto f l (nhds x))
Suppose that f sends the complement to s to a single point x, and l is some filter.
Then f tends to x along l restricted to s if and only if it tends to x along l.
Deprecated aliases
| Name | New name | Since |
|---|---|---|
closure_diff | closure_sdiff | 2026-06-03 |
interior_setOf_eq | interior_setOfPred_eq | 2026-07-09 |
isOpen_setOf_eventually_nhds | isOpen_setOfPred_eventually_nhds | 2026-07-09 |