Module docstring
{"# 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 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.
exists_Ioc_subset_of_mem_nhds,exists_Ico_subset_of_mem_nhds: ifx < y, then any neighborhood ofxincludes an interval[x, z)for somez ∈ (x, y], and any neighborhood ofyincludes an interval(z, y]for somez ∈ [x, y).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; ifgandhboth converge toa, and eventuallyg x ≤ f x ≤ h x, thenfconverges 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.
","### 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., ι → ℝ.
"}