End Double_round_sqrt_FTZ.
Section Double_round_sqrt_beta_ge_4.
Definition double_round_sqrt_beta_ge_4_hyp fexp1 fexp2 :=
(forall ex, (2 * fexp1 ex <= fexp1 (2 * ex))%Z)
/\ (forall ex, (2 * fexp1 ex <= fexp1 (2 * ex - 1))%Z)
/\ (forall ex, (fexp1 (2 * ex) < 2 * ex)%Z ->
(fexp2 ex + ex <= 2 * fexp1 ex - 1)%Z).

(* Specifications: *)
Lemma double_round_sqrt_beta_ge_4_aux :
(4 <= beta)%Z ->
forall fexp1 fexp2 : Z -> Z,
Valid_exp fexp1 -> Valid_exp fexp2 ->
double_round_sqrt_beta_ge_4_hyp fexp1 fexp2 ->
forall x,
0 < x ->
(fexp2 (ln_beta (sqrt x)) <= fexp1 (ln_beta (sqrt x)) - 1)%Z ->
generic_format beta fexp1 x ->
/ 2 * ulp beta fexp2 (sqrt x) < Rabs (sqrt x - midp fexp1 (sqrt x)).
Lemma double_round_sqrt_beta_ge_4 :
(4 <= beta)%Z ->
forall fexp1 fexp2 : Z -> Z,
Valid_exp fexp1 -> Valid_exp fexp2 ->
forall (choice1 choice2 : Z -> bool),
double_round_sqrt_beta_ge_4_hyp fexp1 fexp2 ->
forall x,
generic_format beta fexp1 x ->
double_round_eq fexp1 fexp2 choice1 choice2 (sqrt x).
Lemma double_round_sqrt_beta_ge_4_aux :
(4 <= beta)%Z ->
forall fexp1 fexp2 : Z -> Z,
Valid_exp fexp1 -> Valid_exp fexp2 ->
double_round_sqrt_beta_ge_4_hyp fexp1 fexp2 ->
forall x,
0 < x ->
(fexp2 (ln_beta (sqrt x)) <= fexp1 (ln_beta (sqrt x)) - 1)%Z ->
generic_format beta fexp1 x ->
/ 2 * ulp beta fexp2 (sqrt x) < Rabs (sqrt x - midp fexp1 (sqrt x)).
Lemma double_round_sqrt_beta_ge_4 :
(4 <= beta)%Z ->
forall fexp1 fexp2 : Z -> Z,
Valid_exp fexp1 -> Valid_exp fexp2 ->
forall (choice1 choice2 : Z -> bool),
double_round_sqrt_beta_ge_4_hyp fexp1 fexp2 ->
forall x,
generic_format beta fexp1 x ->
double_round_eq fexp1 fexp2 choice1 choice2 (sqrt x).