proposition: Lemma div_UP_correct : forall p x y, ((is_real_ub x /\ is_pos_real y) \/ (is_real_lb x /\ is_neg_real y)) -> valid_ub (div_UP p x y) = true /\ le_upper (Xdiv (toX x) (toX y)) (toX (div_UP p x y)).
proof: Proof. intros p x y _; split; [easy|]. unfold div_UP. rewrite (@Fdiv_correct radix). set (z := Xdiv _ _). unfold Xround, Xlift. case z; [exact I|intro z'; simpl]. now apply Generic_fmt.round_UP_pt, FLX.FLX_exp_valid. Qed.
imports: Coq(ZArith Reals Psatz) Flocq(Zaux Raux) Xreal Basic Generic Generic_proof Sig