Require Export Subbases.
From ZornsLemma Require Export Relation_Definitions_Implicit.
Require Export SeparatednessAxioms.
Section OrderTopology.
Variable X:Type.
Variable R:relation X.
Hypothesis R_ord: order R.
Inductive order_topology_subbasis : Family X :=
| intro_lower_interval: forall x:X,
In order_topology_subbasis [ y:X | R y x /\ y <> x ]
| intro_upper_interval: forall x:X,
In order_topology_subbasis [ y:X | R x y /\ y <> x].
Definition OrderTopology : TopologicalSpace :=
Build_TopologicalSpace_from_subbasis X order_topology_subbasis.
Section if_total_order.
Hypothesis R_total: forall x y:X, R x y \/ R y x.

Lemma upper_closed_interval_closed: forall x:X,
closed [y:X | R x y] (X:=OrderTopology).