Basic theory of topological spaces. #
The main definition is the type class TopologicalSpace α which endows a type α with a topology.
Then Set α gets predicates IsOpen, IsClosed and functions interior, closure and
frontier. Each point x of α gets a neighborhood filter 𝓝 x. A filter F on α has
x as a cluster point if ClusterPt x F : 𝓝 x ⊓ F ≠ ⊥. A map f : ι → α clusters at x
along F : Filter ι if MapClusterPt x F f : ClusterPt x (map f F). In particular
the notion of cluster point of a sequence u is MapClusterPt x atTop u.
For topological spaces α and β, a function f : α → β and a point a : α,
ContinuousAt f a means f is continuous at a, and global continuity is
Continuous f. There is also a version of continuity PContinuous for
partially defined functions.
Notation #
𝓝 x: the filternhds xof neighborhoods of a pointx;𝓟 s: the principal filter of a sets;𝓝[s] x: the filternhdsWithin x sof neighborhoods of a pointxwithin a sets;𝓝[≤] x: the filternhdsWithin x (Set.Iic x)of left-neighborhoods ofx;𝓝[≥] x: the filternhdsWithin x (Set.Ici x)of right-neighborhoods ofx;𝓝[<] x: the filternhdsWithin x (Set.Iio x)of punctured left-neighborhoods ofx;𝓝[>] x: the filternhdsWithin x (Set.Ioi x)of punctured right-neighborhoods ofx;𝓝[≠] x: the filternhdsWithin x {x}ᶜof punctured neighborhoods ofx.
Implementation notes #
Topology in mathlib heavily uses filters (even more than in Bourbaki). See explanations in
References #
- [N. Bourbaki, General Topology][bourbaki1966]
- [I. M. James, Topologies and Uniformities][james1999]
Tags #
topological space, interior, closure, frontier, neighborhood, continuity, continuous function
Topological spaces #
A predicate saying that a set is an open set. Use
IsOpenin the root namespace instead.- isOpen_univ : TopologicalSpace.IsOpen Set.univ
The set representing the whole space is an open set. Use
isOpen_univin the root namespace instead. - isOpen_inter : ∀ (s_1 t : Set α), TopologicalSpace.IsOpen s_1 → TopologicalSpace.IsOpen t → TopologicalSpace.IsOpen (s_1 ∩ t)
The intersection of two open sets is an open set. Use
IsOpen.interinstead. - isOpen_sUnion : ∀ (s_1 : Set (Set α)), (∀ (t : Set α), t ∈ s_1 → TopologicalSpace.IsOpen t) → TopologicalSpace.IsOpen (⋃₀ s_1)
The union of a family of open sets is an open set. Use
isOpen_sUnionin the root namespace instead.
A topology on α.
Instances
A constructor for topologies by specifying the closed sets, and showing that they satisfy the appropriate conditions.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Notation for IsOpen with respect to a non-standard topology.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Notation for IsClosed with respect to a non-standard topology.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Alias of the reverse direction of isClosed_compl_iff.
Interior of a set #
Closure of a set #
Notation for closure with respect to a non-standard topology.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Alias of the reverse direction of closure_nonempty_iff.
Alias of the forward direction of closure_nonempty_iff.
Alias of the forward direction of dense_iff_closure_eq.
The closure of a set s is dense if and only if s is dense.
Alias of the reverse direction of dense_closure.
The closure of a set s is dense if and only if s is dense.
Alias of the forward direction of dense_closure.
The closure of a set s is dense if and only if s is dense.
A set is dense if and only if it has a nonempty intersection with each nonempty open set.
Alias of the forward direction of dense_iff_inter_open.
A set is dense if and only if it has a nonempty intersection with each nonempty open set.
Complement to a singleton is dense if and only if the singleton is not an open set.
Frontier of a set #
The complement of a set has the same frontier as the original set.
The frontier of a set is closed.
The frontier of a closed set has no interior point.
Neighborhoods #
A set is called a neighborhood of a if it contains an open set around a. The set of all
neighborhoods of a forms a filter, the neighborhood filter at a, is here defined as the
infimum over the principal filters of all open sets containing a.
Instances For
The "neighborhood within" filter. Elements of 𝓝[s] a are sets containing the
intersection of s and a neighborhood of a.
Equations
- nhdsWithin a s = nhds a ⊓ Filter.principal s
Instances For
A set is called a neighborhood of a if it contains an open set around a. The set of all
neighborhoods of a forms a filter, the neighborhood filter at a, is here defined as the
infimum over the principal filters of all open sets containing a.
Equations
- Topology.term𝓝 = Lean.ParserDescr.node `Topology.term𝓝 1024 (Lean.ParserDescr.symbol "𝓝")
Instances For
The "neighborhood within" filter. Elements of 𝓝[s] a are sets containing the
intersection of s and a neighborhood of a.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Notation for the filter of punctured neighborhoods of a point.
Equations
- Topology.«term𝓝[≠]_» = Lean.ParserDescr.node `Topology.term𝓝[≠]_ 1022 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "𝓝[≠] ") (Lean.ParserDescr.cat `term 100))
Instances For
Notation for the filter of right neighborhoods of a point.
Equations
- Topology.«term𝓝[≥]_» = Lean.ParserDescr.node `Topology.term𝓝[≥]_ 1022 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "𝓝[≥] ") (Lean.ParserDescr.cat `term 100))
Instances For
Notation for the filter of left neighborhoods of a point.
Equations
- Topology.«term𝓝[≤]_» = Lean.ParserDescr.node `Topology.term𝓝[≤]_ 1022 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "𝓝[≤] ") (Lean.ParserDescr.cat `term 100))
Instances For
Notation for the filter of punctured right neighborhoods of a point.
Equations
- Topology.«term𝓝[>]_» = Lean.ParserDescr.node `Topology.term𝓝[>]_ 1022 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "𝓝[>] ") (Lean.ParserDescr.cat `term 100))
Instances For
Notation for the filter of punctured left neighborhoods of a point.
Equations
- Topology.«term𝓝[<]_» = Lean.ParserDescr.node `Topology.term𝓝[<]_ 1022 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "𝓝[<] ") (Lean.ParserDescr.cat `term 100))
Instances For
The open sets containing a are a basis for the neighborhood filter. See nhds_basis_opens'
for a variant using open neighborhoods instead.
To show a filter is above the neighborhood filter at a, it suffices to show that it is above
the principal filter of some open set s containing a.
If a predicate is true in a neighborhood of a, then it is true for a.
The open neighborhoods of a are a basis for the neighborhood filter. See nhds_basis_opens
for a variant using open sets around a instead.
If a predicate is true in a neighbourhood of a, then for y sufficiently close
to a this predicate is true in a neighbourhood of y.
If two functions are equal in a neighbourhood of a, then for y sufficiently close
to a these functions are equal in a neighbourhood of y.
If f x ≤ g x in a neighbourhood of a, then for y sufficiently close to a we have
f x ≤ g x in a neighbourhood of y.
Equations
Cluster points #
In this section we define cluster points (also known as limit points and accumulation points) of a filter and of a sequence.
A point x is a cluster point of a filter F if 𝓝 x ⊓ F ≠ ⊥. Also known as
an accumulation point or a limit point, but beware that terminology varies. This
is not the same as asking 𝓝[≠] x ⊓ F ≠ ⊥. See mem_closure_iff_clusterPt in particular.
Equations
- ClusterPt x F = Filter.NeBot (nhds x ⊓ F)
Instances For
x is a cluster point of a set s if every neighbourhood of x meets s on a nonempty
set. See also mem_closure_iff_clusterPt.
A point x is a cluster point of a sequence u along a filter F if it is a cluster point
of map u F.
Equations
- MapClusterPt x F u = ClusterPt x (Filter.map u F)
Instances For
A point x is an accumulation point of a filter F if 𝓝[≠] x ⊓ F ≠ ⊥.
Equations
- AccPt x F = Filter.NeBot (nhdsWithin x {x}ᶜ ⊓ F)
Instances For
x is an accumulation point of a set C iff it is a cluster point of C ∖ {x}.
x is an accumulation point of a set C iff every neighborhood
of x contains a point of C other than x.
x is an accumulation point of a set C iff
there are points near x in C and different from x.
If x is an accumulation point of F and F ≤ G, then
x is an accumulation point of D.
Interior, closure and frontier in terms of neighborhoods #
A set s is open iff for every point x in s and every y close to x, y is in s.
Alias of the reverse direction of mem_closure_iff_frequently.
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.
The set of cluster points of a filter is closed. In particular, the set of limit points of a sequence is closed.
If x is not an isolated point of a topological space, then {x}ᶜ is dense in the whole
space.
If x is not an isolated point of a topological space, then the closure of {x}ᶜ is the whole
space.
If x is not an isolated point of a topological space, then the interior of {x} is empty.
Suppose that f sends the complement to s to a single point a, and l is some filter.
Then f tends to a along l restricted to s if and only if it tends to a along l.
Limits of filters in topological spaces #
In this section we define functions that return a limit of a filter (or of a function along a
filter), if it exists, and a random point otherwise. These functions are rarely used in Mathlib,
most of the theorems are written using Filter.Tendsto. One of the reasons is that
Filter.limUnder f g = a is not equivalent to Filter.Tendsto g f (𝓝 a) unless the codomain is a
Hausdorff space and g has a limit along f.
If f is a filter, then Filter.lim f is a limit of the filter, if it exists.
Equations
- lim f = Classical.epsilon fun a => f ≤ nhds a
Instances For
If F is an ultrafilter, then Filter.Ultrafilter.lim F is a limit of the filter, if it exists.
Note that dot notation F.lim can be used for F : Filter.Ultrafilter α.
Equations
- Ultrafilter.lim F = lim ↑F
Instances For
If a filter f is majorated by some 𝓝 a, then it is majorated by 𝓝 (Filter.lim f). We
formulate this lemma with a [Nonempty α] argument of lim derived from h to make it useful for
types without a [Nonempty α] instance. Because of the built-in proof irrelevance, Lean will unify
this instance with any other instance.
If g tends to some 𝓝 a along f, then it tends to 𝓝 (Filter.limUnder f g). We formulate
this lemma with a [Nonempty α] argument of lim derived from h to make it useful for types
without a [Nonempty α] instance. Because of the built-in proof irrelevance, Lean will unify this
instance with any other instance.
Continuity #
The preimage of an open set under a continuous function is an open set. Use
IsOpen.preimageinstead.
A function between topological spaces is continuous if the preimage of every open set is open. Registered as a structure to make sure it is not unfolded by Lean.
Instances For
Notation for Continuous with respect to a non-standard topologies.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A function between topological spaces is continuous at a point x₀
if f x tends to f x₀ when x tends to x₀.
Equations
- ContinuousAt f x = Filter.Tendsto f (nhds x) (nhds (f x))
Instances For
See also interior_preimage_subset_preimage_interior.
See note [comp_of_eq lemmas]
A version of Continuous.tendsto that allows one to specify a simpler form of the limit.
E.g., one can write continuous_exp.tendsto' 0 1 exp_zero.
If a continuous map f maps s to t, then it maps closure s to closure t.
See also IsClosedMap.closure_image_eq_of_continuous.
If a continuous map f maps s to a closed set t, then it maps closure s to t.
Function with dense range #
f : ι → β has dense range if its range (image) is a dense subset of β.
Equations
- DenseRange f = Dense (Set.range f)
Instances For
A surjective map has dense range.
The image of a dense set under a continuous map with dense range is a dense set.
If f has dense range and s is an open set in the codomain of f, then the image of the
preimage of s under f is dense in s.
If a continuous map with dense range maps a dense set to a subset of t, then t is a dense
set.
Composition of a continuous map with dense range and a function with dense range has dense range.
Given a function f : α → β with dense range and b : β, returns some a : α.
Equations
- DenseRange.some hf b = Classical.choice (_ : Nonempty κ)