(** * Bounds for sets in [Rbar] *)
(** ** Upper and Lower bounds *)
Definition Rbar_is_upper_bound (E : Rbar -> Prop) (l : Rbar) :=
forall x, E x -> Rbar_le x l.
Definition Rbar_is_lower_bound (E : Rbar -> Prop) (l : Rbar) :=
forall x, E x -> Rbar_le l x.

(* Specifications: *)
Lemma Rbar_ub_lb (E : Rbar -> Prop) (l : Rbar) :
Rbar_is_upper_bound (fun x => E (Rbar_opp x)) (Rbar_opp l)
<-> Rbar_is_lower_bound E l.
Lemma Rbar_lb_ub (E : Rbar -> Prop) (l : Rbar) :
Rbar_is_lower_bound (fun x => E (Rbar_opp x)) (Rbar_opp l)
<-> Rbar_is_upper_bound E l.
Lemma is_ub_Rbar_correct (E : R -> Prop) (l : Rbar) :
is_ub_Rbar E l <-> Rbar_is_upper_bound (fun x => is_finite x /\ E x) l.
Lemma is_lb_Rbar_correct (E : R -> Prop) (l : Rbar) :
is_lb_Rbar E l <-> Rbar_is_lower_bound (fun x => is_finite x /\ E x) l.