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
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.
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
.
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
.
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 #
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.
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
- DenseRange.some hf x = Classical.choice β―