Basic theory of topological spaces. #
The main definition is the type class TopologicalSpace X
which endows a type X
with a topology.
Then Set X
gets predicates IsOpen
, IsClosed
and functions interior
, closure
and
frontier
. Each point x
of X
gets a neighborhood filter 𝓝 x
. A filter F
on X
has
x
as a cluster point if ClusterPt x F : 𝓝 x ⊓ F ≠ ⊥
. A map f : α → X
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 X
and Y
, a function f : X → Y
and a point x : X
,
ContinuousAt f x
means f
is continuous at x
, and global continuity is
Continuous f
. There is also a version of continuity PContinuous
for
partially defined functions.
Notation #
The following notation is introduced elsewhere and it heavily used in this file.
𝓝 x
: the filternhds x
of neighborhoods of a pointx
;𝓟 s
: the principal filter of a sets
;𝓝[s] x
: the filternhdsWithin x s
of neighborhoods of a pointx
within a sets
;𝓝[≠] 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 https://leanprover-community.github.io/theories/topology.html.
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 constructor for topologies by specifying the closed sets, and showing that they satisfy the appropriate conditions.
Equations
- TopologicalSpace.ofClosed T empty_mem sInter_mem union_mem = { IsOpen := fun (X_1 : Set X) => X_1ᶜ ∈ T, isOpen_univ := ⋯, isOpen_inter := ⋯, isOpen_sUnion := ⋯ }
Instances For
Alias of the reverse direction of TopologicalSpace.ext_iff_isClosed
.
Alias of the reverse direction of isClosed_compl_iff
.
Interior of a set #
Closure of a set #
Alias of the forward direction of closure_nonempty_iff
.
Alias of the reverse 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 #
Interior and frontier are disjoint.
Alias of the reverse direction of frontier_subset_iff_isClosed
.
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 #
The open sets containing x
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 x
, it suffices to show that it is above
the principal filter of some open set s
containing x
.
If a predicate is true in a neighborhood of x
, then it is true for 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.
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
.
Alias of eventually_mem_nhds_iff
.
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
.
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
.
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.
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
.
Alias of the forward direction of mapClusterPt_def
.
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 G
.
Interior, closure and frontier in terms of neighborhoods #
Alias of the reverse direction of TopologicalSpace.ext_iff_nhds
.
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.
Alias of mem_closure_iff_nhds_ne_bot
.
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.
x
belongs to the closure of s
if and only if some ultrafilter
supported on s
converges to 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
.
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 = x
is not equivalent to Filter.Tendsto g f (𝓝 x)
unless the codomain is a
Hausdorff space and g
has a limit along f
.
If a filter f
is majorated by some 𝓝 x
, then it is majorated by 𝓝 (Filter.lim f)
. We
formulate this lemma with a [Nonempty X]
argument of lim
derived from h
to make it useful for
types without a [Nonempty X]
instance. Because of the built-in proof irrelevance, Lean will unify
this instance with any other instance.
If g
tends to some 𝓝 x
along f
, then it tends to 𝓝 (Filter.limUnder f g)
. We formulate
this lemma with a [Nonempty X]
argument of lim
derived from h
to make it useful for types
without a [Nonempty X]
instance. Because of the built-in proof irrelevance, Lean will unify this
instance with any other instance.
Continuity #
If f x ∈ s ∈ 𝓝 (f x)
for continuous f
, then f y ∈ s
near x
.
This is essentially Filter.Tendsto.eventually_mem
, but infers in more cases when applied.
If a function f
tends to somewhere other than 𝓝 (f x)
at x
,
then f
is not continuous at x
Deprecated, please use not_mem_tsupport_iff_eventuallyEq
instead.
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 #
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 : X → Y
with dense range and y : Y
, returns some x : X
.
Equations
- hf.some x = Classical.choice ⋯