Basic theory of topological spaces.
The main definition is the type class topological space α
which endows a type α
with a topology.
Then set α
gets predicates is_open
, is_closed
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 is_cluster_pt x F : 𝓝 x ⊓ F ≠ ⊥
. A map f : ι → α
clusters at x
along F : filter ι
if map_cluster_pt x F f : cluster_pt x (map f F)
. In particular
the notion of cluster point of a sequence u
is map_cluster_pt x at_top u
.
This file also defines locally finite families of subsets of α
.
For topological spaces α
and β
, a function f : α → β
and a point a : α
,
continuous_at 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 filter of neighborhoods of a pointx
;𝓟 s
: the principal filter of a sets
;
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
- is_open : set α → Prop
- is_open_univ : c.is_open set.univ
- is_open_inter : ∀ (s t : set α), c.is_open s → c.is_open t → c.is_open (s ∩ t)
- is_open_sUnion : ∀ (s : set (set α)), (∀ (t : set α), t ∈ s → c.is_open t) → c.is_open (⋃₀s)
A topology on α
.
Instances
- uniform_space.to_topological_space
- add_group_with_zero_nhd.topological_space
- empty.topological_space
- pempty.topological_space
- unit.topological_space
- bool.topological_space
- nat.topological_space
- int.topological_space
- sierpinski_space
- subtype.topological_space
- quot.topological_space
- quotient.topological_space
- prod.topological_space
- sum.topological_space
- sigma.topological_space
- Pi.topological_space
- ulift.topological_space
- Top.topological_space_unbundled
- Top.topological_space
- algebraic_geometry.PresheafedSpace.topological_space
- prime_spectrum.zariski_topology
- quotient_group.quotient.topological_space
- quotient_add_group.quotient.topological_space
- order_dual.topological_space
- topological_ring_quotient_topology
- nnreal.topological_space
- ennreal.topological_space
- topological_fiber_bundle_core.topological_space_fiber
- topological_fiber_bundle_core.to_topological_space
- model_prod.topological_space
- tangent_bundle.topological_space
- tangent_space.topological_space
- euclidean_half_space.topological_space
- euclidean_quadrant.topological_space
- TopCommRing.is_topological_space
- TopCommRing.forget_topological_space
- TopCommRing.forget_to_CommRing_topological_space
- continuous_map.compact_open
- list.topological_space
- vector.topological_space
- filter.ultrafilter.topological_space
- stone_cech.topological_space
A constructor for topologies by specifying the closed sets, and showing that they satisfy the appropriate conditions.
Equations
- topological_space.of_closed T empty_mem sInter_mem union_mem = {is_open := λ (X : set α), Xᶜ ∈ T, is_open_univ := _, is_open_inter := _, is_open_sUnion := _}
Interior of a set
Closure of a 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
.
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
- nhds_ne_bot = _
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.
Equations
- cluster_pt x F = (nhds x ⊓ F).ne_bot
x
is a cluster point of a set s
if every neighbourhood of x
meets s
on a nonempty
set.
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
- map_cluster_pt x F u = cluster_pt x (filter.map u F)
Interior, closure and frontier in terms of neighborhoods
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 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
If f
is a filter in β
and g : β → α
is a function, then lim f
is a limit of g
at f
,
if it exists.
Equations
- lim f g = Lim (filter.map g f)
If a filter f
is majorated by some 𝓝 a
, then it is majorated by 𝓝 (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 𝓝 (lim 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.
Locally finite families
A family of sets in set α
is locally finite if at every point x:α
,
there is a neighborhood of x
which meets only finitely many sets in the family
Continuity
A function between topological spaces is continuous if the preimage of every open set is open.
A function between topological spaces is continuous at a point x₀
if f x
tends to f x₀
when x
tends to x₀
.
Equations
- continuous_at f x = filter.tendsto f (nhds x) (nhds (f x))
A piecewise defined function if p then f else g
is continuous, if both f
and g
are continuous, and they coincide on the frontier (boundary) of the set {a | p a}
.
Continuity of a partial function