(********************************************************)
(** *            Proof of Heine's theorem               *)
(********************************************************)
Definition uniform_continuity (f:R -> R) (X:R -> Prop) : Prop :=
forall eps:posreal,
exists delta : posreal,
(forall x y:R,
X x -> X y -> Rabs (x - y) < delta -> Rabs (f x - f y) < eps).

Lemma is_lub_u :
forall (E:R -> Prop) (x y:R), is_lub E x -> is_lub E y -> x = y.