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 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 filternhds xof neighborhoods of a pointx;𝓟 s: the principal filter of a sets;𝓝[s] x: the filternhds_within x sof neighborhoods of a pointxwithin a sets;𝓝[≤] x: the filternhds_within x (set.Iic x)of left-neighborhoods ofx;𝓝[≥] x: the filternhds_within x (set.Ici x)of right-neighborhoods ofx;𝓝[<] x: the filternhds_within x (set.Iio x)of punctured left-neighborhoods ofx;𝓝[>] x: the filternhds_within x (set.Ioi x)of punctured right-neighborhoods ofx;𝓝[≠] x: the filternhds_within 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 #
Tags #
topological space, interior, closure, frontier, neighborhood, continuity, continuous function
Topological spaces #
- is_open : set α → Prop
- is_open_univ : self.is_open set.univ
- is_open_inter : ∀ (s t : set α), self.is_open s → self.is_open t → self.is_open (s ∩ t)
- is_open_sUnion : ∀ (s : set (set α)), (∀ (t : set α), t ∈ s → self.is_open t) → self.is_open (⋃₀s)
A topology on α.
Instances
- uniform_space.to_topological_space
- valued.topological_space
- empty.topological_space
- pempty.topological_space
- punit.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
- cofinite_topology.topological_space
- connected_components.topological_space
- prime_spectrum.zariski_topology
- mul_opposite.topological_space
- add_opposite.topological_space
- units.topological_space
- add_units.topological_space
- continuous_map.compact_open
- quotient_group.quotient.topological_space
- quotient_add_group.quotient.topological_space
- topological_ring_quotient_topology
- order_dual.topological_space
- ufi_ts
- localization.topological_space
- maximal_spectrum.ts
- R_hat.topological_space
- K_hat.topological_space
- finite_adele_ring'.topological_space
- finite_adele_ring.topological_space
- function_field.Fqt_infty.topological_space
- tsq
- function_field.A_F_f.topological_space
- function_field.tensor_product.topological_space
- function_field.A_F.topological_space
- number_field.pi.topological_space
- number_field.A_K_f.topological_space
- number_field.tensor_product.topological_space
- number_field.A_K.topological_space
- finite_idele_group'.topological_space
- number_field.I_K_f.topological_space
- number_field.I_K.topological_space
- number_field.C_K.topological_space
- number_field.class_group.topological_space
- nnreal.topological_space
- krull_topology
- G_K.topological_space
- G_K_ab.topological_space
- function_field.I_F_f.topological_space
- function_field.I_F.topological_space
- function_field.C_F.topological_space
- function_field.class_group.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 #
Alias of closure_nonempty_iff.
Alias of closure_nonempty_iff.
The closure of a set s is dense if and only if s is dense.
Alias of dense_closure.
Alias of dense_closure.
Alias of dense_iff_inter_open.
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.
The open sets containing a are a basis for the neighborhood filter. See nhds_basis_opens'
for a variant using open neighborhoods instead.
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.
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 = (𝓝 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 #
Alias of mem_closure_iff_frequently.
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 interior of {x} is empty.
x belongs to the closure of s if and only if some ultrafilter
supported on s converges to x.
The intersection of an open dense set with a dense set is a dense set.
The intersection of a dense set with an open dense set is a dense set.
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 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 : ultrafilter α.
Equations
- ultrafilter.Lim = λ (F : ultrafilter α), Lim' ↑F
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. Registered as a structure to make sure it is not unfolded by Lean.
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 (𝓝 x) (𝓝 (f x))
See also interior_preimage_subset_preimage_interior.
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.
Continuity and partial functions #
Continuity of a partial function
If a continuous map f maps s to t, then it maps closure s to closure t.
Function with dense range #
f : ι → β has dense range if its range (image) is a dense subset of β.
Equations
- dense_range f = dense (set.range f)
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
- hf.some b = classical.choice _