Definition double_round_div_hyp fexp1 fexp2 :=
  (forall ex, (fexp2 ex <= fexp1 ex - 1)%Z)
  /\ (forall ex ey, (fexp1 ex < ex)%Z -> (fexp1 ey < ey)%Z ->
                    (fexp1 (ex - ey) <= ex - ey + 1)%Z ->
                    (fexp2 (ex - ey) <= fexp1 ex - ey)%Z)
  /\ (forall ex ey, (fexp1 ex < ex)%Z -> (fexp1 ey < ey)%Z ->
                    (fexp1 (ex - ey + 1) <= ex - ey + 1 + 1)%Z ->
                    (fexp2 (ex - ey + 1) <= fexp1 ex - ey)%Z)
  /\ (forall ex ey, (fexp1 ex < ex)%Z -> (fexp1 ey < ey)%Z ->
                    (fexp1 (ex - ey) <= ex - ey)%Z ->
                    (fexp2 (ex - ey) <= fexp1 (ex - ey)
                                        + fexp1 ey - ey)%Z)
  /\ (forall ex ey, (fexp1 ex < ex)%Z -> (fexp1 ey < ey)%Z ->
                    (fexp1 (ex - ey) = ex - ey + 1)%Z ->
                    (fexp2 (ex - ey) <= ex - ey - ey + fexp1 ey)%Z).

(* Specifications: *)
Lemma double_round_div_aux0 : forall fexp1 fexp2 : Z -> Z, Valid_exp fexp1 -> Valid_exp fexp2 -> forall (choice1 choice2 : Z -> bool), double_round_div_hyp fexp1 fexp2 -> forall x y, 0 < x -> 0 < y -> generic_format beta fexp1 x -> generic_format beta fexp1 y -> fexp1 (ln_beta (x / y)) = (ln_beta (x / y) + 1)%Z -> ~ (bpow (ln_beta (x / y)) - / 2 * ulp beta fexp2 (x / y) <= x / y).
Lemma double_round_div_aux1 : forall fexp1 fexp2 : Z -> Z, Valid_exp fexp1 -> Valid_exp fexp2 -> forall (choice1 choice2 : Z -> bool), double_round_div_hyp fexp1 fexp2 -> forall x y, 0 < x -> 0 < y -> generic_format beta fexp1 x -> generic_format beta fexp1 y -> (fexp1 (ln_beta (x / y)) <= ln_beta (x / y))%Z -> ~ (midp fexp1 (x / y) - / 2 * ulp beta fexp2 (x / y) <= x / y < midp fexp1 (x / y)).
Lemma double_round_div_aux2 : forall fexp1 fexp2 : Z -> Z, Valid_exp fexp1 -> Valid_exp fexp2 -> forall (choice1 choice2 : Z -> bool), double_round_div_hyp fexp1 fexp2 -> forall x y, 0 < x -> 0 < y -> generic_format beta fexp1 x -> generic_format beta fexp1 y -> (fexp1 (ln_beta (x / y)) <= ln_beta (x / y))%Z -> ~ (midp fexp1 (x / y) < x / y <= midp fexp1 (x / y) + / 2 * ulp beta fexp2 (x / y)).
Lemma double_round_div_aux : forall fexp1 fexp2 : Z -> Z, Valid_exp fexp1 -> Valid_exp fexp2 -> forall (choice1 choice2 : Z -> bool), (exists n, (beta = 2 * n :> Z)%Z) -> double_round_div_hyp fexp1 fexp2 -> forall x y, 0 < x -> 0 < y -> generic_format beta fexp1 x -> generic_format beta fexp1 y -> double_round_eq fexp1 fexp2 choice1 choice2 (x / y).
Lemma double_round_div : forall fexp1 fexp2 : Z -> Z, Valid_exp fexp1 -> Valid_exp fexp2 -> forall (choice1 choice2 : Z -> bool), (exists n, (beta = 2 * n :> Z)%Z) -> double_round_div_hyp fexp1 fexp2 -> forall x y, y <> 0 -> generic_format beta fexp1 x -> generic_format beta fexp1 y -> double_round_eq fexp1 fexp2 choice1 choice2 (x / y).
Lemma FLX_double_round_div_hyp : (2 * prec <= prec')%Z -> double_round_div_hyp (FLX_exp prec) (FLX_exp prec').
Theorem double_round_div_FLX : forall choice1 choice2, (exists n, (beta = 2 * n :> Z)%Z) -> (2 * prec <= prec')%Z -> forall x y, y <> 0 -> FLX_format beta prec x -> FLX_format beta prec y -> double_round_eq (FLX_exp prec) (FLX_exp prec') choice1 choice2 (x / y).
Lemma FLT_double_round_div_hyp : (emin' <= emin - prec - 2)%Z -> (2 * prec <= prec')%Z -> double_round_div_hyp (FLT_exp emin prec) (FLT_exp emin' prec').
Theorem double_round_div_FLT : forall choice1 choice2, (exists n, (beta = 2 * n :> Z)%Z) -> (emin' <= emin - prec - 2)%Z -> (2 * prec <= prec')%Z -> forall x y, y <> 0 -> FLT_format beta emin prec x -> FLT_format beta emin prec y -> double_round_eq (FLT_exp emin prec) (FLT_exp emin' prec') choice1 choice2 (x / y).
Lemma FTZ_double_round_div_hyp : (emin' + prec' <= emin - 1)%Z -> (2 * prec <= prec')%Z -> double_round_div_hyp (FTZ_exp emin prec) (FTZ_exp emin' prec').
Theorem double_round_div_FTZ : forall choice1 choice2, (exists n, (beta = 2 * n :> Z)%Z) -> (emin' + prec' <= emin - 1)%Z -> (2 * prec <= prec')%Z -> forall x y, y <> 0 -> FTZ_format beta emin prec x -> FTZ_format beta emin prec y -> double_round_eq (FTZ_exp emin prec) (FTZ_exp emin' prec') choice1 choice2 (x / y).
Lemma double_round_div_aux0 : forall fexp1 fexp2 : Z -> Z, Valid_exp fexp1 -> Valid_exp fexp2 -> forall (choice1 choice2 : Z -> bool), double_round_div_hyp fexp1 fexp2 -> forall x y, 0 < x -> 0 < y -> generic_format beta fexp1 x -> generic_format beta fexp1 y -> fexp1 (ln_beta (x / y)) = (ln_beta (x / y) + 1)%Z -> ~ (bpow (ln_beta (x / y)) - / 2 * ulp beta fexp2 (x / y) <= x / y).
Lemma double_round_div_aux1 : forall fexp1 fexp2 : Z -> Z, Valid_exp fexp1 -> Valid_exp fexp2 -> forall (choice1 choice2 : Z -> bool), double_round_div_hyp fexp1 fexp2 -> forall x y, 0 < x -> 0 < y -> generic_format beta fexp1 x -> generic_format beta fexp1 y -> (fexp1 (ln_beta (x / y)) <= ln_beta (x / y))%Z -> ~ (midp fexp1 (x / y) - / 2 * ulp beta fexp2 (x / y) <= x / y < midp fexp1 (x / y)).
Lemma double_round_div_aux2 : forall fexp1 fexp2 : Z -> Z, Valid_exp fexp1 -> Valid_exp fexp2 -> forall (choice1 choice2 : Z -> bool), double_round_div_hyp fexp1 fexp2 -> forall x y, 0 < x -> 0 < y -> generic_format beta fexp1 x -> generic_format beta fexp1 y -> (fexp1 (ln_beta (x / y)) <= ln_beta (x / y))%Z -> ~ (midp fexp1 (x / y) < x / y <= midp fexp1 (x / y) + / 2 * ulp beta fexp2 (x / y)).
Lemma double_round_div_aux : forall fexp1 fexp2 : Z -> Z, Valid_exp fexp1 -> Valid_exp fexp2 -> forall (choice1 choice2 : Z -> bool), (exists n, (beta = 2 * n :> Z)%Z) -> double_round_div_hyp fexp1 fexp2 -> forall x y, 0 < x -> 0 < y -> generic_format beta fexp1 x -> generic_format beta fexp1 y -> double_round_eq fexp1 fexp2 choice1 choice2 (x / y).
Lemma double_round_div : forall fexp1 fexp2 : Z -> Z, Valid_exp fexp1 -> Valid_exp fexp2 -> forall (choice1 choice2 : Z -> bool), (exists n, (beta = 2 * n :> Z)%Z) -> double_round_div_hyp fexp1 fexp2 -> forall x y, y <> 0 -> generic_format beta fexp1 x -> generic_format beta fexp1 y -> double_round_eq fexp1 fexp2 choice1 choice2 (x / y).
Lemma FLX_double_round_div_hyp : (2 * prec <= prec')%Z -> double_round_div_hyp (FLX_exp prec) (FLX_exp prec').
Theorem double_round_div_FLX : forall choice1 choice2, (exists n, (beta = 2 * n :> Z)%Z) -> (2 * prec <= prec')%Z -> forall x y, y <> 0 -> FLX_format beta prec x -> FLX_format beta prec y -> double_round_eq (FLX_exp prec) (FLX_exp prec') choice1 choice2 (x / y).
Lemma FLT_double_round_div_hyp : (emin' <= emin - prec - 2)%Z -> (2 * prec <= prec')%Z -> double_round_div_hyp (FLT_exp emin prec) (FLT_exp emin' prec').
Theorem double_round_div_FLT : forall choice1 choice2, (exists n, (beta = 2 * n :> Z)%Z) -> (emin' <= emin - prec - 2)%Z -> (2 * prec <= prec')%Z -> forall x y, y <> 0 -> FLT_format beta emin prec x -> FLT_format beta emin prec y -> double_round_eq (FLT_exp emin prec) (FLT_exp emin' prec') choice1 choice2 (x / y).
Lemma FTZ_double_round_div_hyp : (emin' + prec' <= emin - 1)%Z -> (2 * prec <= prec')%Z -> double_round_div_hyp (FTZ_exp emin prec) (FTZ_exp emin' prec').
Theorem double_round_div_FTZ : forall choice1 choice2, (exists n, (beta = 2 * n :> Z)%Z) -> (emin' + prec' <= emin - 1)%Z -> (2 * prec <= prec')%Z -> forall x y, y <> 0 -> FTZ_format beta emin prec x -> FTZ_format beta emin prec y -> double_round_eq (FTZ_exp emin prec) (FTZ_exp emin' prec') choice1 choice2 (x / y).