Theory of topology on ordered spaces #
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 OrderTopology α
(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 OrderClosedTopology α
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
(OrderClosedTopology
vs OrderTopology
, Preorder
vs PartialOrder
vs LinearOrder
etc)
see their statements.
Open / closed sets #
isOpen_lt
: iff
andg
are continuous functions, then{x | f x < g x}
is open;isOpen_Iio
,isOpen_Ioi
,isOpen_Ioo
: open intervals are open;isClosed_le
: iff
andg
are continuous functions, then{x | f x ≤ g x}
is closed;isClosed_Iic
,isClosed_Ici
,isClosed_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 allx
.
Min, max, sSup
and sInf
#
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.
For any
a
, the set{b | b ≤ a}
is closed.
If α
is a topological space and a preorder, ClosedIicTopology α
means that Iic a
is
closed for all a : α
.
Instances
For any
a
, the set{b | a ≤ b}
is closed.
If α
is a topological space and a preorder, ClosedIciTopology α
means that Ici a
is
closed for all a : α
.
Instances
The set
{ (x, y) | x ≤ y }
is a closed set.
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.
Instances
Equations
- (_ : TopologicalSpace.FirstCountableTopology αᵒᵈ) = h
Equations
- (_ : TopologicalSpace.SecondCountableTopology αᵒᵈ) = h
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 OrderClosedTopology
#
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 OrderTopology α
Right neighborhoods, point excluded #
Left neighborhoods, point excluded #
Right neighborhoods, point included #
Left neighborhoods, point included #
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
.
Instances
(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.
Equations
- Preorder.topology α = TopologicalSpace.generateFrom {s | ∃ a, s = {b | a < b} ∨ s = {b | b < a}}
Instances For
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.
The topology induced by a strictly monotone function with order-connected range is the preorder topology.
A strictly monotone function between linear orders with order topology is a topological
embedding provided that the range of f
is order-connected.
On a Set.OrdConnected
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
.
Let α
be a densely ordered linear order with order topology. If α
is a separable space, then
it has second countable topology. Note that the "densely ordered" assumption cannot be dropped, see
double arrow space for a counterexample.
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 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.
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 OrderTopology
#
We've seen some properties of left and right neighborhood of a point in an OrderClosedTopology
.
In an OrderTopology
, 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
.
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.
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 atTop
then f + g
tends to atTop
.
In a linearly ordered additive commutative group with the order topology, if f
tends to C
and g
tends to atBot
then f + g
tends to atBot
.
In a linearly ordered additive commutative group with the order topology, if f
tends to
atTop
and g
tends to C
then f + g
tends to atTop
.
In a linearly ordered additive commutative group with the order topology, if f
tends to
atBot
and g
tends to C
then f + g
tends to atBot
.
If a
is positive we can form a basis from only nonnegative Set.Ioo
intervals
Alias of IsLUB.mem_of_isClosed
.
Alias of IsGLB.mem_of_isClosed
.
Existence of sequences tending to sInf
or sSup
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 atTop
filter for an open interval Ioo a b
comes from the left-neighbourhoods filter at
the right endpoint in the ambient order.
The atBot
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 continuous at the indexed supremum over a nonempty Sort
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 continuous at the indexed infimum over a nonempty Sort
sends this indexed
infimum to the indexed infimum 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 continuous at the indexed infimum over a nonempty Sort
sends this indexed
infimum to the indexed supremum 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 continuous at the indexed supremum over a nonempty Sort
sends this
indexed supremum to the indexed infimum of the composition.
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.
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 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.
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 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 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 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.
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 sSup (f '' (Iio x))
.
A monotone map has a limit to the right of any point x
, equal to sInf (f '' (Ioi x))
.