(* begin hide *)
Ltac case_le H :=
   let t := type of H in
   let h' := fresh in
      match t with ?x <= ?y => case (total_order_T x y);
         [intros h'; case h'; clear h' |
          intros h'; clear -H h'; exfalso; lra ] end.

Lemma ub_lt_2_pos : forall x ub lb, lb < x -> x < ub -> 0 < (ub-lb)/2.