Theory of topology on ordered spaces #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
Main definitions #
The order topology on an ordered space is the topology generated by all open intervals (or
equivalently by those of the form (-∞, a)
and (b, +∞)
). We define it as preorder.topology α
.
However, we do not register it as an instance (as many existing ordered types already have
topologies, which would be equal but not definitionally equal to preorder.topology α
). Instead,
we introduce a class order_topology α
(which is a Prop
, also known as a mixin) saying that on
the type α
having already a topological space structure and a preorder structure, the topological
structure is equal to the order topology.
We also introduce another (mixin) class order_closed_topology α
saying that the set of points
(x, y)
with x ≤ y
is closed in the product space. This is automatically satisfied on a linear
order with the order topology.
We prove many basic properties of such topologies.
Main statements #
This file contains the proofs of the following facts. For exact requirements
(order_closed_topology
vs order_topology
, preorder
vs partial_order
vs linear_order
etc)
see their statements.
Open / closed sets #
is_open_lt
: iff
andg
are continuous functions, then{x | f x < g x}
is open;is_open_Iio
,is_open_Ioi
,is_open_Ioo
: open intervals are open;is_closed_le
: iff
andg
are continuous functions, then{x | f x ≤ g x}
is closed;is_closed_Iic
,is_closed_Ici
,is_closed_Icc
: closed intervals are closed;frontier_le_subset_eq
,frontier_lt_subset_eq
: frontiers of both{x | f x ≤ g x}
and{x | f x < g x}
are included by{x | f x = g x}
;exists_Ioc_subset_of_mem_nhds
,exists_Ico_subset_of_mem_nhds
: ifx < y
, then any neighborhood ofx
includes an interval[x, z)
for somez ∈ (x, y]
, and any neighborhood ofy
includes an interval(z, y]
for somez ∈ [x, y)
.
Convergence and inequalities #
le_of_tendsto_of_tendsto
: iff
converges toa
,g
converges tob
, and eventuallyf x ≤ g x
, thena ≤ b
le_of_tendsto
,ge_of_tendsto
: iff
converges toa
and eventuallyf x ≤ b
(resp.,b ≤ f x
), thena ≤ b
(resp.,b ≤ a); we also provide primed versions that assume the inequalities to hold for all
x`.
Min, max, Sup
and Inf
#
continuous.min
,continuous.max
: pointwisemin
/max
of two continuous functions is continuous.tendsto.min
,tendsto.max
: iff
tends toa
andg
tends tob
, then their pointwisemin
/max
tend tomin a b
andmax a b
, respectively.tendsto_of_tendsto_of_tendsto_of_le_of_le
: theorem known as squeeze theorem, sandwich theorem, theorem of Carabinieri, and two policemen (and a drunk) theorem; ifg
andh
both converge toa
, and eventuallyg x ≤ f x ≤ h x
, thenf
converges toa
.
Implementation notes #
We do not register the order topology as an instance on a preorder (or even on a linear order).
Indeed, on many such spaces, a topology has already been constructed in a different way (think
of the discrete spaces ℕ
or ℤ
, or ℝ
that could inherit a topology as the completion of ℚ
),
and is in general not defeq to the one generated by the intervals. We make it available as a
definition preorder.topology α
though, that can be registered as an instance when necessary, or
for specific types.
A topology on a set which is both a topological space and a preorder is order-closed if the
set of points (x, y)
with x ≤ y
is closed in the product space. We introduce this as a mixin.
This property is satisfied for the order topology on a linear order, but it can be satisfied more
generally, and suffices to derive many interesting properties relating order and topology.
Alias of le_of_tendsto_of_tendsto
.
If s
is a closed set and two functions f
and g
are continuous on s
,
then the set {x ∈ s | f x ≤ g x}
is a closed set.
Neighborhoods to the left and to the right on an order_closed_topology
#
Limits to the left and to the right of real functions are defined in terms of neighborhoods to
the left and to the right, either open or closed, i.e., members of 𝓝[>] a
and
𝓝[≥] a
on the right, and similarly on the left. Here we simply prove that all
right-neighborhoods of a point are equal, and we'll prove later other useful characterizations which
require the stronger hypothesis order_topology α
Right neighborhoods, point excluded #
Left neighborhoods, point excluded #
Right neighborhoods, point included #
Left neighborhoods, point included #
- topology_eq_generate_intervals : t = topological_space.generate_from {s : set α | ∃ (a : α), s = set.Ioi a ∨ s = set.Iio a}
The order topology on an ordered type is the topology generated by open intervals. We register
it on a preorder, but it is mostly interesting in linear orders, where it is also order-closed.
We define it as a mixin. If you want to introduce the order topology on a preorder, use
preorder.topology
.
(Order) topology on a partial order α
generated by the subbase of open intervals
(a, ∞) = { x ∣ a < x }, (-∞ , b) = {x ∣ x < b}
for all a, b
in α
. We do not register it as an
instance as many ordered sets are already endowed with the same topology, most often in a non-defeq
way though. Register as a local instance when necessary.
Squeeze theorem (also known as sandwich theorem). This version assumes that inequalities hold eventually for the filter.
Squeeze theorem (also known as sandwich theorem). This version assumes that inequalities hold everywhere.
On an ord_connected
subset of a linear order, the order topology for the restriction of the
order is the same as the restriction to the subset of the order topology.
A set in a nontrivial densely linear ordered type is dense in the sense of topology if and only
if for any a < b
there exists c ∈ s
, a < c < b
. Each implication requires less typeclass
assumptions.
A set is a neighborhood of a
if and only if it contains an interval (l, u)
containing a
,
provided a
is neither a bottom element nor a top element.
A set is a neighborhood of a
if and only if it contains an interval (l, u)
containing a
.
The set of points which are isolated on the right is countable when the space is second-countable.
The set of points which are isolated on the left is countable when the space is second-countable.
Consider a disjoint family of intervals (x, y)
with x < y
in a second-countable space.
Then the family is countable.
This is not a straightforward consequence of second-countability as some of these intervals might be
empty (but in fact this can happen only for countably many of them).
Intervals in Π i, π i
belong to 𝓝 x
#
For each lemma pi_Ixx_mem_nhds
we add a non-dependent version pi_Ixx_mem_nhds'
because
sometimes Lean fails to unify different instances while trying to apply the dependent version to,
e.g., ι → ℝ
.
Neighborhoods to the left and to the right on an order_topology
#
We've seen some properties of left and right neighborhood of a point in an order_closed_topology
.
In an order_topology
, such neighborhoods can be characterized as the sets containing suitable
intervals to the right or to the left of a
. We give now these characterizations.
The following statements are equivalent:
s
is a neighborhood ofa
within(a, +∞)
s
is a neighborhood ofa
within(a, b]
s
is a neighborhood ofa
within(a, b)
s
includes(a, u)
for someu ∈ (a, b]
s
includes(a, u)
for someu > a
A set is a neighborhood of a
within (a, +∞)
if and only if it contains an interval (a, u)
with a < u < u'
, provided a
is not a top element.
A set is a neighborhood of a
within (a, +∞)
if and only if it contains an interval (a, u)
with a < u
.
A set is a neighborhood of a
within (a, +∞)
if and only if it contains an interval (a, u]
with a < u
.
The following statements are equivalent:
s
is a neighborhood ofb
within(-∞, b)
s
is a neighborhood ofb
within[a, b)
s
is a neighborhood ofb
within(a, b)
s
includes(l, b)
for somel ∈ [a, b)
s
includes(l, b)
for somel < b
A set is a neighborhood of a
within (-∞, a)
if and only if it contains an interval (l, a)
with l < a
, provided a
is not a bottom element.
A set is a neighborhood of a
within (-∞, a)
if and only if it contains an interval (l, a)
with l < a
.
A set is a neighborhood of a
within (-∞, a)
if and only if it contains an interval [l, a)
with l < a
.
The following statements are equivalent:
s
is a neighborhood ofa
within[a, +∞)
s
is a neighborhood ofa
within[a, b]
s
is a neighborhood ofa
within[a, b)
s
includes[a, u)
for someu ∈ (a, b]
s
includes[a, u)
for someu > a
A set is a neighborhood of a
within [a, +∞)
if and only if it contains an interval [a, u)
with a < u < u'
, provided a
is not a top element.
A set is a neighborhood of a
within [a, +∞)
if and only if it contains an interval [a, u)
with a < u
.
A set is a neighborhood of a
within [a, +∞)
if and only if it contains an interval [a, u]
with a < u
.
The following statements are equivalent:
s
is a neighborhood ofb
within(-∞, b]
s
is a neighborhood ofb
within[a, b]
s
is a neighborhood ofb
within(a, b]
s
includes(l, b]
for somel ∈ [a, b)
s
includes(l, b]
for somel < b
A set is a neighborhood of a
within (-∞, a]
if and only if it contains an interval (l, a]
with l < a
, provided a
is not a bottom element.
A set is a neighborhood of a
within (-∞, a]
if and only if it contains an interval (l, a]
with l < a
.
A set is a neighborhood of a
within (-∞, a]
if and only if it contains an interval [l, a]
with l < a
.
In a linearly ordered additive commutative group with the order topology, if f
tends to C
and g
tends to at_top
then f + g
tends to at_top
.
In a linearly ordered additive commutative group with the order topology, if f
tends to C
and g
tends to at_bot
then f + g
tends to at_bot
.
In a linearly ordered additive commutative group with the order topology, if f
tends to
at_top
and g
tends to C
then f + g
tends to at_top
.
In a linearly ordered additive commutative group with the order topology, if f
tends to
at_bot
and g
tends to C
then f + g
tends to at_bot
.
If a
is positive we can form a basis from only nonnegative Ioo
intervals
Alias of is_lub.mem_of_is_closed
.
Alias of is_glb.mem_of_is_closed
.
Existence of sequences tending to Inf or Sup of a given set #
The closure of the interval (a, +∞)
is the closed interval [a, +∞)
, unless a
is a top
element.
The closure of the interval (a, +∞)
is the closed interval [a, +∞)
.
The closure of the interval (-∞, a)
is the closed interval (-∞, a]
, unless a
is a bottom
element.
The closure of the interval (-∞, a)
is the interval (-∞, a]
.
The closure of the open interval (a, b)
is the closed interval [a, b]
.
The closure of the interval (a, b]
is the closed interval [a, b]
.
The closure of the interval [a, b)
is the closed interval [a, b]
.
The at_top
filter for an open interval Ioo a b
comes from the left-neighbourhoods filter at
the right endpoint in the ambient order.
The at_bot
filter for an open interval Ioo a b
comes from the right-neighbourhoods filter at
the left endpoint in the ambient order.
Let s
be a dense set in a nontrivial dense linear order α
. If s
is a
separable space (e.g., if α
has a second countable topology), then there exists a countable
dense subset t ⊆ s
such that t
does not contain bottom/top elements of α
.
If α
is a nontrivial separable dense linear order, then there exists a
countable dense set s : set α
that contains neither top nor bottom elements of α
.
For a dense set containing both bot and top elements, see
exists_countable_dense_bot_top
.
A monotone function continuous at the supremum of a nonempty set sends this supremum to the supremum of the image of this set.
A monotone function f
sending bot
to bot
and continuous at the supremum of a set sends
this supremum to the supremum of the image of this set.
A monotone function continuous at the indexed supremum over a nonempty Sort
sends this indexed
supremum to the indexed supremum of the composition.
If a monotone function sending bot
to bot
is continuous at the indexed supremum over
a Sort
, then it sends this indexed supremum to the indexed supremum of the composition.
A monotone function continuous at the infimum of a nonempty set sends this infimum to the infimum of the image of this set.
A monotone function f
sending top
to top
and continuous at the infimum of a set sends
this infimum to the infimum of the image of this set.
A monotone function continuous at the indexed infimum over a nonempty Sort
sends this indexed
infimum to the indexed infimum of the composition.
If a monotone function sending top
to top
is continuous at the indexed infimum over
a Sort
, then it sends this indexed infimum to the indexed infimum of the composition.
An antitone function continuous at the supremum of a nonempty set sends this supremum to the infimum of the image of this set.
An antitone function f
sending bot
to top
and continuous at the supremum of a set sends
this supremum to the infimum of the image of this set.
An antitone function continuous at the indexed supremum over a nonempty Sort
sends this
indexed supremum to the indexed infimum of the composition.
An antitone function sending bot
to top
is continuous at the indexed supremum over
a Sort
, then it sends this indexed supremum to the indexed supremum of the composition.
An antitone function continuous at the infimum of a nonempty set sends this infimum to the supremum of the image of this set.
An antitone function f
sending top
to bot
and continuous at the infimum of a set sends
this infimum to the supremum of the image of this set.
An antitone function continuous at the indexed infimum over a nonempty Sort
sends this indexed
infimum to the indexed supremum of the composition.
If an antitone function sending top
to bot
is continuous at the indexed infimum over
a Sort
, then it sends this indexed infimum to the indexed supremum of the composition.
If a monotone function is continuous at the supremum of a nonempty bounded above set s
,
then it sends this supremum to the supremum of the image of s
.
If a monotone function is continuous at the indexed supremum of a bounded function on
a nonempty Sort
, then it sends this supremum to the supremum of the composition.
If a monotone function is continuous at the infimum of a nonempty bounded below set s
,
then it sends this infimum to the infimum of the image of s
.
A continuous monotone function sends indexed infimum to indexed infimum in conditionally complete linear order, under a boundedness assumption.
If an antitone function is continuous at the supremum of a nonempty bounded above set s
,
then it sends this supremum to the infimum of the image of s
.
If an antitone function is continuous at the indexed supremum of a bounded function on
a nonempty Sort
, then it sends this supremum to the infimum of the composition.
If an antitone function is continuous at the infimum of a nonempty bounded below set s
,
then it sends this infimum to the supremum of the image of s
.
A continuous antitone function sends indexed infimum to indexed supremum in conditionally complete linear order, under a boundedness assumption.
A monotone map has a limit to the left of any point x
, equal to Sup (f '' (Iio x))
.
A monotone map has a limit to the right of any point x
, equal to Inf (f '' (Ioi x))
.