(**
This file is part of the Flocq formalization of floating-point
arithmetic in Coq: http://flocq.gforge.inria.fr/

Copyright (C) 2010-2013 Sylvie Boldo
#<br />#
Copyright (C) 2010-2013 Guillaume Melquiond

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
COPYING file for more details.
*)

(** * IEEE-754 arithmetic *)
Require Import Fcore.
Require Import Fcore_digits.
Require Import Fcalc_digits.
Require Import Fcalc_round.
Require Import Fcalc_bracket.
Require Import Fcalc_ops.
Require Import Fcalc_div.
Require Import Fcalc_sqrt.
Require Import Fprop_relative.

Section AnyRadix.

Inductive full_float :=
  | F754_zero : bool -> full_float
  | F754_infinity : bool -> full_float
  | F754_nan : bool -> positive -> full_float
  | F754_finite : bool -> positive -> Z -> full_float.

Definition FF2R beta x :=
  match x with
  | F754_finite s m e => F2R (Float beta (cond_Zopp s (Zpos m)) e)
  | _ => 0%R
  end.

End AnyRadix.

Section Binary.

Arguments exist {A P} x _.

(** [prec] is the number of bits of the mantissa including the implicit one;
    [emax] is the exponent of the infinities.
    For instance, binary32 is defined by [prec = 24] and [emax = 128]. *)
Variable prec emax : Z.
Context (prec_gt_0_ : Prec_gt_0 prec).
Hypothesis Hmax : (prec < emax)%Z.

Let emin := (3 - emax - prec)%Z.
Let fexp := FLT_exp emin prec.
Instance fexp_correct : Valid_exp fexp := FLT_exp_valid emin prec.
Instance fexp_monotone : Monotone_exp fexp := FLT_exp_monotone emin prec.

Definition canonic_mantissa m e :=
  Zeq_bool (fexp (Zpos (digits2_pos m) + e)) e.

Definition bounded m e :=
  andb (canonic_mantissa m e) (Zle_bool e (emax - prec)).

Definition valid_binary x :=
  match x with
  | F754_finite _ m e => bounded m e
  | F754_nan _ pl => (Zpos (digits2_pos pl) <? prec)%Z
  | _ => true
  end.

(** Basic type used for representing binary FP numbers.
    Note that there is exactly one such object per FP datum. *)

(* Goal: forall (m1 m2 : positive) (e1 e2 : Z), Rlt (Rmult (Z2R (Z.opp (Zpos m1))) (bpow radix2 e1)) (Rmult (Z2R (Zpos m2)) (bpow radix2 e2)) *)
(* Goal: @eq (option comparison) (if b then if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end else if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end) (@Some comparison (Rcompare (@F2R radix2 (Float radix2 (cond_Zopp b (Zpos m)) e)) (@F2R radix2 (Float radix2 (cond_Zopp b0 (Zpos m0)) e1)))) *)
Definition nan_pl := {pl | (Zpos (digits2_pos pl) <? prec)%Z  = true}.

Inductive binary_float :=
  | B754_zero : bool -> binary_float
  | B754_infinity : bool -> binary_float
  | B754_nan : bool -> nan_pl -> binary_float
  | B754_finite : bool ->
    forall (m : positive) (e : Z), bounded m e = true -> binary_float.

Definition FF2B x :=
  match x as x return valid_binary x = true -> binary_float with
  | F754_finite s m e => B754_finite s m e
  | F754_infinity s => fun _ => B754_infinity s
  | F754_zero s => fun _ => B754_zero s
  | F754_nan b pl => fun H => B754_nan b (exist pl H)
  end.

Definition B2FF x :=
  match x with
  | B754_finite s m e _ => F754_finite s m e
  | B754_infinity s => F754_infinity s
  | B754_zero s => F754_zero s
  | B754_nan b (exist pl _) => F754_nan b pl
  end.

Definition B2R f :=
  match f with
  | B754_finite s m e _ => F2R (Float radix2 (cond_Zopp s (Zpos m)) e)
  | _ => 0%R
  end.

Theorem FF2R_B2FF :
  forall x,
  FF2R radix2 (B2FF x) = B2R x.
Proof.
(* Goal: forall x : binary_float, @eq bool (valid_binary (B2FF x)) true *)
now intros [sx|sx|sx [plx Hplx]|sx mx ex Hx].
Qed.

Theorem B2FF_FF2B :
  forall x Hx,
  B2FF (FF2B x Hx) = x.
Proof.
(* Goal: forall (x : full_float) (Hx : @eq bool (valid_binary x) true), @eq R (B2R (FF2B x Hx)) (FF2R radix2 x) *)
now intros [sx|sx|sx plx|sx mx ex] Hx.
Qed.

Theorem valid_binary_B2FF :
  forall x,
  valid_binary (B2FF x) = true.
Proof.
(* Goal: forall x : binary_float, @eq bool (valid_binary (B2FF x)) true *)
now intros [sx|sx|sx [plx Hplx]|sx mx ex Hx].
Qed.

Theorem FF2B_B2FF :
  forall x H,
  FF2B (B2FF x) H = x.
Proof.
(* Goal: forall (x : binary_float) (H : @eq bool (valid_binary (B2FF x)) true), @eq binary_float (FF2B (B2FF x) H) x *)
intros [sx|sx|sx [plx Hplx]|sx mx ex Hx] H ; try easy.
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
simpl. apply f_equal, f_equal, eqbool_irrelevance.
(* Goal: @eq binary_float (B754_finite sy my ey Hx) (B754_finite sy my ey Hy) *)
apply f_equal, eqbool_irrelevance.
Qed.

Theorem FF2B_B2FF_valid :
  forall x,
  FF2B (B2FF x) (valid_binary_B2FF x) = x.
Proof.
(* Goal: forall x : binary_float, @eq binary_float (FF2B (B2FF x) (valid_binary_B2FF x)) x *)
intros x.
(* Goal: @eq binary_float (FF2B (B2FF x) (valid_binary_B2FF x)) x *)
apply FF2B_B2FF.
Qed.

Theorem B2R_FF2B :
  forall x Hx,
  B2R (FF2B x Hx) = FF2R radix2 x.
Proof.
(* Goal: forall (x : full_float) (Hx : @eq bool (valid_binary x) true), @eq R (B2R (FF2B x Hx)) (FF2R radix2 x) *)
now intros [sx|sx|sx plx|sx mx ex] Hx.
Qed.

Theorem match_FF2B :
(* Goal: forall (m1 m2 : positive) (e1 e2 : Z), Rlt (Rmult (Z2R (Z.opp (Zpos m1))) (bpow radix2 e1)) (Rmult (Z2R (Zpos m2)) (bpow radix2 e2)) *)
(* Goal: @eq (option comparison) (if b then if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end else if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end) (@Some comparison (Rcompare (@F2R radix2 (Float radix2 (cond_Zopp b (Zpos m)) e)) (@F2R radix2 (Float radix2 (cond_Zopp b0 (Zpos m0)) e1)))) *)
  forall {T} fz fi fn ff x Hx,
  match FF2B x Hx return T with
  | B754_zero sx => fz sx
  | B754_infinity sx => fi sx
  | B754_nan b (exist p _) => fn b p
  | B754_finite sx mx ex _ => ff sx mx ex
  end =
  match x with
  | F754_zero sx => fz sx
  | F754_infinity sx => fi sx
  | F754_nan b p => fn b p
  | F754_finite sx mx ex => ff sx mx ex
  end.
Proof.
(* Goal: forall (T : Type) (fz fi : forall _ : bool, T) (fn : forall (_ : bool) (_ : positive), T) (ff : forall (_ : bool) (_ : positive) (_ : Z), T) (x : full_float) (Hx : @eq bool (valid_binary x) true), @eq T match FF2B x Hx with | B754_zero sx => fz sx | B754_infinity sx => fi sx | B754_nan b (exist p e as n) => fn b p | B754_finite sx mx ex e => ff sx mx ex end match x with | F754_zero sx => fz sx | F754_infinity sx => fi sx | F754_nan b p => fn b p | F754_finite sx mx ex => ff sx mx ex end *)
now intros T fz fi fn ff [sx|sx|sx plx|sx mx ex] Hx.
Qed.

Theorem canonic_canonic_mantissa :
  forall (sx : bool) mx ex,
  canonic_mantissa mx ex = true ->
  canonic radix2 fexp (Float radix2 (cond_Zopp sx (Zpos mx)) ex).
Proof.
(* Goal: forall (sx : bool) (mx : positive) (ex : Z) (_ : @eq bool (canonic_mantissa mx ex) true), canonic radix2 fexp (Float radix2 (cond_Zopp sx (Zpos mx)) ex) *)
intros sx mx ex H.
(* Goal: canonic radix2 fexp (Float radix2 (cond_Zopp sx (Zpos mx)) ex) *)
assert (Hx := Zeq_bool_eq _ _ H). clear H.
(* Goal: @eq R (B2R (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)))) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
apply sym_eq.
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
simpl.
(* Goal: @eq Z (canonic_exp radix2 fexp (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex))) ex *)
pattern ex at 2 ; rewrite <- Hx.
(* Goal: @eq Z (canonic_exp radix2 fexp (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex))) (fexp (Z.add (Zpos (digits2_pos mx)) ex)) *)
apply (f_equal fexp).
(* Goal: @eq Z (ln_beta_val radix2 (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (ln_beta radix2 (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)))) (Z.add (Zpos (digits2_pos mx)) ex) *)
rewrite ln_beta_F2R_Zdigits.
(* Goal: @eq Z (Z.add (Zdigits radix2 (cond_Zopp sx (Zpos mx))) ex) (Z.add (Zpos (digits2_pos mx)) ex) *)
(* Goal: not (@eq Z (cond_Zopp sx (Zpos mx)) Z0) *)
rewrite <- Zdigits_abs.
(* Goal: @eq Z (Z.add (Zdigits radix2 (Z.abs (cond_Zopp sx (Zpos mx)))) ex) (Z.add (Zpos (digits2_pos mx)) ex) *)
(* Goal: not (@eq Z (cond_Zopp sx (Zpos mx)) Z0) *)
rewrite Zpos_digits2_pos.
(* Goal: @eq R (@F2R radix2 (Fopp radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex))) (@F2R radix2 (Float radix2 (cond_Zopp (negb sx) (Zpos mx)) ex)) *)
now case sx.
(* Goal: @eq R (@F2R radix2 (Fopp radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex))) (@F2R radix2 (Float radix2 (cond_Zopp (negb sx) (Zpos mx)) ex)) *)
now case sx.
Qed.

Theorem generic_format_B2R :
  forall x,
  generic_format radix2 fexp (B2R x).
Proof.
(* Goal: forall x : binary_float, generic_format radix2 fexp (B2R x) *)
intros [sx|sx|sx plx|sx mx ex Hx] ; try apply generic_format_0.
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
simpl.
(* Goal: generic_format radix2 fexp (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) *)
apply generic_format_canonic.
(* Goal: canonic radix2 fexp (Float radix2 (cond_Zopp sy (Zpos my)) ey) *)
(* Goal: @eq binary_float (B754_finite sx mx ex Hx) (B754_finite sy my ey Hy) *)
apply canonic_canonic_mantissa.
(* Goal: @eq bool (canonic_mantissa mx ex) true *)
now destruct (andb_prop _ _ Hx) as (H, _).
Qed.

Theorem FLT_format_B2R :
  forall x,
  FLT_format radix2 emin prec (B2R x).
Proof with auto with typeclass_instances.
(* Goal: forall x : binary_float, @eq binary_float (FF2B (B2FF x) (valid_binary_B2FF x)) x *)
intros x.
apply FLT_format_generic...
apply generic_format_B2R.
Qed.

Theorem B2FF_inj :
  forall x y : binary_float,
  B2FF x = B2FF y ->
  x = y.
Proof.
(* Goal: forall (x y : binary_float) (_ : @eq full_float (B2FF x) (B2FF y)), @eq binary_float x y *)
intros [sx|sx|sx [plx Hplx]|sx mx ex Hx] [sy|sy|sy [ply Hply]|sy my ey Hy] ; try easy.
(* *)
(* Goal: forall r : Rge (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0), @eq R (round radix2 fexp (round_mode m) (Rsqrt (mknonnegreal (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (Rge_le (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) r)))) (B2R (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
intros H.
(* Goal: @eq (prod shr_record Z) (@pair shr_record Z (shr_record_of_loc m l) e) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
now inversion H.
(* *)
(* Goal: forall r : Rge (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0), @eq R (round radix2 fexp (round_mode m) (Rsqrt (mknonnegreal (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (Rge_le (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) r)))) (B2R (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
intros H.
(* Goal: @eq (prod shr_record Z) (@pair shr_record Z (shr_record_of_loc m l) e) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
now inversion H.
(* *)
(* Goal: forall r : Rge (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0), @eq R (round radix2 fexp (round_mode m) (Rsqrt (mknonnegreal (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (Rge_le (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) r)))) (B2R (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
intros H.
(* Goal: @eq binary_float (B754_finite sx mx ex Hx) (B754_finite sy my ey Hy) *)
inversion H.
(* Goal: @eq binary_float (B754_finite sy mx ex Hx) (B754_finite sy my ey Hy) *)
clear H.
(* Goal: @eq binary_float (B754_nan sy (@exist positive (fun pl : positive => @eq bool (Z.ltb (Zpos (digits2_pos pl)) prec) true) plx Hplx)) (B754_nan sy (@exist positive (fun pl : positive => @eq bool (Z.ltb (Zpos (digits2_pos pl)) prec) true) ply Hply)) *)
(* Goal: forall _ : @eq full_float (B2FF (B754_finite sx mx ex Hx)) (B2FF (B754_finite sy my ey Hy)), @eq binary_float (B754_finite sx mx ex Hx) (B754_finite sy my ey Hy) *)
revert Hplx.
(* Goal: forall Hplx : @eq bool (Z.ltb (Zpos (digits2_pos plx)) prec) true, @eq binary_float (B754_nan sy (@exist positive (fun pl : positive => @eq bool (Z.ltb (Zpos (digits2_pos pl)) prec) true) plx Hplx)) (B754_nan sy (@exist positive (fun pl : positive => @eq bool (Z.ltb (Zpos (digits2_pos pl)) prec) true) ply Hply)) *)
(* Goal: forall _ : @eq full_float (B2FF (B754_finite sx mx ex Hx)) (B2FF (B754_finite sy my ey Hy)), @eq binary_float (B754_finite sx mx ex Hx) (B754_finite sy my ey Hy) *)
rewrite H2.
(* Goal: forall Hx : @eq bool (bounded my ey) true, @eq binary_float (B754_finite sy my ey Hx) (B754_finite sy my ey Hy) *)
intros Hx.
(* Goal: @eq binary_float (B754_nan sy (@exist positive (fun pl : positive => @eq bool (Z.ltb (Zpos (digits2_pos pl)) prec) true) ply Hx)) (B754_nan sy (@exist positive (fun pl : positive => @eq bool (Z.ltb (Zpos (digits2_pos pl)) prec) true) ply Hply)) *)
(* Goal: forall _ : @eq full_float (B2FF (B754_finite sx mx ex Hx)) (B2FF (B754_finite sy my ey Hy)), @eq binary_float (B754_finite sx mx ex Hx) (B754_finite sy my ey Hy) *)
apply f_equal, f_equal, eqbool_irrelevance.
(* *)
(* Goal: forall r : Rge (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0), @eq R (round radix2 fexp (round_mode m) (Rsqrt (mknonnegreal (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (Rge_le (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) r)))) (B2R (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
intros H.
(* Goal: @eq binary_float (B754_finite sx mx ex Hx) (B754_finite sy my ey Hy) *)
inversion H.
(* Goal: @eq binary_float (B754_finite sy mx ex Hx) (B754_finite sy my ey Hy) *)
clear H.
(* Goal: @eq binary_float (B754_finite sx mx ex Hx) (B754_finite sy my ey Hy) *)
revert Hx.
(* Goal: forall Hx : @eq bool (bounded mx ex) true, @eq binary_float (B754_finite sy mx ex Hx) (B754_finite sy my ey Hy) *)
rewrite H2, H3.
(* Goal: forall Hx : @eq bool (bounded my ey) true, @eq binary_float (B754_finite sy my ey Hx) (B754_finite sy my ey Hy) *)
intros Hx.
(* Goal: @eq binary_float (B754_finite sy my ey Hx) (B754_finite sy my ey Hy) *)
apply f_equal, eqbool_irrelevance.
Qed.

Definition is_finite_strict f :=
  match f with
  | B754_finite _ _ _ _ => true
  | _ => false
  end.

Theorem B2R_inj:
  forall x y : binary_float,
  is_finite_strict x = true ->
  is_finite_strict y = true ->
  B2R x = B2R y ->
  x = y.
Proof.
(* Goal: forall (x y : binary_float) (_ : @eq bool (is_finite_strict x) true) (_ : @eq bool (is_finite_strict y) true) (_ : @eq R (B2R x) (B2R y)), @eq binary_float x y *)
intros [sx|sx| |sx mx ex Hx] [sy|sy| |sy my ey Hy] ; try easy.
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
simpl.
(* Goal: forall (_ : @eq bool true true) (_ : @eq bool true true) (_ : @eq R (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))), @eq binary_float (B754_finite sx mx ex Hx) (B754_finite sy my ey Hy) *)
intros _ _ Heq.
(* Goal: @eq binary_float (B754_finite sx mx ex Hx) (B754_finite sy my ey Hy) *)
assert (Hs: sx = sy).
(* *)
(* Goal: @eq bool sx sy *)
(* Goal: @eq binary_float (B754_finite sx mx ex Hx) (B754_finite sy my ey Hy) *)
revert Heq. clear.
case sx ; case sy ; try easy ;
(* Goal: @eq bool sx sy *)
(* Goal: @eq binary_float (B754_finite sx mx ex Hx) (B754_finite sy my ey Hy) *)
  intros Heq ; apply False_ind ; revert Heq.
(* Goal: not (@eq R (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos my)) ey)) (IZR Z0)) *)
(* Goal: not (@eq R (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos my)) ey)) (IZR Z0)) *)
(* Goal: Z.le ez (fexp (Z.add (Zdigits radix2 (Zpos mz)) ez)) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rlt_not_eq.
(* Goal: Rlt (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos my)) ey)) *)
(* Goal: forall _ : @eq R (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos my)) ey)), False *)
(* Goal: @eq binary_float (B754_finite sx mx ex Hx) (B754_finite sy my ey Hy) *)
apply Rlt_trans with R0.
(* Goal: Rlt (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
now apply F2R_lt_0_compat.
(* Goal: Rlt (IZR Z0) (@F2R radix2 (Float radix2 (Zpos my) ey)) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_gt_0_compat.
(* Goal: not (@eq R (@F2R radix2 (Float radix2 (Zpos my) ey)) (IZR Z0)) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb sx false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rgt_not_eq.
(* Goal: Rgt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos my)) ey)) *)
(* Goal: @eq binary_float (B754_finite sx mx ex Hx) (B754_finite sy my ey Hy) *)
apply Rgt_trans with R0.
(* Goal: Rlt (IZR Z0) (@F2R radix2 (Float radix2 (Zpos my) ey)) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_gt_0_compat.
(* Goal: Rlt (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
now apply F2R_lt_0_compat.
(* Goal: @eq binary_float (B754_finite sx mx ex Hx) (B754_finite sy my ey Hy) *)
assert (mx = my /\ ex = ey).
(* *)
(* Goal: and (@eq positive mx my) (@eq Z ex ey) *)
(* Goal: @eq binary_float (B754_finite sx mx ex Hx) (B754_finite sy my ey Hy) *)
refine (_ (canonic_unicity _ fexp _ _ _ _ Heq)).
(* Goal: forall _ : @eq (float radix2) (Float radix2 (cond_Zopp sx (Zpos mx)) ex) (Float radix2 (cond_Zopp sy (Zpos my)) ey), and (@eq positive mx my) (@eq Z ex ey) *)
(* Goal: canonic radix2 fexp (Float radix2 (cond_Zopp sx (Zpos mx)) ex) *)
(* Goal: canonic radix2 fexp (Float radix2 (cond_Zopp sy (Zpos my)) ey) *)
(* Goal: @eq binary_float (B754_finite sx mx ex Hx) (B754_finite sy my ey Hy) *)
rewrite Hs.
(* Goal: forall _ : @eq (float radix2) (Float radix2 (cond_Zopp sy (Zpos mx)) ex) (Float radix2 (cond_Zopp sy (Zpos my)) ey), and (@eq positive mx my) (@eq Z ex ey) *)
(* Goal: canonic radix2 fexp (Float radix2 (cond_Zopp sx (Zpos mx)) ex) *)
(* Goal: canonic radix2 fexp (Float radix2 (cond_Zopp sy (Zpos my)) ey) *)
(* Goal: @eq binary_float (B754_finite sx mx ex Hx) (B754_finite sy my ey Hy) *)
now case sy ; intro H ; injection H ; split.
(* Goal: canonic radix2 fexp (Float radix2 (cond_Zopp sy (Zpos my)) ey) *)
(* Goal: @eq binary_float (B754_finite sx mx ex Hx) (B754_finite sy my ey Hy) *)
apply canonic_canonic_mantissa.
(* Goal: @eq bool (canonic_mantissa mx ex) true *)
(* Goal: canonic radix2 fexp (Float radix2 (cond_Zopp sy (Zpos my)) ey) *)
(* Goal: @eq binary_float (B754_finite sx mx ex Hx) (B754_finite sy my ey Hy) *)
exact (proj1 (andb_prop _ _ Hx)).
(* Goal: canonic radix2 fexp (Float radix2 (cond_Zopp sy (Zpos my)) ey) *)
(* Goal: @eq binary_float (B754_finite sx mx ex Hx) (B754_finite sy my ey Hy) *)
apply canonic_canonic_mantissa.
(* Goal: @eq bool (canonic_mantissa my ey) true *)
(* Goal: @eq binary_float (B754_finite sx mx ex Hx) (B754_finite sy my ey Hy) *)
exact (proj1 (andb_prop _ _ Hy)).
(* *)
(* Goal: @eq binary_float (B754_finite sx mx ex Hx) (B754_finite sy my ey Hy) *)
revert Hx.
(* Goal: forall Hx : @eq bool (bounded mx ex) true, @eq binary_float (B754_finite sx mx ex Hx) (B754_finite sy my ey Hy) *)
rewrite Hs, (proj1 H), (proj2 H).
(* Goal: forall Hx : @eq bool (bounded my ey) true, @eq binary_float (B754_finite sy my ey Hx) (B754_finite sy my ey Hy) *)
intros Hx.
(* Goal: @eq binary_float (B754_finite sy my ey Hx) (B754_finite sy my ey Hy) *)
apply f_equal.
(* Goal: @eq (@eq bool (bounded my ey) true) Hx Hy *)
apply eqbool_irrelevance.
Qed.

Definition Bsign x :=
  match x with
  | B754_nan s _ => s
  | B754_zero s => s
  | B754_infinity s => s
  | B754_finite s _ _ _ => s
  end.

Definition sign_FF x :=
  match x with
  | F754_nan s _ => s
  | F754_zero s => s
  | F754_infinity s => s
  | F754_finite s _ _ => s
  end.

Theorem Bsign_FF2B :
  forall x H,
  Bsign (FF2B x H) = sign_FF x.
Proof.
(* Goal: forall (x : full_float) (H : @eq bool (valid_binary x) true), @eq bool (Bsign (FF2B x H)) (sign_FF x) *)
now intros [sx|sx|sx plx|sx mx ex] H.
Qed.

Definition is_finite f :=
  match f with
  | B754_finite _ _ _ _ => true
  | B754_zero _ => true
  | _ => false
  end.

Definition is_finite_FF f :=
  match f with
  | F754_finite _ _ _ => true
  | F754_zero _ => true
  | _ => false
  end.

Theorem is_finite_FF2B :
  forall x Hx,
  is_finite (FF2B x Hx) = is_finite_FF x.
Proof.
(* Goal: forall (x : full_float) (Hx : @eq bool (valid_binary x) true), @eq bool (is_nan (FF2B x Hx)) (is_nan_FF x) *)
now intros [| | |].
Qed.

Theorem is_finite_FF_B2FF :
  forall x,
  is_finite_FF (B2FF x) = is_finite x.
Proof.
(* Goal: forall x : binary_float, @eq bool (is_nan_FF (B2FF x)) (is_nan x) *)
now intros [| |? []|].
Qed.

Theorem B2R_Bsign_inj:
  forall x y : binary_float,
    is_finite x = true ->
    is_finite y = true ->
    B2R x = B2R y ->
    Bsign x = Bsign y ->
    x = y.
Proof.
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub ex' ex) (Zneg p)), @eq Z ex' ex' *)
intros. destruct x, y; try (apply B2R_inj; now eauto).
- simpl in H2. congruence.
- symmetry in H1. apply Rmult_integral in H1.
(* Goal: @eq binary_float (B754_finite b m e e0) (B754_zero b0) *)
  destruct H1. apply (eq_Z2R _ 0) in H1. destruct b0; discriminate H1.
(* Goal: @eq binary_float (B754_finite b m e e0) (B754_zero b0) *)
  simpl in H1. pose proof (bpow_gt_0 radix2 e).
(* Goal: @eq binary_float (B754_finite b m e e0) (B754_zero b0) *)
  rewrite H1 in H3. apply Rlt_irrefl in H3. destruct H3.
- apply Rmult_integral in H1.
(* Goal: @eq binary_float (B754_finite b m e e0) (B754_zero b0) *)
  destruct H1. apply (eq_Z2R _ 0) in H1. destruct b; discriminate H1.
(* Goal: @eq binary_float (B754_finite b m e e0) (B754_zero b0) *)
  simpl in H1. pose proof (bpow_gt_0 radix2 e).
(* Goal: @eq binary_float (B754_finite b m e e0) (B754_zero b0) *)
  rewrite H1 in H3. apply Rlt_irrefl in H3. destruct H3.
Qed.

Definition is_nan f :=
  match f with
  | B754_nan _ _ => true
  | _ => false
  end.

Definition is_nan_FF f :=
  match f with
  | F754_nan _ _ => true
  | _ => false
  end.

Theorem is_nan_FF2B :
  forall x Hx,
  is_nan (FF2B x Hx) = is_nan_FF x.
Proof.
(* Goal: forall (x : full_float) (Hx : @eq bool (valid_binary x) true), @eq bool (is_nan (FF2B x Hx)) (is_nan_FF x) *)
now intros [| | |].
Qed.

Theorem is_nan_FF_B2FF :
  forall x,
  is_nan_FF (B2FF x) = is_nan x.
Proof.
(* Goal: forall x : binary_float, @eq bool (is_nan_FF (B2FF x)) (is_nan x) *)
now intros [| |? []|].
Qed.

(** Opposite *)

Definition Bopp opp_nan x :=
  match x with
  | B754_nan sx plx =>
    let '(sres, plres) := opp_nan sx plx in B754_nan sres plres
  | B754_infinity sx => B754_infinity (negb sx)
  | B754_finite sx mx ex Hx => B754_finite (negb sx) mx ex Hx
  | B754_zero sx => B754_zero (negb sx)
  end.

Theorem Bopp_involutive :
  forall opp_nan x,
  is_nan x = false ->
  Bopp opp_nan (Bopp opp_nan x) = x.
Proof.
(* Goal: forall (opp_nan : forall (_ : bool) (_ : nan_pl), prod bool nan_pl) (x : binary_float) (_ : @eq bool (is_nan x) false), @eq binary_float (Bopp opp_nan (Bopp opp_nan x)) x *)
now intros opp_nan [sx|sx|sx plx|sx mx ex Hx] ; simpl ; try rewrite Bool.negb_involutive.
Qed.

Theorem B2R_Bopp :
  forall opp_nan x,
  B2R (Bopp opp_nan x) = (- B2R x)%R.
Proof.
(* Goal: forall (opp_nan : forall (_ : bool) (_ : nan_pl), prod bool nan_pl) (x : binary_float), @eq R (B2R (Bopp opp_nan x)) (Ropp (B2R x)) *)
intros opp_nan [sx|sx|sx plx|sx mx ex Hx]; apply sym_eq ; try apply Ropp_0.
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
simpl. destruct opp_nan. apply Ropp_0.
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
simpl.
rewrite <- F2R_opp.
(* Goal: @eq R (@F2R radix2 (Fopp radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex))) (@F2R radix2 (Float radix2 (cond_Zopp (negb sx) (Zpos mx)) ex)) *)
now case sx.
Qed.

Theorem is_finite_Bopp :
  forall opp_nan x,
  is_finite (Bopp opp_nan x) = is_finite x.
Proof.
(* Goal: forall (opp_nan : forall (_ : bool) (_ : nan_pl), prod bool nan_pl) (x : binary_float), @eq bool (is_finite (Bopp opp_nan x)) (is_finite x) *)
intros opp_nan [| |s pl|] ; try easy.
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
simpl.
(* Goal: @eq bool (is_finite (let 'pair sres plres := opp_nan s pl in B754_nan sres plres)) false *)
now case opp_nan.
Qed.

(** Absolute value *)

Definition Babs abs_nan (x : binary_float) : binary_float :=
  match x with
  | B754_nan sx plx =>
      let '(sres, plres) := abs_nan sx plx in B754_nan sres plres
  | B754_infinity sx => B754_infinity false
  | B754_finite sx mx ex Hx => B754_finite false mx ex Hx
  | B754_zero sx => B754_zero false
  end.

Theorem B2R_Babs :
  forall abs_nan x,
  B2R (Babs abs_nan x) = Rabs (B2R x).
Proof.
(* Goal: forall (abs_nan : forall (_ : bool) (_ : nan_pl), prod bool nan_pl) (x : binary_float), @eq R (B2R (Babs abs_nan x)) (Rabs (B2R x)) *)
  intros abs_nan [sx|sx|sx plx|sx mx ex Hx]; apply sym_eq ; try apply Rabs_R0.
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
  simpl. destruct abs_nan. simpl. apply Rabs_R0.
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
  simpl. rewrite <- F2R_abs. now destruct sx.
Qed.

Theorem is_finite_Babs :
  forall abs_nan x,
  is_finite (Babs abs_nan x) = is_finite x.
Proof.
(* Goal: forall (abs_nan : forall (_ : bool) (_ : nan_pl), prod bool nan_pl) (x : binary_float), @eq bool (is_finite (Babs abs_nan x)) (is_finite x) *)
  intros abs_nan [| |s pl|] ; try easy.
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
  simpl.
(* Goal: @eq bool (is_finite (let 'pair sres plres := abs_nan s pl in B754_nan sres plres)) false *)
  now case abs_nan.
Qed.

Theorem Bsign_Babs :
  forall abs_nan x,
  is_nan x = false ->
  Bsign (Babs abs_nan x) = false.
Proof.
(* Goal: forall (abs_nan : forall (_ : bool) (_ : nan_pl), prod bool nan_pl) (x : binary_float) (_ : @eq bool (is_nan x) false), @eq bool (Bsign (Babs abs_nan x)) false *)
  now intros abs_nan [| | |].
Qed.

Theorem Babs_idempotent :
  forall abs_nan (x: binary_float),
  is_nan x = false ->
  Babs abs_nan (Babs abs_nan x) = Babs abs_nan x.
Proof.
(* Goal: forall (abs_nan : forall (_ : bool) (_ : nan_pl), prod bool nan_pl) (x : binary_float) (_ : @eq bool (is_nan x) false), @eq binary_float (Babs abs_nan (Babs abs_nan x)) (Babs abs_nan x) *)
  now intros abs_nan [sx|sx|sx plx|sx mx ex Hx].
Qed.

Theorem Babs_Bopp :
  forall abs_nan opp_nan x,
  is_nan x = false ->
  Babs abs_nan (Bopp opp_nan x) = Babs abs_nan x.
Proof.
(* Goal: forall (abs_nan opp_nan : forall (_ : bool) (_ : nan_pl), prod bool nan_pl) (x : binary_float) (_ : @eq bool (is_nan x) false), @eq binary_float (Babs abs_nan (Bopp opp_nan x)) (Babs abs_nan x) *)
  now intros abs_nan opp_nan [| | |].
Qed.

(** Comparison

[Some c] means ordered as per [c]; [None] means unordered. *)

Definition Bcompare (f1 f2 : binary_float) : option comparison :=
  match f1, f2 with
  | B754_nan _ _,_ | _,B754_nan _ _ => None
  | B754_infinity true, B754_infinity true
  | B754_infinity false, B754_infinity false => Some Eq
  | B754_infinity true, _ => Some Lt
  | B754_infinity false, _ => Some Gt
  | _, B754_infinity true => Some Gt
  | _, B754_infinity false => Some Lt
  | B754_finite true _ _ _, B754_zero _ => Some Lt
  | B754_finite false _ _ _, B754_zero _ => Some Gt
  | B754_zero _, B754_finite true _ _ _ => Some Gt
  | B754_zero _, B754_finite false _ _ _ => Some Lt
  | B754_zero _, B754_zero _ => Some Eq
  | B754_finite s1 m1 e1 _, B754_finite s2 m2 e2 _ =>
    match s1, s2 with
    | true, false => Some Lt
    | false, true => Some Gt
    | false, false =>
      match Zcompare e1 e2 with
      | Lt => Some Lt
      | Gt => Some Gt
      | Eq => Some (Pcompare m1 m2 Eq)
      end
    | true, true =>
      match Zcompare e1 e2 with
      | Lt => Some Gt
      | Gt => Some Lt
      | Eq => Some (CompOpp (Pcompare m1 m2 Eq))
      end
    end
  end.

Theorem Bcompare_correct :
  forall f1 f2,
  is_finite f1 = true -> is_finite f2 = true ->
  Bcompare f1 f2 = Some (Rcompare (B2R f1) (B2R f2)).
Proof.
  Ltac apply_Rcompare :=
    match goal with
      | [ |- Some Lt = Some (Rcompare _ _) ] => f_equal; symmetry; apply Rcompare_Lt
      | [ |- Some Eq = Some (Rcompare _ _) ] => f_equal; symmetry; apply Rcompare_Eq
      | [ |- Some Gt = Some (Rcompare _ _) ] => f_equal; symmetry; apply Rcompare_Gt
    end.
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub ex' ex) (Zneg p)), @eq Z ex' ex' *)
  unfold Bcompare; intros.
(* Goal: @eq (option comparison) match f1 with | B754_zero b => match f2 with | B754_zero b0 => @Some comparison Eq | B754_infinity (true as b0) => @Some comparison Gt | B754_infinity (false as b0) => @Some comparison Lt | B754_nan b0 n => @None comparison | B754_finite (true as b0) m e e0 => @Some comparison Gt | B754_finite (false as b0) m e e0 => @Some comparison Lt end | B754_infinity (true as b) => match f2 with | B754_zero b0 => @Some comparison Lt | B754_infinity (true as b0) => @Some comparison Eq | B754_infinity (false as b0) => @Some comparison Lt | B754_nan b0 n => @None comparison | B754_finite b0 m e e0 => @Some comparison Lt end | B754_infinity (false as b) => match f2 with | B754_zero b0 => @Some comparison Gt | B754_infinity (true as b0) => @Some comparison Gt | B754_infinity (false as b0) => @Some comparison Eq | B754_nan b0 n => @None comparison | B754_finite b0 m e e0 => @Some comparison Gt end | B754_nan b n => @None comparison | B754_finite (true as s1) m1 e1 e => match f2 with | B754_zero b => @Some comparison Lt | B754_infinity (true as b) => @Some comparison Gt | B754_infinity (false as b) => @Some comparison Lt | B754_nan b n => @None comparison | B754_finite s2 m2 e2 e0 => if s1 then if s2 then match Z.compare e1 e2 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m1 m2)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if s2 then @Some comparison Gt else match Z.compare e1 e2 with | Eq => @Some comparison (Pos.compare_cont Eq m1 m2) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end end | B754_finite (false as s1) m1 e1 e => match f2 with | B754_zero b => @Some comparison Gt | B754_infinity (true as b) => @Some comparison Gt | B754_infinity (false as b) => @Some comparison Lt | B754_nan b n => @None comparison | B754_finite s2 m2 e2 e0 => if s1 then if s2 then match Z.compare e1 e2 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m1 m2)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if s2 then @Some comparison Gt else match Z.compare e1 e2 with | Eq => @Some comparison (Pos.compare_cont Eq m1 m2) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end end end (@Some comparison (Rcompare (B2R f1) (B2R f2))) *)
  destruct f1, f2 ; try easy.
(* Goal: @eq (option comparison) (@Some comparison Eq) (@Some comparison (Rcompare (B2R (B754_zero b)) (B2R (B754_zero b0)))) *)
(* Goal: @eq (option comparison) (if b0 then @Some comparison Gt else @Some comparison Lt) (@Some comparison (Rcompare (B2R (B754_zero b)) (B2R (B754_finite b0 m e e0)))) *)
(* Goal: @eq (option comparison) (if b then @Some comparison Lt else @Some comparison Gt) (@Some comparison (Rcompare (B2R (B754_finite b m e e0)) (B2R (B754_zero b0)))) *)
(* Goal: @eq (option comparison) (if b then if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end else if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end) (@Some comparison (Rcompare (B2R (B754_finite b m e e0)) (B2R (B754_finite b0 m0 e1 e2)))) *)
  now rewrite Rcompare_Eq.
(* Goal: @eq (option comparison) (if b0 then @Some comparison Gt else @Some comparison Lt) (@Some comparison (Rcompare (B2R (B754_zero b)) (B2R (B754_finite b0 m e e0)))) *)
(* Goal: @eq (option comparison) (if b then @Some comparison Lt else @Some comparison Gt) (@Some comparison (Rcompare (B2R (B754_finite b m e e0)) (B2R (B754_zero b0)))) *)
(* Goal: @eq (option comparison) (if b then if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end else if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end) (@Some comparison (Rcompare (B2R (B754_finite b m e e0)) (B2R (B754_finite b0 m0 e1 e2)))) *)
  destruct b0 ; apply_Rcompare.
(* Goal: Rlt (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
  now apply F2R_lt_0_compat.
(* Goal: Rlt (IZR Z0) (@F2R radix2 (Float radix2 (Zpos my) ey)) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
  now apply F2R_gt_0_compat.
(* Goal: @eq (option comparison) (if b then @Some comparison Lt else @Some comparison Gt) (@Some comparison (Rcompare (B2R (B754_finite b m e e0)) (B2R (B754_zero b0)))) *)
(* Goal: @eq (option comparison) (if b then if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end else if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end) (@Some comparison (Rcompare (B2R (B754_finite b m e e0)) (B2R (B754_finite b0 m0 e1 e2)))) *)
  destruct b ; apply_Rcompare.
(* Goal: Rlt (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
  now apply F2R_lt_0_compat.
(* Goal: Rlt (IZR Z0) (@F2R radix2 (Float radix2 (Zpos my) ey)) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
  now apply F2R_gt_0_compat.
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
  simpl.
(* Goal: @eq (option comparison) (if b then if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end else if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end) (@Some comparison (Rcompare (@F2R radix2 (Float radix2 (cond_Zopp b (Zpos m)) e)) (@F2R radix2 (Float radix2 (cond_Zopp b0 (Zpos m0)) e1)))) *)
  clear H H0.
(* Goal: @eq (option comparison) (if b then if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end else if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end) (@Some comparison (Rcompare (@F2R radix2 (Float radix2 (cond_Zopp b (Zpos m)) e)) (@F2R radix2 (Float radix2 (cond_Zopp b0 (Zpos m0)) e1)))) *)
  apply andb_prop in e0; destruct e0; apply (canonic_canonic_mantissa false) in H.
(* Goal: @eq (option comparison) (if b then if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end else if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end) (@Some comparison (Rcompare (@F2R radix2 (Float radix2 (cond_Zopp b (Zpos m)) e)) (@F2R radix2 (Float radix2 (cond_Zopp b0 (Zpos m0)) e1)))) *)
  apply andb_prop in e2; destruct e2; apply (canonic_canonic_mantissa false) in H1.
(* Goal: @eq (option comparison) (if b then if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end else if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end) (@Some comparison (Rcompare (@F2R radix2 (Float radix2 (cond_Zopp b (Zpos m)) e)) (@F2R radix2 (Float radix2 (cond_Zopp b0 (Zpos m0)) e1)))) *)
  pose proof (Zcompare_spec e e1); unfold canonic, Fexp in H1, H.
  assert (forall m1 m2 e1 e2,
    let x := (Z2R (Zpos m1) * bpow radix2 e1)%R in
    let y := (Z2R (Zpos m2) * bpow radix2 e2)%R in
    (canonic_exp radix2 fexp x < canonic_exp radix2 fexp y)%Z -> (x < y)%R).
(* Goal: forall (m1 m2 : positive) (e1 e2 : Z), Rlt (Rmult (Z2R (Z.opp (Zpos m1))) (bpow radix2 e1)) (Rmult (Z2R (Zpos m2)) (bpow radix2 e2)) *)
(* Goal: @eq (option comparison) (if b then if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end else if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end) (@Some comparison (Rcompare (@F2R radix2 (Float radix2 (cond_Zopp b (Zpos m)) e)) (@F2R radix2 (Float radix2 (cond_Zopp b0 (Zpos m0)) e1)))) *)
  {
(* Goal: forall (m1 m2 : positive) (e1 e2 : Z), let x := Rmult (Z2R (Zpos m1)) (bpow radix2 e1) in let y := Rmult (Z2R (Zpos m2)) (bpow radix2 e2) in forall _ : Z.lt (canonic_exp radix2 fexp x) (canonic_exp radix2 fexp y), Rlt x y *)
  intros; apply Rnot_le_lt; intro; apply (ln_beta_le radix2) in H5.
(* Goal: False *)
(* Goal: Rlt (IZR Z0) y *)
  apply Zlt_not_le with (1 := H4).
(* Goal: Z.le (canonic_exp radix2 fexp y) (canonic_exp radix2 fexp x) *)
(* Goal: Rlt (IZR Z0) y *)
  now apply fexp_monotone.
(* Goal: Rlt (IZR Z0) (Rmult (Z2R (Zpos m2)) (bpow radix2 e2)) *)
  now apply (F2R_gt_0_compat _ (Float radix2 (Zpos m2) e2)).
  }
  assert (forall m1 m2 e1 e2, (Z2R (- Zpos m1) * bpow radix2 e1 < Z2R (Zpos m2) * bpow radix2 e2)%R).
(* Goal: forall (m1 m2 : positive) (e1 e2 : Z), Rlt (Rmult (Z2R (Z.opp (Zpos m1))) (bpow radix2 e1)) (Rmult (Z2R (Zpos m2)) (bpow radix2 e2)) *)
(* Goal: @eq (option comparison) (if b then if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end else if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end) (@Some comparison (Rcompare (@F2R radix2 (Float radix2 (cond_Zopp b (Zpos m)) e)) (@F2R radix2 (Float radix2 (cond_Zopp b0 (Zpos m0)) e1)))) *)
  {
(* Goal: forall (m1 m2 : positive) (e1 e2 : Z), Rlt (Rmult (Z2R (Z.opp (Zpos m1))) (bpow radix2 e1)) (Rmult (Z2R (Zpos m2)) (bpow radix2 e2)) *)
  intros; apply (Rlt_trans _ 0%R).
(* Goal: Rlt (Rmult (Z2R (Z.opp (Zpos m1))) (bpow radix2 e0)) (IZR Z0) *)
(* Goal: Rlt (IZR Z0) (Rmult (Z2R (Zpos m2)) (bpow radix2 e2)) *)
  now apply (F2R_lt_0_compat _ (Float radix2 (Zneg m1) e0)).
(* Goal: Rlt (IZR Z0) (Rmult (Z2R (Zpos m2)) (bpow radix2 e2)) *)
  now apply (F2R_gt_0_compat _ (Float radix2 (Zpos m2) e2)).
  }
(* Goal: @eq (option comparison) (if b then if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end else if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end) (@Some comparison (Rcompare (@F2R radix2 (Float radix2 (cond_Zopp b (Zpos m)) e)) (@F2R radix2 (Float radix2 (cond_Zopp b0 (Zpos m0)) e1)))) *)
  unfold F2R, Fnum, Fexp.
  destruct b, b0; try (now apply_Rcompare; apply H5); inversion H3;
    try (apply_Rcompare; apply H4; rewrite H, H1 in H7; assumption);
    try (apply_Rcompare; do 2 rewrite Z2R_opp, Ropp_mult_distr_l_reverse;
      apply Ropp_lt_contravar; apply H4; rewrite H, H1 in H7; assumption);
    rewrite H7, Rcompare_mult_r, Rcompare_Z2R by (apply bpow_gt_0); reflexivity.
Qed.

Theorem Bcompare_swap :
  forall x y,
  Bcompare y x = match Bcompare x y with Some c => Some (CompOpp c) | None => None end.
Proof.
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub ex' ex) (Zneg p)), @eq Z ex' ex' *)
  intros.
  destruct x as [ ? | [] | ? ? | [] mx ex Bx ];
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
  destruct y as [ ? | [] | ? ? | [] my ey By ]; simpl; try easy.
- rewrite <- (Zcompare_antisym ex ey). destruct (ex ?= ey)%Z; try easy.
(* Goal: @eq (option comparison) match CompOpp Eq with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq my mx)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end (@Some comparison (CompOpp (CompOpp (Pos.compare_cont Eq mx my)))) *)
  now rewrite (Pcompare_antisym mx my).
- rewrite <- (Zcompare_antisym ex ey). destruct (ex ?= ey)%Z; try easy.
(* Goal: @eq (option comparison) match CompOpp Eq with | Eq => @Some comparison (Pos.compare_cont Eq my mx) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end (@Some comparison (CompOpp (Pos.compare_cont Eq mx my))) *)
  now rewrite Pcompare_antisym.
Qed.

Theorem bounded_lt_emax :
  forall mx ex,
  bounded mx ex = true ->
  (F2R (Float radix2 (Zpos mx) ex) < bpow radix2 emax)%R.
Proof.
intros mx ex Hx.
destruct (andb_prop _ _ Hx) as (H1,H2).
generalize (Zeq_bool_eq _ _ H1). clear H1. intro H1.
generalize (Zle_bool_imp_le _ _ H2). clear H2. intro H2.
generalize (ln_beta_F2R_Zdigits radix2 (Zpos mx) ex).
destruct (ln_beta radix2 (F2R (Float radix2 (Zpos mx) ex))) as (e',Ex).
unfold ln_beta_val.
(* Goal: forall r : Rge (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0), @eq R (round radix2 fexp (round_mode m) (Rsqrt (mknonnegreal (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (Rge_le (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) r)))) (B2R (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
intros H.
apply Rlt_le_trans with (bpow radix2 e').
change (Zpos mx) with (Zabs (Zpos mx)).
rewrite F2R_Zabs.
apply Ex.
(* Goal: not (@eq R (@F2R radix2 (Float radix2 (Zpos my) ey)) (IZR Z0)) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb sx false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rgt_not_eq.
(* Goal: Rlt (IZR Z0) (@F2R radix2 (Float radix2 (Zpos my) ey)) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_gt_0_compat.
apply bpow_le.
rewrite H. 2: discriminate.
revert H1. clear -H2.
(* Goal: @eq Z (Z.add (Zdigits radix2 (Z.abs (cond_Zopp sx (Zpos mx)))) ex) (Z.add (Zpos (digits2_pos mx)) ex) *)
(* Goal: not (@eq Z (cond_Zopp sx (Zpos mx)) Z0) *)
rewrite Zpos_digits2_pos.
(* Goal: forall (z : Z) (_ : Z.le prec z), Z.le ez (fexp (Z.add z ez)) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
unfold fexp, FLT_exp.
generalize (Zdigits radix2 (Zpos mx)).
clearbody emin.
intros ; zify ; omega.
Qed.

Theorem abs_B2R_lt_emax :
  forall x,
  (Rabs (B2R x) < bpow radix2 emax)%R.
Proof.
(* Goal: forall x : binary_float, Rlt (Rabs (B2R x)) (bpow radix2 emax) *)
intros [sx|sx|sx plx|sx mx ex Hx] ; simpl ; try ( rewrite Rabs_R0 ; apply bpow_gt_0 ).
rewrite <- F2R_Zabs, abs_cond_Zopp.
(* Goal: Rlt (@F2R radix2 (Float radix2 (Z.abs (Zpos mx)) ex)) (bpow radix2 emax) *)
now apply bounded_lt_emax.
Qed.

Theorem bounded_canonic_lt_emax :
  forall mx ex,
  canonic radix2 fexp (Float radix2 (Zpos mx) ex) ->
  (F2R (Float radix2 (Zpos mx) ex) < bpow radix2 emax)%R ->
  bounded mx ex = true.
Proof.
intros mx ex Cx Bx.
apply andb_true_intro.
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
split.
unfold canonic_mantissa.
unfold canonic, Fexp in Cx.
rewrite Cx at 2.
(* Goal: @eq Z (Z.add (Zdigits radix2 (Z.abs (cond_Zopp sx (Zpos mx)))) ex) (Z.add (Zpos (digits2_pos mx)) ex) *)
(* Goal: not (@eq Z (cond_Zopp sx (Zpos mx)) Z0) *)
rewrite Zpos_digits2_pos.
unfold canonic_exp.
(* Goal: @eq Z (ln_beta_val radix2 (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (ln_beta radix2 (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)))) (Z.add (Zpos (digits2_pos mx)) ex) *)
rewrite ln_beta_F2R_Zdigits. 2: discriminate.
now apply -> Zeq_is_eq_bool.
apply Zle_bool_true.
unfold canonic, Fexp in Cx.
rewrite Cx.
unfold canonic_exp, fexp, FLT_exp.
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
destruct (ln_beta radix2 (F2R (Float radix2 (Zpos mx) ex))) as (e',Ex). simpl.
apply Zmax_lub.
cut (e' - 1 < emax)%Z. clear ; omega.
apply lt_bpow with radix2.
apply Rle_lt_trans with (2 := Bx).
change (Zpos mx) with (Zabs (Zpos mx)).
rewrite F2R_Zabs.
apply Ex.
(* Goal: not (@eq R (@F2R radix2 (Float radix2 (Zpos my) ey)) (IZR Z0)) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb sx false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rgt_not_eq.
(* Goal: Rlt (IZR Z0) (@F2R radix2 (Float radix2 (Zpos my) ey)) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_gt_0_compat.
(* Goal: forall (z z0 z1 : Z) (_ : Z.lt Z0 z) (_ : Z.lt Z0 z0) (_ : Z.le (Z.sub (Z.add z z0) (Zpos xH)) z1) (_ : @eq Z (Z.max (Z.sub (Z.add z ex) prec) emin) ex) (_ : @eq Z (Z.max (Z.sub (Z.add z0 ey) prec) emin) ey), Z.le (Z.add ex ey) (Z.max (Z.sub (Z.add z1 (Z.add ex ey)) prec) emin) *)
(* Goal: @eq bool (Rlt_bool (@F2R radix2 (Float radix2 (Z.mul (cond_Zopp sx (Zpos mx)) (cond_Zopp sy (Zpos my))) (Z.add ex ey))) (IZR Z0)) (xorb sx sy) *)
unfold emin.
generalize (prec_gt_0 prec).
clear -Hmax ; omega.
Qed.

(** Truncation *)

(* Goal: forall (m1 m2 : positive) (e1 e2 : Z), Rlt (Rmult (Z2R (Z.opp (Zpos m1))) (bpow radix2 e1)) (Rmult (Z2R (Zpos m2)) (bpow radix2 e2)) *)
(* Goal: @eq (option comparison) (if b then if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end else if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end) (@Some comparison (Rcompare (@F2R radix2 (Float radix2 (cond_Zopp b (Zpos m)) e)) (@F2R radix2 (Float radix2 (cond_Zopp b0 (Zpos m0)) e1)))) *)
Record shr_record := { shr_m : Z ; shr_r : bool ; shr_s : bool }.

Definition shr_1 mrs :=
  let '(Build_shr_record m r s) := mrs in
  let s := orb r s in
  match m with
  | Z0 => Build_shr_record Z0 false s
  | Zpos xH => Build_shr_record Z0 true s
  | Zpos (xO p) => Build_shr_record (Zpos p) false s
  | Zpos (xI p) => Build_shr_record (Zpos p) true s
  | Zneg xH => Build_shr_record Z0 true s
  | Zneg (xO p) => Build_shr_record (Zneg p) false s
  | Zneg (xI p) => Build_shr_record (Zneg p) true s
  end.

Definition loc_of_shr_record mrs :=
  match mrs with
  | Build_shr_record _ false false => loc_Exact
  | Build_shr_record _ false true => loc_Inexact Lt
  | Build_shr_record _ true false => loc_Inexact Eq
  | Build_shr_record _ true true => loc_Inexact Gt
  end.

Definition shr_record_of_loc m l :=
  match l with
  | loc_Exact => Build_shr_record m false false
  | loc_Inexact Lt => Build_shr_record m false true
  | loc_Inexact Eq => Build_shr_record m true false
  | loc_Inexact Gt => Build_shr_record m true true
  end.

Theorem shr_m_shr_record_of_loc :
  forall m l,
  shr_m (shr_record_of_loc m l) = m.
Proof.
(* Goal: forall (m : Z) (l : location), @eq location (loc_of_shr_record (shr_record_of_loc m l)) l *)
now intros m [|[| |]].
Qed.

Theorem loc_of_shr_record_of_loc :
  forall m l,
  loc_of_shr_record (shr_record_of_loc m l) = l.
Proof.
(* Goal: forall (m : Z) (l : location), @eq location (loc_of_shr_record (shr_record_of_loc m l)) l *)
now intros m [|[| |]].
Qed.

Definition shr mrs e n :=
  match n with
  | Zpos p => (iter_pos shr_1 p mrs, (e + n)%Z)
  | _ => (mrs, e)
  end.

Lemma inbetween_shr_1 :
  forall x mrs e,
  (0 <= shr_m mrs)%Z ->
  inbetween_float radix2 (shr_m mrs) e x (loc_of_shr_record mrs) ->
  inbetween_float radix2 (shr_m (shr_1 mrs)) (e + 1) x (loc_of_shr_record (shr_1 mrs)).
Proof.
intros x mrs e Hm Hl.
refine (_ (new_location_even_correct (F2R (Float radix2 (shr_m (shr_1 mrs)) (e + 1))) (bpow radix2 e) 2 _ _ _ x (if shr_r (shr_1 mrs) then 1 else 0) (loc_of_shr_record mrs) _ _)) ; try easy.
2: apply bpow_gt_0.
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
2: now case (shr_r (shr_1 mrs)) ; split.
change (Z2R 2) with (bpow radix2 1).
rewrite <- bpow_plus.
rewrite (Zplus_comm 1), <- (F2R_bpow radix2 (e + 1)).
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
unfold inbetween_float, F2R. simpl.
rewrite Z2R_plus, Rmult_plus_distr_r.
replace (new_location_even 2 (if shr_r (shr_1 mrs) then 1%Z else 0%Z) (loc_of_shr_record mrs)) with (loc_of_shr_record (shr_1 mrs)).
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
easy.
clear -Hm.
destruct mrs as (m, r, s).
now destruct m as [|[m|m|]|m] ; try (now elim Hm) ; destruct r as [|] ; destruct s as [|].
rewrite (F2R_change_exp radix2 e).
2: apply Zle_succ.
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
unfold F2R. simpl.
rewrite <- 2!Rmult_plus_distr_r, <- 2!Z2R_plus.
rewrite Zplus_assoc.
replace (shr_m (shr_1 mrs) * 2 ^ (e + 1 - e) + (if shr_r (shr_1 mrs) then 1%Z else 0%Z))%Z with (shr_m mrs).
exact Hl.
ring_simplify (e + 1 - e)%Z.
change (2^1)%Z with 2%Z.
rewrite Zmult_comm.
clear -Hm.
destruct mrs as (m, r, s).
now destruct m as [|[m|m|]|m] ; try (now elim Hm) ; destruct r as [|] ; destruct s as [|].
Qed.

Theorem inbetween_shr :
  forall x m e l n,
  (0 <= m)%Z ->
  inbetween_float radix2 m e x l ->
  let '(mrs, e') := shr (shr_record_of_loc m l) e n in
  inbetween_float radix2 (shr_m mrs) e' x (loc_of_shr_record mrs).
Proof.
intros x m e l n Hm Hl.
destruct n as [|n|n].
now destruct l as [|[| |]].
2: now destruct l as [|[| |]].
unfold shr.
rewrite iter_pos_nat.
rewrite Zpos_eq_Z_of_nat_o_nat_of_P.
induction (nat_of_P n).
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
simpl.
rewrite Zplus_0_r.
now destruct l as [|[| |]].
rewrite iter_nat_S.
rewrite inj_S.
unfold Zsucc.
rewrite Zplus_assoc.
revert IHn0.
apply inbetween_shr_1.
clear -Hm.
induction n0.
now destruct l as [|[| |]].
rewrite iter_nat_S.
revert IHn0.
generalize (iter_nat shr_1 n0 (shr_record_of_loc m l)).
(* Goal: forall (z : Z) (_ : Z.le prec z), Z.le ez (Z.max (Z.sub (Z.add z ez) prec) emin) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
clear.
intros (m, r, s) Hm.
now destruct m as [|[m|m|]|m] ; try (now elim Hm) ; destruct r as [|] ; destruct s as [|].
Qed.

Definition shr_fexp m e l :=
  shr (shr_record_of_loc m l) e (fexp (Zdigits2 m + e) - e).

Theorem shr_truncate :
  forall m e l,
  (0 <= m)%Z ->
  shr_fexp m e l =
  let '(m', e', l') := truncate radix2 fexp (m, e, l) in (shr_record_of_loc m' l', e').
Proof.
(* Goal: forall (m e : Z) (l : location) (_ : Z.le Z0 m), @eq (prod shr_record Z) (shr_fexp m e l) (let 'pair (pair m' e' as p) l' := truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l) in @pair shr_record Z (shr_record_of_loc m' l') e') *)
intros m e l Hm.
(* Goal: @eq (prod shr_record Z) (shr_fexp m e l) (let 'pair (pair m' e' as p) l' := truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l) in @pair shr_record Z (shr_record_of_loc m' l') e') *)
case_eq (truncate radix2 fexp (m, e, l)).
(* Goal: forall (p : prod Z Z) (l0 : location) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location p l0)), @eq (prod shr_record Z) (shr_fexp m e l) (let 'pair m' e' := p in @pair shr_record Z (shr_record_of_loc m' l0) e') *)
intros (m', e') l'.
(* Goal: forall _ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l'), @eq (prod shr_record Z) (shr_fexp m e l) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
unfold shr_fexp.
(* Goal: forall _ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l'), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Z.sub (fexp (Z.add (Zdigits2 m) e)) e)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
rewrite Zdigits2_Zdigits.
case_eq (fexp (Zdigits radix2 m + e) - e)%Z.
(* *)
(* Goal: forall (_ : @eq Z (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) Z0) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e Z0) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) (Zpos p)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zpos p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) (Zneg p)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
intros He.
(* Goal: forall _ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l'), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
unfold truncate.
(* Goal: forall _ : @eq (prod (prod Z Z) location) (if Z.ltb Z0 (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) then truncate_aux radix2 (@pair (prod Z Z) location (@pair Z Z m e) l) (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) else @pair (prod Z Z) location (@pair Z Z m e) l) (@pair (prod Z Z) location (@pair Z Z m' e') l'), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e Z0) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) (Zpos p)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zpos p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) (Zneg p)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
rewrite He.
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
simpl.
(* Goal: forall r : Rge (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0), @eq R (round radix2 fexp (round_mode m) (Rsqrt (mknonnegreal (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (Rge_le (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) r)))) (B2R (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
intros H.
(* Goal: @eq (prod shr_record Z) (@pair shr_record Z (shr_record_of_loc m l) e) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
now inversion H.
(* *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) (Zneg p)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
intros p Hp.
(* Goal: forall _ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l'), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zpos p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) (Zneg p)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
assert (He: (e <= fexp (Zdigits radix2 m + e))%Z).
clear -Hp ; zify ; omega.
(* Goal: forall _ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l'), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zpos p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) (Zneg p)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
destruct (inbetween_float_ex radix2 m e l) as (x, Hx).
generalize (inbetween_shr x m e l (fexp (Zdigits radix2 m + e) - e) Hm Hx).
(* Goal: forall (_ : let 'pair mrs e' := shr (shr_record_of_loc m l) e (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) in inbetween_float radix2 (shr_m mrs) e' x (loc_of_shr_record mrs)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zpos p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) (Zneg p)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
assert (Hx0 : (0 <= x)%R).
(* Goal: Rle (IZR Z0) x *)
(* Goal: forall (_ : let 'pair mrs e' := shr (shr_record_of_loc m l) e (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) in inbetween_float radix2 (shr_m mrs) e' x (loc_of_shr_record mrs)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zpos p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) (Zneg p)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
apply Rle_trans with (F2R (Float radix2 m e)).
(* Goal: Rle (IZR Z0) (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) *)
(* Goal: Rle (IZR Z0) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_ge_0_compat.
(* Goal: Rle (@F2R radix2 (Float radix2 m e)) x *)
(* Goal: forall (_ : let 'pair mrs e' := shr (shr_record_of_loc m l) e (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) in inbetween_float radix2 (shr_m mrs) e' x (loc_of_shr_record mrs)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zpos p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) (Zneg p)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
exact (proj1 (inbetween_float_bounds _ _ _ _ _ Hx)).
case_eq (shr (shr_record_of_loc m l) e (fexp (Zdigits radix2 m + e) - e)).
(* Goal: forall (s : shr_record) (z : Z) (_ : @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e)) (@pair shr_record Z s z)) (_ : inbetween_float radix2 (shr_m s) z x (loc_of_shr_record s)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zpos p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) (Zneg p)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
intros mrs e'' H3 H4 H1.
(* Goal: @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zpos p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) (Zneg p)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
generalize (truncate_correct radix2 _ x m e l Hx0 Hx (or_introl _ He)).
(* Goal: forall _ : let 'pair (pair m' e' as p) l' := truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l) in and (inbetween_float radix2 m' e' x l') (or (@eq Z e' (canonic_exp radix2 fexp x)) (and (@eq location l' loc_Exact) (generic_format radix2 fexp x))), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zpos p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) (Zneg p)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
rewrite H1.
(* Goal: forall _ : and (inbetween_float radix2 m' e' x l') (or (@eq Z e' (canonic_exp radix2 fexp x)) (and (@eq location l' loc_Exact) (generic_format radix2 fexp x))), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zpos p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) (Zneg p)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
intros (H2,_).
rewrite <- Hp, H3.
(* Goal: @eq (prod shr_record Z) (@pair shr_record Z mrs e'') (@pair shr_record Z (shr_record_of_loc m' l') e') *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) (Zneg p)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
assert (e'' = e').
(* Goal: @eq Z e'' e' *)
(* Goal: @eq (prod shr_record Z) (@pair shr_record Z mrs e'') (@pair shr_record Z (shr_record_of_loc m' l') e') *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) (Zneg p)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
change (snd (mrs, e'') = snd (fst (m',e',l'))).
rewrite <- H1, <- H3.
(* Goal: forall _ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l'), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
unfold truncate.
(* Goal: @eq Z (@snd shr_record Z (shr (shr_record_of_loc m l) e (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e))) (@snd Z Z (@fst (prod Z Z) location (if Z.ltb Z0 (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) then truncate_aux radix2 (@pair (prod Z Z) location (@pair Z Z m e) l) (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) else @pair (prod Z Z) location (@pair Z Z m e) l))) *)
(* Goal: @eq (prod shr_record Z) (@pair shr_record Z mrs e'') (@pair shr_record Z (shr_record_of_loc m' l') e') *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) (Zneg p)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
now rewrite Hp.
rewrite H in H4 |- *.
(* Goal: @eq (prod shr_record Z) (@pair shr_record Z mrs e') (@pair shr_record Z (shr_record_of_loc m' l') e') *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) (Zneg p)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
apply (f_equal (fun v => (v, _))).
(* Goal: @eq shr_record mrs (shr_record_of_loc m' l') *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) (Zneg p)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
destruct (inbetween_float_unique _ _ _ _ _ _ _ H2 H4) as (H5, H6).
(* Goal: @eq shr_record mrs (shr_record_of_loc m' l') *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) (Zneg p)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
rewrite H5, H6.
(* Goal: @eq shr_record mrs (shr_record_of_loc (shr_m mrs) (loc_of_shr_record mrs)) *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) (Zneg p)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
case mrs.
(* Goal: forall (shr_m0 : Z) (shr_r shr_s : bool), @eq shr_record (Build_shr_record shr_m0 shr_r shr_s) (shr_record_of_loc (shr_m (Build_shr_record shr_m0 shr_r shr_s)) (loc_of_shr_record (Build_shr_record shr_m0 shr_r shr_s))) *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) (Zneg p)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
now intros m0 [|] [|].
(* *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) (Zneg p)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
intros p Hp.
(* Goal: forall _ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l'), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
unfold truncate.
(* Goal: forall _ : @eq (prod (prod Z Z) location) (if Z.ltb Z0 (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) then truncate_aux radix2 (@pair (prod Z Z) location (@pair Z Z m e) l) (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) else @pair (prod Z Z) location (@pair Z Z m e) l) (@pair (prod Z Z) location (@pair Z Z m' e') l'), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
rewrite Hp.
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
simpl.
(* Goal: forall r : Rge (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0), @eq R (round radix2 fexp (round_mode m) (Rsqrt (mknonnegreal (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (Rge_le (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) r)))) (B2R (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
intros H.
(* Goal: @eq (prod shr_record Z) (@pair shr_record Z (shr_record_of_loc m l) e) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
now inversion H.
Qed.

(** Rounding modes *)

Inductive mode := mode_NE | mode_ZR | mode_DN | mode_UP | mode_NA.

Definition round_mode m :=
  match m with
  | mode_NE => ZnearestE
  | mode_ZR => Ztrunc
  | mode_DN => Zfloor
  | mode_UP => Zceil
  | mode_NA => ZnearestA
  end.

Definition choice_mode m sx mx lx :=
  match m with
  | mode_NE => cond_incr (round_N (negb (Zeven mx)) lx) mx
  | mode_ZR => mx
  | mode_DN => cond_incr (round_sign_DN sx lx) mx
  | mode_UP => cond_incr (round_sign_UP sx lx) mx
  | mode_NA => cond_incr (round_N true lx) mx
  end.

Global Instance valid_rnd_round_mode : forall m, Valid_rnd (round_mode m).
Proof.
(* Goal: forall m : mode, Valid_rnd (round_mode m) *)
destruct m ; unfold round_mode ; auto with typeclass_instances.
Qed.

Definition overflow_to_inf m s :=
  match m with
  | mode_NE => true
  | mode_NA => true
  | mode_ZR => false
  | mode_UP => negb s
  | mode_DN => s
  end.

Definition binary_overflow m s :=
  if overflow_to_inf m s then F754_infinity s
  else F754_finite s (match (Zpower 2 prec - 1)%Z with Zpos p => p | _ => xH end) (emax - prec).

Definition binary_round_aux mode sx mx ex lx :=
  let '(mrs', e') := shr_fexp (Zpos mx) ex lx in
  let '(mrs'', e'') := shr_fexp (choice_mode mode sx (shr_m mrs') (loc_of_shr_record mrs')) e' loc_Exact in
  match shr_m mrs'' with
  | Z0 => F754_zero sx
  | Zpos m => if Zle_bool e'' (emax - prec) then F754_finite sx m e'' else binary_overflow mode sx
  | _ => F754_nan false xH (* dummy *)
  end.

Theorem binary_round_aux_correct :
  forall mode x mx ex lx,
  inbetween_float radix2 (Zpos mx) ex (Rabs x) lx ->
  (ex <= fexp (Zdigits radix2 (Zpos mx) + ex))%Z ->
  let z := binary_round_aux mode (Rlt_bool x 0) mx ex lx in
  valid_binary z = true /\
  if Rlt_bool (Rabs (round radix2 fexp (round_mode mode) x)) (bpow radix2 emax) then
    FF2R radix2 z = round radix2 fexp (round_mode mode) x /\
    is_finite_FF z = true /\ sign_FF z = Rlt_bool x 0
  else
    z = binary_overflow mode (Rlt_bool x 0).
Proof with auto with typeclass_instances.
intros m x mx ex lx Bx Ex z.
unfold binary_round_aux in z.
revert z.
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
rewrite shr_truncate. 2: easy.
refine (_ (round_trunc_sign_any_correct _ _ (round_mode m) (choice_mode m) _ x (Zpos mx) ex lx Bx (or_introl _ Ex))).
refine (_ (truncate_correct_partial _ _ _ _ _ _ _ Bx Ex)).
destruct (truncate radix2 fexp (Zpos mx, ex, lx)) as ((m1, e1), l1).
rewrite loc_of_shr_record_of_loc, shr_m_shr_record_of_loc.
set (m1' := choice_mode m (Rlt_bool x 0) m1 l1).
intros (H1a,H1b) H1c.
rewrite H1c.
assert (Hm: (m1 <= m1')%Z).
(* . *)
unfold m1', choice_mode, cond_incr.
case m ;
  try apply Zle_refl ;
  match goal with |- (m1 <= if ?b then _ else _)%Z =>
    case b ; [ apply Zle_succ | apply Zle_refl ] end.
assert (Hr: Rabs (round radix2 fexp (round_mode m) x) = F2R (Float radix2 m1' e1)).
(* . *)
rewrite <- (Zabs_eq m1').
replace (Zabs m1') with (Zabs (cond_Zopp (Rlt_bool x 0) m1')).
rewrite F2R_Zabs.
(* Goal: @eq binary_float (B754_finite sy my ey Hx) (B754_finite sy my ey Hy) *)
now apply f_equal.
apply abs_cond_Zopp.
apply Zle_trans with (2 := Hm).
apply Zlt_succ_le.
apply F2R_gt_0_reg with radix2 e1.
apply Rle_lt_trans with (1 := Rabs_pos x).
exact (proj2 (inbetween_float_bounds _ _ _ _ _ H1a)).
(* . *)
assert (Br: inbetween_float radix2 m1' e1 (Rabs (round radix2 fexp (round_mode m) x)) loc_Exact).
now apply inbetween_Exact.
destruct m1' as [|m1'|m1'].
(* . m1' = 0 *)
rewrite shr_truncate. 2: apply Zle_refl.
generalize (truncate_0 radix2 fexp e1 loc_Exact).
destruct (truncate radix2 fexp (Z0, e1, loc_Exact)) as ((m2, e2), l2).
rewrite shr_m_shr_record_of_loc.
intros Hm2.
rewrite Hm2.
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
repeat split.
rewrite Rlt_bool_true.
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
repeat split.
(* Goal: @eq R (B2R (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)))) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
apply sym_eq.
case Rlt_bool ; apply F2R_0.
rewrite <- F2R_Zabs, abs_cond_Zopp, F2R_0.
apply bpow_gt_0.
(* . 0 < m1' *)
assert (He: (e1 <= fexp (Zdigits radix2 (Zpos m1') + e1))%Z).
rewrite <- ln_beta_F2R_Zdigits, <- Hr, ln_beta_abs.
2: discriminate.
rewrite H1b.
rewrite canonic_exp_abs.
fold (canonic_exp radix2 fexp (round radix2 fexp (round_mode m) x)).
apply canonic_exp_round_ge...
rewrite H1c.
case (Rlt_bool x 0).
(* Goal: not (@eq R (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos my)) ey)) (IZR Z0)) *)
(* Goal: not (@eq R (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos my)) ey)) (IZR Z0)) *)
(* Goal: Z.le ez (fexp (Z.add (Zdigits radix2 (Zpos mz)) ez)) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rlt_not_eq.
(* Goal: Rlt (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
now apply F2R_lt_0_compat.
(* Goal: not (@eq R (@F2R radix2 (Float radix2 (Zpos my) ey)) (IZR Z0)) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb sx false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rgt_not_eq.
(* Goal: Rlt (IZR Z0) (@F2R radix2 (Float radix2 (Zpos my) ey)) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_gt_0_compat.
refine (_ (truncate_correct_partial _ _ _ _ _ _ _ Br He)).
2: now rewrite Hr ; apply F2R_gt_0_compat.
refine (_ (truncate_correct_format radix2 fexp (Zpos m1') e1 _ _ He)).
2: discriminate.
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
rewrite shr_truncate. 2: easy.
destruct (truncate radix2 fexp (Zpos m1', e1, loc_Exact)) as ((m2, e2), l2).
rewrite shr_m_shr_record_of_loc.
intros (H3,H4) (H2,_).
destruct m2 as [|m2|m2].
elim Rgt_not_eq with (2 := H3).
rewrite F2R_0.
(* Goal: Rlt (IZR Z0) (@F2R radix2 (Float radix2 (Zpos my) ey)) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_gt_0_compat.
rewrite F2R_cond_Zopp, H3, abs_cond_Ropp, <- F2R_abs.
simpl Zabs.
case_eq (Zle_bool e2 (emax - prec)) ; intros He2.
assert (bounded m2 e2 = true).
apply andb_true_intro.
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
split.
unfold canonic_mantissa.
apply Zeq_bool_true.
(* Goal: @eq Z (Z.add (Zdigits radix2 (Z.abs (cond_Zopp sx (Zpos mx)))) ex) (Z.add (Zpos (digits2_pos mx)) ex) *)
(* Goal: not (@eq Z (cond_Zopp sx (Zpos mx)) Z0) *)
rewrite Zpos_digits2_pos.
rewrite <- ln_beta_F2R_Zdigits.
(* Goal: @eq R (B2R (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)))) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
apply sym_eq.
now rewrite H3 in H4.
discriminate.
exact He2.
apply (conj H).
rewrite Rlt_bool_true.
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
repeat split.
apply F2R_cond_Zopp.
(* Goal: Rlt (@F2R radix2 (Float radix2 (Z.abs (Zpos mx)) ex)) (bpow radix2 emax) *)
now apply bounded_lt_emax.
rewrite (Rlt_bool_false _ (bpow radix2 emax)).
refine (conj _ (refl_equal _)).
unfold binary_overflow.
case overflow_to_inf.
(* Goal: @eq Z ex' ex' *)
apply refl_equal.
unfold valid_binary, bounded.
rewrite Zle_bool_refl.
rewrite Bool.andb_true_r.
apply Zeq_bool_true.
(* Goal: @eq Z (Z.add (Zdigits radix2 (Z.abs (cond_Zopp sx (Zpos mx)))) ex) (Z.add (Zpos (digits2_pos mx)) ex) *)
(* Goal: not (@eq Z (cond_Zopp sx (Zpos mx)) Z0) *)
rewrite Zpos_digits2_pos.
replace (Zdigits radix2 (Zpos (match (Zpower 2 prec - 1)%Z with Zpos p => p | _ => xH end))) with prec.
unfold fexp, FLT_exp, emin.
generalize (prec_gt_0 prec).
clear -Hmax ; zify ; omega.
(* Goal: @eq (prod (prod Z Z) location) (let (m, e') := match Z.sub (Z.add (Zdigits radix2 (Zpos my)) prec) (Zdigits radix2 (Zpos mx)) with | Z0 => @pair Z Z (Zpos mx) (Z.sub ex ey) | Zpos p => @pair Z Z (Z.mul (Zpos mx) (Z.pow_pos (radix_val radix2) p)) (Z.add (Z.sub ex ey) (Zneg p)) | Zneg p => @pair Z Z (Zpos mx) (Z.sub ex ey) end in let 'pair q r := Z.div_eucl m (Zpos my) in @pair (prod Z Z) location (@pair Z Z q e') (new_location (Zpos my) r loc_Exact)) (let (m, e') := match Z.sub (Z.add (Zdigits radix2 (Zpos my)) prec) (Zdigits radix2 (Zpos mx)) with | Z0 => @pair Z Z (Zpos mx) (Z.sub ex ey) | Zpos p => @pair Z Z (Z.shiftl (Zpos mx) (Zpos p)) (Z.add (Z.sub ex ey) (Zneg p)) | Zneg p => @pair Z Z (Zpos mx) (Z.sub ex ey) end in let 'pair q r := Zfast_div_eucl m (Zpos my) in @pair (prod Z Z) location (@pair Z Z q e') (new_location (Zpos my) r loc_Exact)) *)
change 2%Z with (radix_val radix2).
case_eq (Zpower radix2 prec - 1)%Z.
simpl Zdigits.
generalize (Zpower_gt_1 radix2 prec (prec_gt_0 prec)).
clear ; omega.
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) (Zneg p)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
intros p Hp.
apply Zle_antisym.
cut (prec - 1 < Zdigits radix2 (Zpos p))%Z. clear ; omega.
apply Zdigits_gt_Zpower.
simpl Zabs. rewrite <- Hp.
cut (Zpower radix2 (prec - 1) < Zpower radix2 prec)%Z. clear ; omega.
apply lt_Z2R.
rewrite 2!Z2R_Zpower. 2: now apply Zlt_le_weak.
apply bpow_lt.
apply Zlt_pred.
now apply Zlt_0_le_0_pred.
apply Zdigits_le_Zpower.
simpl Zabs. rewrite <- Hp.
apply Zlt_pred.
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) (Zneg p)) (_ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l')), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
intros p Hp.
generalize (Zpower_gt_1 radix2 _ (prec_gt_0 prec)).
clear -Hp ; zify ; omega.
apply Rnot_lt_le.
(* Goal: forall Hx : @eq bool (bounded my ey) true, @eq binary_float (B754_finite sy my ey Hx) (B754_finite sy my ey Hy) *)
intros Hx.
generalize (refl_equal (bounded m2 e2)).
unfold bounded at 2.
rewrite He2.
rewrite Bool.andb_false_r.
rewrite bounded_canonic_lt_emax with (2 := Hx).
discriminate.
unfold canonic.
now rewrite <- H3.
elim Rgt_not_eq with (2 := H3).
(* Goal: Rlt (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos my)) ey)) *)
(* Goal: forall _ : @eq R (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos my)) ey)), False *)
(* Goal: @eq binary_float (B754_finite sx mx ex Hx) (B754_finite sy my ey Hy) *)
apply Rlt_trans with R0.
(* Goal: Rlt (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
now apply F2R_lt_0_compat.
(* Goal: Rlt (IZR Z0) (@F2R radix2 (Float radix2 (Zpos my) ey)) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_gt_0_compat.
rewrite <- Hr.
apply generic_format_abs...
apply generic_format_round...
(* . not m1' < 0 *)
elim Rgt_not_eq with (2 := Hr).
apply Rlt_le_trans with R0.
(* Goal: Rlt (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
now apply F2R_lt_0_compat.
apply Rabs_pos.
(* *)
apply Rlt_le_trans with (2 := proj1 (inbetween_float_bounds _ _ _ _ _ Bx)).
(* Goal: Rlt (IZR Z0) (@F2R radix2 (Float radix2 (Zpos my) ey)) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_gt_0_compat.
(* all the modes are valid *)
(* Goal: forall (z : Z) (_ : Z.le prec z), Z.le ez (Z.max (Z.sub (Z.add z ez) prec) emin) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
clear. case m.
exact inbetween_int_NE_sign.
exact inbetween_int_ZR_sign.
exact inbetween_int_DN_sign.
exact inbetween_int_UP_sign.
exact inbetween_int_NA_sign.
Qed.

(** Multiplication *)

Lemma Bmult_correct_aux :
  forall m sx mx ex (Hx : bounded mx ex = true) sy my ey (Hy : bounded my ey = true),
  let x := F2R (Float radix2 (cond_Zopp sx (Zpos mx)) ex) in
  let y := F2R (Float radix2 (cond_Zopp sy (Zpos my)) ey) in
  let z := binary_round_aux m (xorb sx sy) (mx * my) (ex + ey) loc_Exact in
  valid_binary z = true /\
  if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (x * y))) (bpow radix2 emax) then
    FF2R radix2 z = round radix2 fexp (round_mode m) (x * y) /\
    is_finite_FF z = true /\ sign_FF z = xorb sx sy
  else
    z = binary_overflow m (xorb sx sy).
Proof.
(* Goal: forall (m : mode) (sx : bool) (mx : positive) (ex : Z) (_ : @eq bool (bounded mx ex) true) (sy : bool) (my : positive) (ey : Z) (_ : @eq bool (bounded my ey) true), let x := @F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex) in let y := @F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey) in let z := binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact in and (@eq bool (valid_binary z) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult x y))) (bpow radix2 emax) then and (@eq R (FF2R radix2 z) (round radix2 fexp (round_mode m) (Rmult x y))) (and (@eq bool (is_finite_FF z) true) (@eq bool (sign_FF z) (xorb sx sy))) else @eq full_float z (binary_overflow m (xorb sx sy))) *)
intros m sx mx ex Hx sy my ey Hy x y.
(* Goal: let z := binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact in and (@eq bool (valid_binary z) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult x y))) (bpow radix2 emax) then and (@eq R (FF2R radix2 z) (round radix2 fexp (round_mode m) (Rmult x y))) (and (@eq bool (is_finite_FF z) true) (@eq bool (sign_FF z) (xorb sx sy))) else @eq full_float z (binary_overflow m (xorb sx sy))) *)
unfold x, y.
rewrite <- F2R_mult.
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
simpl.
(* Goal: and (@eq bool (valid_binary (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (@F2R radix2 (Float radix2 (Z.mul (cond_Zopp sx (Zpos mx)) (cond_Zopp sy (Zpos my))) (Z.add ex ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) (round radix2 fexp (round_mode m) (@F2R radix2 (Float radix2 (Z.mul (cond_Zopp sx (Zpos mx)) (cond_Zopp sy (Zpos my))) (Z.add ex ey))))) (and (@eq bool (is_finite_FF (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) true) (@eq bool (sign_FF (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) (xorb sx sy))) else @eq full_float (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact) (binary_overflow m (xorb sx sy))) *)
replace (xorb sx sy) with (Rlt_bool (F2R (Float radix2 (cond_Zopp sx (Zpos mx) * cond_Zopp sy (Zpos my)) (ex + ey))) 0).
(* Goal: and (@eq bool (valid_binary (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) true) (@eq bool (sign_FF (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply binary_round_aux_correct.
(* Goal: inbetween_float radix2 (Zpos mz) ez (Rabs x) loc_Exact *)
(* Goal: Z.le ez (fexp (Z.add (Zdigits radix2 (Zpos mz)) ez)) *)
(* Goal: @eq bool (Rlt_bool x (IZR Z0)) sx *)
constructor.
rewrite <- F2R_abs.
(* Goal: @eq R (@F2R radix2 (Fabs radix2 (Float radix2 (Z.mul (cond_Zopp sx (Zpos mx)) (cond_Zopp sy (Zpos my))) (Z.add ex ey)))) (@F2R radix2 (Float radix2 (Zpos (Pos.mul mx my)) (Z.add ex ey))) *)
(* Goal: Z.le (Z.add ex ey) (fexp (Z.add (Zdigits radix2 (Zpos (Pos.mul mx my))) (Z.add ex ey))) *)
(* Goal: @eq bool (Rlt_bool (@F2R radix2 (Float radix2 (Z.mul (cond_Zopp sx (Zpos mx)) (cond_Zopp sy (Zpos my))) (Z.add ex ey))) (IZR Z0)) (xorb sx sy) *)
apply F2R_eq_compat.
(* Goal: @eq Z (Z.abs (Z.mul (cond_Zopp sx (Zpos mx)) (cond_Zopp sy (Zpos my)))) (Zpos (Pos.mul mx my)) *)
(* Goal: Z.le (Z.add ex ey) (fexp (Z.add (Zdigits radix2 (Zpos (Pos.mul mx my))) (Z.add ex ey))) *)
(* Goal: @eq bool (Rlt_bool (@F2R radix2 (Float radix2 (Z.mul (cond_Zopp sx (Zpos mx)) (cond_Zopp sy (Zpos my))) (Z.add ex ey))) (IZR Z0)) (xorb sx sy) *)
rewrite Zabs_Zmult.
(* Goal: @eq Z (Z.mul (Z.abs (cond_Zopp sx (Zpos mx))) (Z.abs (cond_Zopp sy (Zpos my)))) (Zpos (Pos.mul mx my)) *)
(* Goal: Z.le (Z.add ex ey) (fexp (Z.add (Zdigits radix2 (Zpos (Pos.mul mx my))) (Z.add ex ey))) *)
(* Goal: @eq bool (Rlt_bool (@F2R radix2 (Float radix2 (Z.mul (cond_Zopp sx (Zpos mx)) (cond_Zopp sy (Zpos my))) (Z.add ex ey))) (IZR Z0)) (xorb sx sy) *)
now rewrite 2!abs_cond_Zopp.
(* *)
(* Goal: Z.le (Z.add ex ey) (fexp (Z.add (Zdigits radix2 (Zpos (Pos.mul mx my))) (Z.add ex ey))) *)
(* Goal: @eq bool (Rlt_bool (@F2R radix2 (Float radix2 (Z.mul (cond_Zopp sx (Zpos mx)) (cond_Zopp sy (Zpos my))) (Z.add ex ey))) (IZR Z0)) (xorb sx sy) *)
change (Zpos (mx * my)) with (Zpos mx * Zpos my)%Z.
assert (forall m e, bounded m e = true -> fexp (Zdigits radix2 (Zpos m) + e) = e)%Z.
(* Goal: forall (z : Z) (_ : Z.le prec z), Z.le ez (Z.max (Z.sub (Z.add z ez) prec) emin) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
clear. intros m e Hb.
(* Goal: @eq Z (fexp (Z.add (Zdigits radix2 (Zpos m)) e)) e *)
(* Goal: Z.le (Z.add ex ey) (fexp (Z.add (Zdigits radix2 (Z.mul (Zpos mx) (Zpos my))) (Z.add ex ey))) *)
(* Goal: @eq bool (Rlt_bool (@F2R radix2 (Float radix2 (Z.mul (cond_Zopp sx (Zpos mx)) (cond_Zopp sy (Zpos my))) (Z.add ex ey))) (IZR Z0)) (xorb sx sy) *)
destruct (andb_prop _ _ Hb) as (H,_).
(* Goal: @eq Z (fexp (Z.add (Zdigits radix2 (Zpos m)) e)) e *)
(* Goal: Z.le (Z.add ex ey) (fexp (Z.add (Zdigits radix2 (Z.mul (Zpos mx) (Zpos my))) (Z.add ex ey))) *)
(* Goal: @eq bool (Rlt_bool (@F2R radix2 (Float radix2 (Z.mul (cond_Zopp sx (Zpos mx)) (cond_Zopp sy (Zpos my))) (Z.add ex ey))) (IZR Z0)) (xorb sx sy) *)
apply Zeq_bool_eq.
now rewrite <- Zpos_digits2_pos.
(* Goal: Z.le (Z.add ex ey) (fexp (Z.add (Zdigits radix2 (Z.mul (Zpos mx) (Zpos my))) (Z.add ex ey))) *)
(* Goal: @eq bool (Rlt_bool (@F2R radix2 (Float radix2 (Z.mul (cond_Zopp sx (Zpos mx)) (cond_Zopp sy (Zpos my))) (Z.add ex ey))) (IZR Z0)) (xorb sx sy) *)
generalize (H _ _ Hx) (H _ _ Hy).
(* Goal: forall (_ : @eq Z (fexp (Z.add (Zdigits radix2 (Zpos mx)) ex)) ex) (_ : @eq Z (fexp (Z.add (Zdigits radix2 (Zpos my)) ey)) ey), Z.le (Z.add ex ey) (fexp (Z.add (Zdigits radix2 (Z.mul (Zpos mx) (Zpos my))) (Z.add ex ey))) *)
(* Goal: @eq bool (Rlt_bool (@F2R radix2 (Float radix2 (Z.mul (cond_Zopp sx (Zpos mx)) (cond_Zopp sy (Zpos my))) (Z.add ex ey))) (IZR Z0)) (xorb sx sy) *)
clear x y sx sy Hx Hy H.
(* Goal: forall (z : Z) (_ : Z.le prec z), Z.le ez (fexp (Z.add z ez)) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
unfold fexp, FLT_exp.
refine (_ (Zdigits_mult_ge radix2 (Zpos mx) (Zpos my) _ _)) ; try discriminate.
refine (_ (Zdigits_gt_0 radix2 (Zpos mx) _) (Zdigits_gt_0 radix2 (Zpos my) _)) ; try discriminate.
(* Goal: forall (_ : Z.lt Z0 (Zdigits radix2 (Zpos mx))) (_ : Z.lt Z0 (Zdigits radix2 (Zpos my))) (_ : Z.le (Z.sub (Z.add (Zdigits radix2 (Zpos mx)) (Zdigits radix2 (Zpos my))) (Zpos xH)) (Zdigits radix2 (Z.mul (Zpos mx) (Zpos my)))) (_ : @eq Z (Z.max (Z.sub (Z.add (Zdigits radix2 (Zpos mx)) ex) prec) emin) ex) (_ : @eq Z (Z.max (Z.sub (Z.add (Zdigits radix2 (Zpos my)) ey) prec) emin) ey), Z.le (Z.add ex ey) (Z.max (Z.sub (Z.add (Zdigits radix2 (Z.mul (Zpos mx) (Zpos my))) (Z.add ex ey)) prec) emin) *)
(* Goal: @eq bool (Rlt_bool (@F2R radix2 (Float radix2 (Z.mul (cond_Zopp sx (Zpos mx)) (cond_Zopp sy (Zpos my))) (Z.add ex ey))) (IZR Z0)) (xorb sx sy) *)
generalize (Zdigits radix2 (Zpos mx)) (Zdigits radix2 (Zpos my)) (Zdigits radix2 (Zpos mx * Zpos my)).
clear -Hmax.
(* Goal: forall (z z0 z1 : Z) (_ : Z.lt Z0 z) (_ : Z.lt Z0 z0) (_ : Z.le (Z.sub (Z.add z z0) (Zpos xH)) z1) (_ : @eq Z (Z.max (Z.sub (Z.add z ex) prec) emin) ex) (_ : @eq Z (Z.max (Z.sub (Z.add z0 ey) prec) emin) ey), Z.le (Z.add ex ey) (Z.max (Z.sub (Z.add z1 (Z.add ex ey)) prec) emin) *)
(* Goal: @eq bool (Rlt_bool (@F2R radix2 (Float radix2 (Z.mul (cond_Zopp sx (Zpos mx)) (cond_Zopp sy (Zpos my))) (Z.add ex ey))) (IZR Z0)) (xorb sx sy) *)
unfold emin.
(* Goal: forall (z z0 z1 : Z) (_ : Z.lt Z0 z) (_ : Z.lt Z0 z0) (_ : Z.le (Z.sub (Z.add z z0) (Zpos xH)) z1) (_ : @eq Z (Z.max (Z.sub (Z.add z ex) prec) (Z.sub (Z.sub (Zpos (xI xH)) emax) prec)) ex) (_ : @eq Z (Z.max (Z.sub (Z.add z0 ey) prec) (Z.sub (Z.sub (Zpos (xI xH)) emax) prec)) ey), Z.le (Z.add ex ey) (Z.max (Z.sub (Z.add z1 (Z.add ex ey)) prec) (Z.sub (Z.sub (Zpos (xI xH)) emax) prec)) *)
(* Goal: @eq bool (Rlt_bool (@F2R radix2 (Float radix2 (Z.mul (cond_Zopp sx (Zpos mx)) (cond_Zopp sy (Zpos my))) (Z.add ex ey))) (IZR Z0)) (xorb sx sy) *)
intros dx dy dxy Hx Hy Hxy.
(* Goal: forall (_ : @eq Z (Z.max (Z.sub (Z.add dx ex) prec) (Z.sub (Z.sub (Zpos (xI xH)) emax) prec)) ex) (_ : @eq Z (Z.max (Z.sub (Z.add dy ey) prec) (Z.sub (Z.sub (Zpos (xI xH)) emax) prec)) ey), Z.le (Z.add ex ey) (Z.max (Z.sub (Z.add dxy (Z.add ex ey)) prec) (Z.sub (Z.sub (Zpos (xI xH)) emax) prec)) *)
(* Goal: @eq bool (Rlt_bool (@F2R radix2 (Float radix2 (Z.mul (cond_Zopp sx (Zpos mx)) (cond_Zopp sy (Zpos my))) (Z.add ex ey))) (IZR Z0)) (xorb sx sy) *)
zify ; intros ; subst.
(* Goal: Z.le ez z1 *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
omega.
(* *)
(* Goal: @eq bool (Rlt_bool (@F2R radix2 (Float radix2 (Z.mul (cond_Zopp sx (Zpos mx)) (cond_Zopp sy (Zpos my))) (Z.add ex ey))) (IZR Z0)) (xorb sx sy) *)
case sx ; case sy.
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb false false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rlt_bool_false.
(* Goal: Rle (IZR Z0) (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) *)
(* Goal: Rle (IZR Z0) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_ge_0_compat.
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb true false) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb false false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rlt_bool_true.
(* Goal: Rlt (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
now apply F2R_lt_0_compat.
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb true false) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb false false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rlt_bool_true.
(* Goal: Rlt (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
now apply F2R_lt_0_compat.
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb false false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rlt_bool_false.
(* Goal: Rle (IZR Z0) (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) *)
(* Goal: Rle (IZR Z0) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_ge_0_compat.
Qed.

Definition Bmult mult_nan m x y :=
  let f pl := B754_nan (fst pl) (snd pl) in
  match x, y with
  | B754_nan _ _, _ | _, B754_nan _ _ => f (mult_nan x y)
  | B754_infinity sx, B754_infinity sy => B754_infinity (xorb sx sy)
  | B754_infinity sx, B754_finite sy _ _ _ => B754_infinity (xorb sx sy)
  | B754_finite sx _ _ _, B754_infinity sy => B754_infinity (xorb sx sy)
  | B754_infinity _, B754_zero _ => f (mult_nan x y)
  | B754_zero _, B754_infinity _ => f (mult_nan x y)
  | B754_finite sx _ _ _, B754_zero sy => B754_zero (xorb sx sy)
  | B754_zero sx, B754_finite sy _ _ _ => B754_zero (xorb sx sy)
  | B754_zero sx, B754_zero sy => B754_zero (xorb sx sy)
  | B754_finite sx mx ex Hx, B754_finite sy my ey Hy =>
    FF2B _ (proj1 (Bmult_correct_aux m sx mx ex Hx sy my ey Hy))
  end.

Theorem Bmult_correct :
  forall mult_nan m x y,
  if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (B2R x * B2R y))) (bpow radix2 emax) then
    B2R (Bmult mult_nan m x y) = round radix2 fexp (round_mode m) (B2R x * B2R y) /\
    is_finite (Bmult mult_nan m x y) = andb (is_finite x) (is_finite y) /\
    (is_nan (Bmult mult_nan m x y) = false ->
      Bsign (Bmult mult_nan m x y) = xorb (Bsign x) (Bsign y))
  else
    B2FF (Bmult mult_nan m x y) = binary_overflow m (xorb (Bsign x) (Bsign y)).
Proof.
intros mult_nan m [sx|sx|sx plx|sx mx ex Hx] [sy|sy|sy ply|sy my ey Hy] ;
  try ( rewrite ?Rmult_0_r, ?Rmult_0_l, round_0, Rabs_R0, Rlt_bool_true ; [ now repeat constructor | apply bpow_gt_0 | now auto with typeclass_instances ] ).
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
simpl.
(* Goal: if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (B2R (FF2B (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact) (@proj1 (@eq bool (valid_binary (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) true) (@eq bool (sign_FF (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) (xorb sx sy))) else @eq full_float (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact) (binary_overflow m (xorb sx sy))) (Bmult_correct_aux m sx mx ex Hx sy my ey Hy)))) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite (FF2B (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact) (@proj1 (@eq bool (valid_binary (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) true) (@eq bool (sign_FF (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) (xorb sx sy))) else @eq full_float (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact) (binary_overflow m (xorb sx sy))) (Bmult_correct_aux m sx mx ex Hx sy my ey Hy)))) true) (forall _ : @eq bool (is_nan (FF2B (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact) (@proj1 (@eq bool (valid_binary (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) true) (@eq bool (sign_FF (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) (xorb sx sy))) else @eq full_float (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact) (binary_overflow m (xorb sx sy))) (Bmult_correct_aux m sx mx ex Hx sy my ey Hy)))) false, @eq bool (Bsign (FF2B (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact) (@proj1 (@eq bool (valid_binary (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) true) (@eq bool (sign_FF (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) (xorb sx sy))) else @eq full_float (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact) (binary_overflow m (xorb sx sy))) (Bmult_correct_aux m sx mx ex Hx sy my ey Hy)))) (xorb sx sy))) else @eq full_float (B2FF (FF2B (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact) (@proj1 (@eq bool (valid_binary (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) true) (@eq bool (sign_FF (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) (xorb sx sy))) else @eq full_float (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact) (binary_overflow m (xorb sx sy))) (Bmult_correct_aux m sx mx ex Hx sy my ey Hy)))) (binary_overflow m (xorb sx sy)) *)
case Bmult_correct_aux.
(* Goal: forall (e : @eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (y : if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))), if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (B2R (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) e y)))) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) e y)))) true) (forall _ : @eq bool (is_nan (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) e y)))) false, @eq bool (Bsign (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) e y)))) (xorb sx sy))) else @eq full_float (B2FF (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) e y)))) (binary_overflow m (xorb sx sy)) *)
intros H1.
(* Goal: forall y : if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy)), if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (B2R (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) true) (forall _ : @eq bool (is_nan (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) false, @eq bool (Bsign (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) (xorb sx sy))) else @eq full_float (B2FF (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) (binary_overflow m (xorb sx sy)) *)
case Rlt_bool.
(* Goal: forall y : and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))), and (@eq R (B2R (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy)))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy)))) H1 y)))) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy)))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy)))) H1 y)))) true) (forall _ : @eq bool (is_nan (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy)))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy)))) H1 y)))) false, @eq bool (Bsign (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy)))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy)))) H1 y)))) (xorb sx sy))) *)
(* Goal: forall y : @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy)), @eq full_float (B2FF (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) (binary_overflow m (xorb sx sy)) *)
intros (H2, (H3, H4)).
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
split.
(* Goal: @eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)))) *)
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
now rewrite B2R_FF2B.
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
split.
(* Goal: @eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true *)
(* Goal: forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false *)
now rewrite is_finite_FF2B.
(* Goal: @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false *)
rewrite Bsign_FF2B. auto.
(* Goal: forall y : @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy)), @eq full_float (B2FF (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) (binary_overflow m (xorb sx sy)) *)
intros H2.
(* Goal: @eq full_float (B2FF (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 H2)))) (binary_overflow m (xorb sx sy)) *)
now rewrite B2FF_FF2B.
Qed.

Definition Bmult_FF mult_nan m x y :=
  let f pl := F754_nan (fst pl) (snd pl) in
  match x, y with
  | F754_nan _ _, _ | _, F754_nan _ _ => f (mult_nan x y)
  | F754_infinity sx, F754_infinity sy => F754_infinity (xorb sx sy)
  | F754_infinity sx, F754_finite sy _ _ => F754_infinity (xorb sx sy)
  | F754_finite sx _ _, F754_infinity sy => F754_infinity (xorb sx sy)
  | F754_infinity _, F754_zero _ => f (mult_nan x y)
  | F754_zero _, F754_infinity _ => f (mult_nan x y)
  | F754_finite sx _ _, F754_zero sy => F754_zero (xorb sx sy)
  | F754_zero sx, F754_finite sy _ _ => F754_zero (xorb sx sy)
  | F754_zero sx, F754_zero sy => F754_zero (xorb sx sy)
  | F754_finite sx mx ex, F754_finite sy my ey =>
    binary_round_aux m (xorb sx sy) (mx * my) (ex + ey) loc_Exact
  end.

Theorem B2FF_Bmult :
  forall mult_nan mult_nan_ff,
  forall m x y,
  mult_nan_ff (B2FF x) (B2FF y) = (let '(sr, exist plr _) := mult_nan x y in (sr, plr)) ->
  B2FF (Bmult mult_nan m x y) = Bmult_FF mult_nan_ff m (B2FF x) (B2FF y).
Proof.
(* Goal: forall (mult_nan : forall (_ : binary_float) (_ : binary_float), prod bool (@sig positive (fun pl : positive => @eq bool (Z.ltb (Zpos (digits2_pos pl)) prec) true))) (mult_nan_ff : forall (_ : full_float) (_ : full_float), prod bool positive) (m : mode) (x y : binary_float) (_ : @eq (prod bool positive) (mult_nan_ff (B2FF x) (B2FF y)) (let 'pair sr (exist plr y1 as y0) := mult_nan x y in @pair bool positive sr plr)), @eq full_float (B2FF (Bmult mult_nan m x y)) (Bmult_FF mult_nan_ff m (B2FF x) (B2FF y)) *)
intros mult_nan mult_nan_ff m x y Hmult_nan.
(* Goal: @eq full_float (B2FF (Bmult mult_nan m x y)) (Bmult_FF mult_nan_ff m (B2FF x) (B2FF y)) *)
unfold Bmult_FF. rewrite Hmult_nan.
destruct x as [sx|sx|sx [plx Hplx]|sx mx ex Hx], y as [sy|sy|sy [ply Hply]|sy my ey Hy] ;
  simpl; try match goal with |- context [mult_nan ?x ?y] =>
               destruct (mult_nan x y) as [? []] end;
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
  try easy.
(* Goal: @eq full_float (B2FF (FF2B (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact) (@proj1 (@eq bool (valid_binary (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) true) (@eq bool (sign_FF (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact)) (xorb sx sy))) else @eq full_float (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact) (binary_overflow m (xorb sx sy))) (Bmult_correct_aux m sx mx ex Hx sy my ey Hy)))) (binary_round_aux m (xorb sx sy) (Pos.mul mx my) (Z.add ex ey) loc_Exact) *)
apply B2FF_FF2B.
Qed.

(** Normalization and rounding *)

Definition shl_align mx ex ex' :=
  match (ex' - ex)%Z with
  | Zneg d => (shift_pos d mx, ex')
  | _ => (mx, ex)
  end.

Theorem shl_align_correct :
  forall mx ex ex',
  let (mx', ex'') := shl_align mx ex ex' in
  F2R (Float radix2 (Zpos mx) ex) = F2R (Float radix2 (Zpos mx') ex'') /\
  (ex'' <= ex')%Z.
Proof.
(* Goal: forall (mx : positive) (ex ex' : Z), let (mx', ex'') := shl_align mx ex ex' in and (@eq R (@F2R radix2 (Float radix2 (Zpos mx) ex)) (@F2R radix2 (Float radix2 (Zpos mx') ex''))) (Z.le ex'' ex') *)
intros mx ex ex'.
(* Goal: @eq Z (@snd positive Z (shl_align mx ex ex')) ex' *)
unfold shl_align.
case_eq (ex' - ex)%Z.
(* d = 0 *)
(* Goal: forall r : Rge (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0), @eq R (round radix2 fexp (round_mode m) (Rsqrt (mknonnegreal (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (Rge_le (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) r)))) (B2R (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
intros H.
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
repeat split.
(* Goal: Z.le ex ex' *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub ex' ex) (Zpos p)), and (@eq R (@F2R radix2 (Float radix2 (Zpos mx) ex)) (@F2R radix2 (Float radix2 (Zpos mx) ex))) (Z.le ex ex') *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub ex' ex) (Zneg p)), and (@eq R (@F2R radix2 (Float radix2 (Zpos mx) ex)) (@F2R radix2 (Float radix2 (Zpos (shift_pos p mx)) ex'))) (Z.le ex' ex') *)
rewrite Zminus_eq with (1 := H).
(* Goal: Z.le ex' ex' *)
apply Zle_refl.
(* d > 0 *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub ex' ex) (Zneg p)), and (@eq R (@F2R radix2 (Float radix2 (Zpos mx) ex)) (@F2R radix2 (Float radix2 (Zpos (shift_pos p mx)) ex'))) (Z.le ex' ex') *)
intros d Hd.
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
repeat split.
replace ex' with (ex' - ex + ex)%Z by ring.
(* Goal: Z.le ex (Z.add (Z.sub ex' ex) ex) *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub ex' ex) (Zneg p)), and (@eq R (@F2R radix2 (Float radix2 (Zpos mx) ex)) (@F2R radix2 (Float radix2 (Zpos (shift_pos p mx)) ex'))) (Z.le ex' ex') *)
rewrite Hd.
pattern ex at 1 ; rewrite <- Zplus_0_l.
(* Goal: Z.le (Z.add Z0 ex) (Z.add (Zpos d) ex) *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub ex' ex) (Zneg p)), and (@eq R (@F2R radix2 (Float radix2 (Zpos mx) ex)) (@F2R radix2 (Float radix2 (Zpos (shift_pos p mx)) ex'))) (Z.le ex' ex') *)
now apply Zplus_le_compat_r.
(* d < 0 *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub ex' ex) (Zneg p)), and (@eq R (@F2R radix2 (Float radix2 (Zpos mx) ex)) (@F2R radix2 (Float radix2 (Zpos (shift_pos p mx)) ex'))) (Z.le ex' ex') *)
intros d Hd.
(* Goal: and (@eq R (@F2R radix2 (Float radix2 (Zpos mx) ex)) (@F2R radix2 (Float radix2 (Zpos (shift_pos d mx)) ex'))) (Z.le ex' ex') *)
rewrite shift_pos_correct, Zmult_comm.
(* Goal: and (@eq R (@F2R radix2 (Float radix2 (Zpos mx) ex)) (@F2R radix2 (Float radix2 (Z.mul (Zpos mx) (Z.pow_pos (Zpos (xO xH)) d)) ex'))) (Z.le ex' ex') *)
change (Zpower_pos 2 d) with (Zpower radix2 (Zpos d)).
(* Goal: and (@eq R (@F2R radix2 (Float radix2 (Zpos mx) ex)) (@F2R radix2 (Float radix2 (Z.mul (Zpos mx) (Z.pow (radix_val radix2) (Zpos d))) ex'))) (Z.le ex' ex') *)
change (Zpos d) with (Zopp (Zneg d)).
rewrite <- Hd.
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
split.
replace (- (ex' - ex))%Z with (ex - ex')%Z by ring.
(* Goal: @eq R (@F2R radix2 (Float radix2 (Zpos mx) ex)) (@F2R radix2 (Float radix2 (Z.mul (Zpos mx) (Z.pow (radix_val radix2) (Z.sub ex ex'))) ex')) *)
(* Goal: Z.le ex' ex' *)
apply F2R_change_exp.
(* Goal: Z.le ex' ex *)
(* Goal: Z.le ex' ex' *)
apply Zle_0_minus_le.
replace (ex - ex')%Z with (- (ex' - ex))%Z by ring.
(* Goal: Z.le ex (Z.add (Z.sub ex' ex) ex) *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub ex' ex) (Zneg p)), and (@eq R (@F2R radix2 (Float radix2 (Zpos mx) ex)) (@F2R radix2 (Float radix2 (Zpos (shift_pos p mx)) ex'))) (Z.le ex' ex') *)
now rewrite Hd.
(* Goal: Z.le ex' ex' *)
apply Zle_refl.
Qed.

Theorem snd_shl_align :
  forall mx ex ex',
  (ex' <= ex)%Z ->
  snd (shl_align mx ex ex') = ex'.
Proof.
(* Goal: forall (mx : positive) (ex ex' : Z) (_ : Z.le ex' ex), @eq Z (@snd positive Z (shl_align mx ex ex')) ex' *)
intros mx ex ex' He.
(* Goal: @eq Z (@snd positive Z (shl_align mx ex ex')) ex' *)
unfold shl_align.
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
case_eq (ex' - ex)%Z ; simpl.
(* Goal: forall r : Rge (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0), @eq R (round radix2 fexp (round_mode m) (Rsqrt (mknonnegreal (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (Rge_le (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) r)))) (B2R (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
intros H.
(* Goal: Z.le ex ex' *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub ex' ex) (Zpos p)), and (@eq R (@F2R radix2 (Float radix2 (Zpos mx) ex)) (@F2R radix2 (Float radix2 (Zpos mx) ex))) (Z.le ex ex') *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub ex' ex) (Zneg p)), and (@eq R (@F2R radix2 (Float radix2 (Zpos mx) ex)) (@F2R radix2 (Float radix2 (Zpos (shift_pos p mx)) ex'))) (Z.le ex' ex') *)
now rewrite Zminus_eq with (1 := H).
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub ex' ex) (Zpos p)), @eq Z ex ex' *)
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub ex' ex) (Zneg p)), @eq Z ex' ex' *)
intros p.
clear -He ; zify ; omega.
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub ex' ex) (Zneg p)), @eq Z ex' ex' *)
intros.
(* Goal: @eq Z ex' ex' *)
apply refl_equal.
Qed.

Definition shl_align_fexp mx ex :=
  shl_align mx ex (fexp (Zpos (digits2_pos mx) + ex)).

Theorem shl_align_fexp_correct :
  forall mx ex,
  let (mx', ex') := shl_align_fexp mx ex in
  F2R (Float radix2 (Zpos mx) ex) = F2R (Float radix2 (Zpos mx') ex') /\
  (ex' <= fexp (Zdigits radix2 (Zpos mx') + ex'))%Z.
Proof.
intros mx ex.
unfold shl_align_fexp.
generalize (shl_align_correct mx ex (fexp (Zpos (digits2_pos mx) + ex))).
(* Goal: @eq Z (Z.add (Zdigits radix2 (Z.abs (cond_Zopp sx (Zpos mx)))) ex) (Z.add (Zpos (digits2_pos mx)) ex) *)
(* Goal: not (@eq Z (cond_Zopp sx (Zpos mx)) Z0) *)
rewrite Zpos_digits2_pos.
case shl_align.
intros mx' ex' (H1, H2).
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
split.
exact H1.
rewrite <- ln_beta_F2R_Zdigits. 2: easy.
rewrite <- H1.
(* Goal: @eq Z (ln_beta_val radix2 (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (ln_beta radix2 (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)))) (Z.add (Zpos (digits2_pos mx)) ex) *)
now rewrite ln_beta_F2R_Zdigits.
Qed.

Definition binary_round m sx mx ex :=
  let '(mz, ez) := shl_align_fexp mx ex in binary_round_aux m sx mz ez loc_Exact.

Theorem binary_round_correct :
  forall m sx mx ex,
  let z := binary_round m sx mx ex in
  valid_binary z = true /\
  let x := F2R (Float radix2 (cond_Zopp sx (Zpos mx)) ex) in
  if Rlt_bool (Rabs (round radix2 fexp (round_mode m) x)) (bpow radix2 emax) then
    FF2R radix2 z = round radix2 fexp (round_mode m) x /\
    is_finite_FF z = true /\
    sign_FF z = sx
  else
    z = binary_overflow m sx.
Proof.
(* Goal: forall (m : mode) (sx : bool) (mx : positive) (ex : Z), let z := binary_round m sx mx ex in and (@eq bool (valid_binary z) true) (let x := @F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex) in if Rlt_bool (Rabs (round radix2 fexp (round_mode m) x)) (bpow radix2 emax) then and (@eq R (FF2R radix2 z) (round radix2 fexp (round_mode m) x)) (and (@eq bool (is_finite_FF z) true) (@eq bool (sign_FF z) sx)) else @eq full_float z (binary_overflow m sx)) *)
intros m sx mx ex.
(* Goal: let z := binary_round m sx mx ex in and (@eq bool (valid_binary z) true) (let x := @F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex) in if Rlt_bool (Rabs (round radix2 fexp (round_mode m) x)) (bpow radix2 emax) then and (@eq R (FF2R radix2 z) (round radix2 fexp (round_mode m) x)) (and (@eq bool (is_finite_FF z) true) (@eq bool (sign_FF z) sx)) else @eq full_float z (binary_overflow m sx)) *)
unfold binary_round.
(* Goal: and (@eq bool (valid_binary (let 'pair mz ez := shl_align_fexp mx ex in binary_round_aux m sx mz ez loc_Exact)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (let 'pair mz ez := shl_align_fexp mx ex in binary_round_aux m sx mz ez loc_Exact)) (round radix2 fexp (round_mode m) (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)))) (and (@eq bool (is_finite_FF (let 'pair mz ez := shl_align_fexp mx ex in binary_round_aux m sx mz ez loc_Exact)) true) (@eq bool (sign_FF (let 'pair mz ez := shl_align_fexp mx ex in binary_round_aux m sx mz ez loc_Exact)) sx)) else @eq full_float (let 'pair mz ez := shl_align_fexp mx ex in binary_round_aux m sx mz ez loc_Exact) (binary_overflow m sx)) *)
generalize (shl_align_fexp_correct mx ex).
(* Goal: forall _ : let (mx', ex') := shl_align_fexp mx ex in and (@eq R (@F2R radix2 (Float radix2 (Zpos mx) ex)) (@F2R radix2 (Float radix2 (Zpos mx') ex'))) (Z.le ex' (fexp (Z.add (Zdigits radix2 (Zpos mx')) ex'))), and (@eq bool (valid_binary (let 'pair mz ez := shl_align_fexp mx ex in binary_round_aux m sx mz ez loc_Exact)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (let 'pair mz ez := shl_align_fexp mx ex in binary_round_aux m sx mz ez loc_Exact)) (round radix2 fexp (round_mode m) (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)))) (and (@eq bool (is_finite_FF (let 'pair mz ez := shl_align_fexp mx ex in binary_round_aux m sx mz ez loc_Exact)) true) (@eq bool (sign_FF (let 'pair mz ez := shl_align_fexp mx ex in binary_round_aux m sx mz ez loc_Exact)) sx)) else @eq full_float (let 'pair mz ez := shl_align_fexp mx ex in binary_round_aux m sx mz ez loc_Exact) (binary_overflow m sx)) *)
destruct (shl_align_fexp mx ex) as (mz, ez).
(* Goal: forall _ : and (@eq R (@F2R radix2 (Float radix2 (Zpos mx) ex)) (@F2R radix2 (Float radix2 (Zpos mz) ez))) (Z.le ez (fexp (Z.add (Zdigits radix2 (Zpos mz)) ez))), and (@eq bool (valid_binary (binary_round_aux m sx mz ez loc_Exact)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (binary_round_aux m sx mz ez loc_Exact)) (round radix2 fexp (round_mode m) (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)))) (and (@eq bool (is_finite_FF (binary_round_aux m sx mz ez loc_Exact)) true) (@eq bool (sign_FF (binary_round_aux m sx mz ez loc_Exact)) sx)) else @eq full_float (binary_round_aux m sx mz ez loc_Exact) (binary_overflow m sx)) *)
intros (H1, H2).
(* Goal: and (@eq bool (valid_binary (binary_round_aux m sx mz ez loc_Exact)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (binary_round_aux m sx mz ez loc_Exact)) (round radix2 fexp (round_mode m) (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)))) (and (@eq bool (is_finite_FF (binary_round_aux m sx mz ez loc_Exact)) true) (@eq bool (sign_FF (binary_round_aux m sx mz ez loc_Exact)) sx)) else @eq full_float (binary_round_aux m sx mz ez loc_Exact) (binary_overflow m sx)) *)
set (x := F2R (Float radix2 (cond_Zopp sx (Zpos mx)) ex)).
(* Goal: and (@eq bool (valid_binary (binary_round_aux m sx mz ez loc_Exact)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) x)) (bpow radix2 emax) then and (@eq R (FF2R radix2 (binary_round_aux m sx mz ez loc_Exact)) (round radix2 fexp (round_mode m) x)) (and (@eq bool (is_finite_FF (binary_round_aux m sx mz ez loc_Exact)) true) (@eq bool (sign_FF (binary_round_aux m sx mz ez loc_Exact)) sx)) else @eq full_float (binary_round_aux m sx mz ez loc_Exact) (binary_overflow m sx)) *)
replace sx with (Rlt_bool x 0).
(* Goal: and (@eq bool (valid_binary (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) true) (@eq bool (sign_FF (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply binary_round_aux_correct.
(* Goal: inbetween_float radix2 (Zpos mz) ez (Rabs x) loc_Exact *)
(* Goal: Z.le ez (fexp (Z.add (Zdigits radix2 (Zpos mz)) ez)) *)
(* Goal: @eq bool (Rlt_bool x (IZR Z0)) sx *)
constructor.
(* Goal: @eq bool (Rlt_bool x (IZR Z0)) sx *)
unfold x.
now rewrite <- F2R_Zabs, abs_cond_Zopp.
(* Goal: Z.le ez (fexp (Z.add (Zdigits radix2 (Zpos mz)) ez)) *)
(* Goal: @eq bool (Rlt_bool x (IZR Z0)) sx *)
exact H2.
(* Goal: @eq bool (Rlt_bool x (IZR Z0)) sx *)
unfold x.
(* Goal: and (@eq R (B2R (if sx then B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) else FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex))))) (and (@eq bool (is_finite (if sx then B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) else FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (if sx then false else true)) (forall _ : @eq bool (is_nan (if sx then B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) else FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (if sx then B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) else FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) sx)) *)
case sx.
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb true false) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb false false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rlt_bool_true.
(* Goal: Rlt (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
now apply F2R_lt_0_compat.
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb false false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rlt_bool_false.
(* Goal: Rle (IZR Z0) (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) *)
(* Goal: Rle (IZR Z0) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_ge_0_compat.
Qed.

Definition binary_normalize mode m e szero :=
  match m with
  | Z0 => B754_zero szero
  | Zpos m => FF2B _ (proj1 (binary_round_correct mode false m e))
  | Zneg m => FF2B _ (proj1 (binary_round_correct mode true m e))
  end.

Theorem binary_normalize_correct :
  forall m mx ex szero,
  if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (F2R (Float radix2 mx ex)))) (bpow radix2 emax) then
    B2R (binary_normalize m mx ex szero) = round radix2 fexp (round_mode m) (F2R (Float radix2 mx ex)) /\
    is_finite (binary_normalize m mx ex szero) = true /\
    Bsign (binary_normalize m mx ex szero) =
      match Rcompare (F2R (Float radix2 mx ex)) 0 with
        | Eq => szero
        | Lt => true
        | Gt => false
      end
  else
    B2FF (binary_normalize m mx ex szero) = binary_overflow m (Rlt_bool (F2R (Float radix2 mx ex)) 0).
Proof with auto with typeclass_instances.
intros m mx ez szero.
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
destruct mx as [|mz|mz] ; simpl.
rewrite F2R_0, round_0, Rabs_R0, Rlt_bool_true...
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
split... split...
rewrite Rcompare_Eq...
apply bpow_gt_0.
(* . mz > 0 *)
generalize (binary_round_correct m false mz ez).
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
simpl.
case Rlt_bool_spec.
intros _ (Vz, (Rz, (Rz', Rz''))).
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
split.
(* Goal: @eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)))) *)
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
now rewrite B2R_FF2B.
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
split.
(* Goal: @eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true *)
(* Goal: forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false *)
now rewrite is_finite_FF2B.
rewrite Bsign_FF2B, Rz''.
rewrite Rcompare_Gt...
apply F2R_gt_0_compat.
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
simpl. zify; omega.
intros Hz' (Vz, Rz).
rewrite B2FF_FF2B, Rz.
(* Goal: @eq binary_float (B754_finite sy my ey Hx) (B754_finite sy my ey Hy) *)
apply f_equal.
(* Goal: @eq R (B2R (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)))) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
apply sym_eq.
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb false false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rlt_bool_false.
(* Goal: Rle (IZR Z0) (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) *)
(* Goal: Rle (IZR Z0) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_ge_0_compat.
(* . mz < 0 *)
generalize (binary_round_correct m true mz ez).
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
simpl.
case Rlt_bool_spec.
intros _ (Vz, (Rz, (Rz', Rz''))).
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
split.
(* Goal: @eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)))) *)
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
now rewrite B2R_FF2B.
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
split.
(* Goal: @eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true *)
(* Goal: forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false *)
now rewrite is_finite_FF2B.
rewrite Bsign_FF2B, Rz''.
rewrite Rcompare_Lt...
apply F2R_lt_0_compat.
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
simpl. zify; omega.
intros Hz' (Vz, Rz).
rewrite B2FF_FF2B, Rz.
(* Goal: @eq binary_float (B754_finite sy my ey Hx) (B754_finite sy my ey Hy) *)
apply f_equal.
(* Goal: @eq R (B2R (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)))) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
apply sym_eq.
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb true false) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb false false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rlt_bool_true.
(* Goal: Rlt (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
now apply F2R_lt_0_compat.
Qed.

(** Addition *)

Definition Bplus plus_nan m x y :=
  let f pl := B754_nan (fst pl) (snd pl) in
  match x, y with
  | B754_nan _ _, _ | _, B754_nan _ _ => f (plus_nan x y)
  | B754_infinity sx, B754_infinity sy =>
    if Bool.eqb sx sy then x else f (plus_nan x y)
  | B754_infinity _, _ => x
  | _, B754_infinity _ => y
  | B754_zero sx, B754_zero sy =>
    if Bool.eqb sx sy then x else
    match m with mode_DN => B754_zero true | _ => B754_zero false end
  | B754_zero _, _ => y
  | _, B754_zero _ => x
  | B754_finite sx mx ex Hx, B754_finite sy my ey Hy =>
    let ez := Zmin ex ey in
    binary_normalize m (Zplus (cond_Zopp sx (Zpos (fst (shl_align mx ex ez)))) (cond_Zopp sy (Zpos (fst (shl_align my ey ez)))))
      ez (match m with mode_DN => true | _ => false end)
  end.

Theorem Bplus_correct :
  forall plus_nan m x y,
  is_finite x = true ->
  is_finite y = true ->
  if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (B2R x + B2R y))) (bpow radix2 emax) then
    B2R (Bplus plus_nan m x y) = round radix2 fexp (round_mode m) (B2R x + B2R y) /\
    is_finite (Bplus plus_nan m x y) = true /\
    Bsign (Bplus plus_nan m x y) =
      match Rcompare (B2R x + B2R y) 0 with
        | Eq => match m with mode_DN => orb (Bsign x) (Bsign y)
                                 | _ => andb (Bsign x) (Bsign y) end
        | Lt => true
        | Gt => false
      end
  else
    (B2FF (Bplus plus_nan m x y) = binary_overflow m (Bsign x) /\ Bsign x = Bsign y).
Proof with auto with typeclass_instances.
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
intros plus_nan m [sx|sx| |sx mx ex Hx] [sy|sy| |sy my ey Hy] Fx Fy ; try easy.
(* *)
rewrite Rplus_0_r, round_0, Rabs_R0, Rlt_bool_true...
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
simpl.
(* Goal: @eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false *)
rewrite Rcompare_Eq by auto.
destruct sx, sy; try easy; now case m.
apply bpow_gt_0.
(* *)
rewrite Rplus_0_l, round_generic, Rlt_bool_true...
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
split... split...
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
simpl. unfold F2R.
erewrite <- Rmult_0_l, Rcompare_mult_r.
rewrite Rcompare_Z2R with (y:=0%Z).
destruct sy...
apply bpow_gt_0.
apply abs_B2R_lt_emax.
apply generic_format_B2R.
(* *)
rewrite Rplus_0_r, round_generic, Rlt_bool_true...
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
split... split...
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
simpl. unfold F2R.
erewrite <- Rmult_0_l, Rcompare_mult_r.
rewrite Rcompare_Z2R with (y:=0%Z).
destruct sx...
apply bpow_gt_0.
apply abs_B2R_lt_emax.
apply generic_format_B2R.
(* *)
clear Fx Fy.
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
simpl.
set (szero := match m with mode_DN => true | _ => false end).
set (ez := Zmin ex ey).
set (mz := (cond_Zopp sx (Zpos (fst (shl_align mx ex ez))) + cond_Zopp sy (Zpos (fst (shl_align my ey ez))))%Z).
assert (Hp: (F2R (Float radix2 (cond_Zopp sx (Zpos mx)) ex) +
  F2R (Float radix2 (cond_Zopp sy (Zpos my)) ey))%R = F2R (Float radix2 mz ez)).
rewrite 2!F2R_cond_Zopp.
generalize (shl_align_correct mx ex ez).
generalize (shl_align_correct my ey ez).
generalize (snd_shl_align mx ex ez (Zle_min_l ex ey)).
generalize (snd_shl_align my ey ez (Zle_min_r ex ey)).
destruct (shl_align mx ex ez) as (mx', ex').
destruct (shl_align my ey ez) as (my', ey').
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
simpl.
intros H1 H2.
rewrite H1, H2.
clear H1 H2.
intros (H1, _) (H2, _).
rewrite H1, H2.
clear H1 H2.
rewrite <- 2!F2R_cond_Zopp.
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
unfold F2R. simpl.
now rewrite <- Rmult_plus_distr_r, <- Z2R_plus.
(* Goal: forall _ : @eq (prod (prod Z Z) location) (if Z.ltb Z0 (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) then truncate_aux radix2 (@pair (prod Z Z) location (@pair Z Z m e) l) (Z.sub (fexp (Z.add (Zdigits radix2 m) e)) e) else @pair (prod Z Z) location (@pair Z Z m e) l) (@pair (prod Z Z) location (@pair Z Z m' e') l'), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Zneg p)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
rewrite Hp.
assert (Sz: (bpow radix2 emax <= Rabs (round radix2 fexp (round_mode m) (F2R (Float radix2 mz ez))))%R -> sx = Rlt_bool (F2R (Float radix2 mz ez)) 0 /\ sx = sy).
(* . *)
rewrite <- Hp.
intros Bz.
destruct (Bool.bool_dec sx sy) as [Hs|Hs].
(* .. *)
refine (conj _ Hs).
(* Goal: forall _ : @eq (float radix2) (Float radix2 (cond_Zopp sx (Zpos mx)) ex) (Float radix2 (cond_Zopp sy (Zpos my)) ey), and (@eq positive mx my) (@eq Z ex ey) *)
(* Goal: canonic radix2 fexp (Float radix2 (cond_Zopp sx (Zpos mx)) ex) *)
(* Goal: canonic radix2 fexp (Float radix2 (cond_Zopp sy (Zpos my)) ey) *)
(* Goal: @eq binary_float (B754_finite sx mx ex Hx) (B754_finite sy my ey Hy) *)
rewrite Hs.
(* Goal: @eq R (B2R (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)))) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
apply sym_eq.
(* Goal: not (@eq R (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)) (IZR Z0)) *)
(* Goal: Z.le ez (fexp (Z.add (Zdigits radix2 (Zpos mz)) ez)) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
case sy.
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb true false) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb false false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rlt_bool_true.
rewrite <- (Rplus_0_r 0).
apply Rplus_lt_compat.
(* Goal: Rlt (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
now apply F2R_lt_0_compat.
(* Goal: Rlt (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
now apply F2R_lt_0_compat.
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb false false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rlt_bool_false.
rewrite <- (Rplus_0_r 0).
apply Rplus_le_compat.
(* Goal: Rle (IZR Z0) (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) *)
(* Goal: Rle (IZR Z0) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_ge_0_compat.
(* Goal: Rle (IZR Z0) (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) *)
(* Goal: Rle (IZR Z0) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_ge_0_compat.
(* .. *)
elim Rle_not_lt with (1 := Bz).
generalize (bounded_lt_emax _ _ Hx) (bounded_lt_emax _ _ Hy) (andb_prop _ _ Hx) (andb_prop _ _ Hy).
intros Bx By (Hx',_) (Hy',_).
generalize (canonic_canonic_mantissa sx _ _ Hx') (canonic_canonic_mantissa sy _ _ Hy').
clear -Bx By Hs prec_gt_0_.
intros Cx Cy.
destruct sx.
(* ... *)
destruct sy.
now elim Hs.
clear Hs.
apply Rabs_lt.
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
split.
apply Rlt_le_trans with (F2R (Float radix2 (cond_Zopp true (Zpos mx)) ex)).
(* Goal: Rlt (Rmult (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb false false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
rewrite F2R_Zopp.
now apply Ropp_lt_contravar.
apply round_ge_generic...
(* Goal: generic_format radix2 fexp (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) *)
now apply generic_format_canonic.
pattern (F2R (Float radix2 (cond_Zopp true (Zpos mx)) ex)) at 1 ; rewrite <- Rplus_0_r.
apply Rplus_le_compat_l.
(* Goal: Rle (IZR Z0) (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) *)
(* Goal: Rle (IZR Z0) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_ge_0_compat.
apply Rle_lt_trans with (2 := By).
apply round_le_generic...
(* Goal: generic_format radix2 fexp (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) *)
now apply generic_format_canonic.
rewrite <- (Rplus_0_l (F2R (Float radix2 (Zpos my) ey))).
apply Rplus_le_compat_r.
now apply F2R_le_0_compat.
(* ... *)
destruct sy.
2: now elim Hs.
clear Hs.
apply Rabs_lt.
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
split.
apply Rlt_le_trans with (F2R (Float radix2 (cond_Zopp true (Zpos my)) ey)).
(* Goal: Rlt (Rmult (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb false false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
rewrite F2R_Zopp.
now apply Ropp_lt_contravar.
apply round_ge_generic...
(* Goal: generic_format radix2 fexp (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) *)
now apply generic_format_canonic.
pattern (F2R (Float radix2 (cond_Zopp true (Zpos my)) ey)) at 1 ; rewrite <- Rplus_0_l.
apply Rplus_le_compat_r.
(* Goal: Rle (IZR Z0) (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) *)
(* Goal: Rle (IZR Z0) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_ge_0_compat.
apply Rle_lt_trans with (2 := Bx).
apply round_le_generic...
(* Goal: generic_format radix2 fexp (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) *)
now apply generic_format_canonic.
rewrite <- (Rplus_0_r (F2R (Float radix2 (Zpos mx) ex))).
apply Rplus_le_compat_l.
now apply F2R_le_0_compat.
(* . *)
generalize (binary_normalize_correct m mz ez szero).
case Rlt_bool_spec.
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
split; try easy. split; try easy.
(* Goal: forall (m1 m2 : positive) (e1 e2 : Z), Rlt (Rmult (Z2R (Z.opp (Zpos m1))) (bpow radix2 e1)) (Rmult (Z2R (Zpos m2)) (bpow radix2 e2)) *)
(* Goal: @eq (option comparison) (if b then if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end else if b then if b0 then match Z.compare e e1 with | Eq => @Some comparison (CompOpp (Pos.compare_cont Eq m m0)) | Lt => @Some comparison Gt | Gt => @Some comparison Lt end else @Some comparison Lt else if b0 then @Some comparison Gt else match Z.compare e e1 with | Eq => @Some comparison (Pos.compare_cont Eq m m0) | Lt => @Some comparison Lt | Gt => @Some comparison Gt end) (@Some comparison (Rcompare (@F2R radix2 (Float radix2 (cond_Zopp b (Zpos m)) e)) (@F2R radix2 (Float radix2 (cond_Zopp b0 (Zpos m0)) e1)))) *)
destruct (Rcompare_spec (F2R (beta:=radix2) {| Fnum := mz; Fexp := ez |}) 0); try easy.
rewrite H1 in Hp.
apply Rplus_opp_r_uniq in Hp.
rewrite <- F2R_Zopp in Hp.
eapply canonic_unicity in Hp.
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
inversion Hp. destruct sy, sx, m; try discriminate H3; easy.
(* Goal: canonic radix2 fexp (Float radix2 (cond_Zopp sy (Zpos my)) ey) *)
(* Goal: @eq binary_float (B754_finite sx mx ex Hx) (B754_finite sy my ey Hy) *)
apply canonic_canonic_mantissa.
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
apply Bool.andb_true_iff in Hy. easy.
replace (-cond_Zopp sx (Z.pos mx))%Z with  (cond_Zopp (negb sx) (Z.pos mx))
  by (destruct sx; auto).
(* Goal: canonic radix2 fexp (Float radix2 (cond_Zopp sy (Zpos my)) ey) *)
(* Goal: @eq binary_float (B754_finite sx mx ex Hx) (B754_finite sy my ey Hy) *)
apply canonic_canonic_mantissa.
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
apply Bool.andb_true_iff in Hx. easy.
intros Hz' Vz.
specialize (Sz Hz').
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
split.
rewrite Vz.
(* Goal: @eq binary_float (B754_finite sy my ey Hx) (B754_finite sy my ey Hy) *)
now apply f_equal.
apply Sz.
Qed.

(** Subtraction *)

Definition Bminus minus_nan m x y := Bplus minus_nan m x (Bopp pair y).

Theorem Bminus_correct :
  forall minus_nan m x y,
  is_finite x = true ->
  is_finite y = true ->
  if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (B2R x - B2R y))) (bpow radix2 emax) then
    B2R (Bminus minus_nan m x y) = round radix2 fexp (round_mode m) (B2R x - B2R y) /\
    is_finite (Bminus minus_nan m x y) = true /\
    Bsign (Bminus minus_nan m x y) =
      match Rcompare (B2R x - B2R y) 0 with
        | Eq => match m with mode_DN => orb (Bsign x) (negb (Bsign y))
                                 | _ => andb (Bsign x) (negb (Bsign y)) end
        | Lt => true
        | Gt => false
      end
  else
    (B2FF (Bminus minus_nan m x y) = binary_overflow m (Bsign x) /\ Bsign x = negb (Bsign y)).
Proof with auto with typeclass_instances.
intros m minus_nan x y Fx Fy.
replace (negb (Bsign y)) with (Bsign (Bopp pair y)).
unfold Rminus.
erewrite <- B2R_Bopp.
apply Bplus_correct.
exact Fx.
(* Goal: @eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false *)
rewrite is_finite_Bopp. auto. now destruct y as [ | | | ].
Qed.

(** Division *)

Definition Fdiv_core_binary m1 e1 m2 e2 :=
  let d1 := Zdigits2 m1 in
  let d2 := Zdigits2 m2 in
  let e := (e1 - e2)%Z in
  let (m, e') :=
    match (d2 + prec - d1)%Z with
    | Zpos p => (Z.shiftl m1 (Zpos p), e + Zneg p)%Z
    | _ => (m1, e)
    end in
  let '(q, r) :=  Zfast_div_eucl m m2 in
  (q, e', new_location m2 r loc_Exact).

Lemma Bdiv_correct_aux :
  forall m sx mx ex sy my ey,
  let x := F2R (Float radix2 (cond_Zopp sx (Zpos mx)) ex) in
  let y := F2R (Float radix2 (cond_Zopp sy (Zpos my)) ey) in
  let z :=
    let '(mz, ez, lz) := Fdiv_core_binary (Zpos mx) ex (Zpos my) ey in
    match mz with
    | Zpos mz => binary_round_aux m (xorb sx sy) mz ez lz
    | _ => F754_nan false xH (* dummy *)
    end in
  valid_binary z = true /\
  if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (x / y))) (bpow radix2 emax) then
    FF2R radix2 z = round radix2 fexp (round_mode m) (x / y) /\
    is_finite_FF z = true /\ sign_FF z = xorb sx sy
  else
    z = binary_overflow m (xorb sx sy).
Proof.
(* Goal: forall (m : mode) (sx : bool) (mx : positive) (ex : Z) (sy : bool) (my : positive) (ey : Z), let x := @F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex) in let y := @F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey) in let z := match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end in and (@eq bool (valid_binary z) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv x y))) (bpow radix2 emax) then and (@eq R (FF2R radix2 z) (round radix2 fexp (round_mode m) (Rdiv x y))) (and (@eq bool (is_finite_FF z) true) (@eq bool (sign_FF z) (xorb sx sy))) else @eq full_float z (binary_overflow m (xorb sx sy))) *)
intros m sx mx ex sy my ey.
(* Goal: let x := @F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex) in let y := @F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey) in let z := match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end in and (@eq bool (valid_binary z) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv x y))) (bpow radix2 emax) then and (@eq R (FF2R radix2 z) (round radix2 fexp (round_mode m) (Rdiv x y))) (and (@eq bool (is_finite_FF z) true) (@eq bool (sign_FF z) (xorb sx sy))) else @eq full_float z (binary_overflow m (xorb sx sy))) *)
replace (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) with (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey).
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
refine (_ (Fdiv_core_correct radix2 prec (Zpos mx) ex (Zpos my) ey _ _ _)) ; try easy.
(* Goal: forall _ : let 'pair (pair m e as p) l := Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey in and (Z.le prec (Zdigits radix2 m)) (inbetween_float radix2 m e (Rdiv (@F2R radix2 (Float radix2 (Zpos mx) ex)) (@F2R radix2 (Float radix2 (Zpos my) ey))) l), and (@eq bool (valid_binary match Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
destruct (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) as ((mz, ez), lz).
(* Goal: forall _ : and (Z.le prec (Zdigits radix2 mz)) (inbetween_float radix2 mz ez (Rdiv (@F2R radix2 (Float radix2 (Zpos mx) ex)) (@F2R radix2 (Float radix2 (Zpos my) ey))) lz), and (@eq bool (valid_binary match mz with | Z0 => F754_nan false xH | Zpos mz => binary_round_aux m (xorb sx sy) mz ez lz | Zneg p => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match mz with | Z0 => F754_nan false xH | Zpos mz => binary_round_aux m (xorb sx sy) mz ez lz | Zneg p => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match mz with | Z0 => F754_nan false xH | Zpos mz => binary_round_aux m (xorb sx sy) mz ez lz | Zneg p => F754_nan false xH end) true) (@eq bool (sign_FF match mz with | Z0 => F754_nan false xH | Zpos mz => binary_round_aux m (xorb sx sy) mz ez lz | Zneg p => F754_nan false xH end) (xorb sx sy))) else @eq full_float match mz with | Z0 => F754_nan false xH | Zpos mz => binary_round_aux m (xorb sx sy) mz ez lz | Zneg p => F754_nan false xH end (binary_overflow m (xorb sx sy))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
intros (Pz, Bz).
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
simpl.
replace (xorb sx sy) with (Rlt_bool (F2R (Float radix2 (cond_Zopp sx (Zpos mx)) ex) *
  / F2R (Float radix2 (cond_Zopp sy (Zpos my)) ey)) 0).
(* Goal: forall y : if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy)), if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (B2R (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) true) (forall _ : @eq bool (is_nan (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) false, @eq bool (Bsign (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) (xorb sx sy))) else @eq full_float (B2FF (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) (binary_overflow m (xorb sx sy)) *)
unfold Rdiv.
(* Goal: and (@eq bool (valid_binary match mz with | Z0 => F754_nan false xH | Zpos mz => binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz | Zneg p => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match mz with | Z0 => F754_nan false xH | Zpos mz => binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz | Zneg p => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match mz with | Z0 => F754_nan false xH | Zpos mz => binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz | Zneg p => F754_nan false xH end) true) (@eq bool (sign_FF match mz with | Z0 => F754_nan false xH | Zpos mz => binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz | Zneg p => F754_nan false xH end) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float match mz with | Z0 => F754_nan false xH | Zpos mz => binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz | Zneg p => F754_nan false xH end (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
destruct mz as [|mz|mz].
(* . mz = 0 *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: and (@eq bool (valid_binary (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) true) (@eq bool (sign_FF (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
elim (Zlt_irrefl prec).
(* Goal: Z.lt prec prec *)
(* Goal: and (@eq bool (valid_binary (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) true) (@eq bool (sign_FF (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply Zle_lt_trans with Z0.
(* . mz > 0 *)
(* Goal: and (@eq bool (valid_binary (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) true) (@eq bool (sign_FF (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply binary_round_aux_correct.
(* Goal: inbetween_float radix2 (Zpos mz) ez (Rabs (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) lz *)
(* Goal: Z.le ez (fexp (Z.add (Zdigits radix2 (Zpos mz)) ez)) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
rewrite Rabs_mult, Rabs_Rinv.
now rewrite <- 2!F2R_Zabs, 2!abs_cond_Zopp.
(* Goal: not (@eq R (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)) (IZR Z0)) *)
(* Goal: Z.le ez (fexp (Z.add (Zdigits radix2 (Zpos mz)) ez)) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
case sy.
(* Goal: not (@eq R (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos my)) ey)) (IZR Z0)) *)
(* Goal: not (@eq R (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos my)) ey)) (IZR Z0)) *)
(* Goal: Z.le ez (fexp (Z.add (Zdigits radix2 (Zpos mz)) ez)) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rlt_not_eq.
(* Goal: Rlt (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
now apply F2R_lt_0_compat.
(* Goal: not (@eq R (@F2R radix2 (Float radix2 (Zpos my) ey)) (IZR Z0)) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb sx false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rgt_not_eq.
(* Goal: Rlt (IZR Z0) (@F2R radix2 (Float radix2 (Zpos my) ey)) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_gt_0_compat.
(* Goal: Z.le ez (fexp (Z.add (Zdigits radix2 (Zpos mz)) ez)) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
revert Pz.
(* Goal: forall _ : Z.le prec (Zdigits radix2 (Zpos mz)), Z.le ez (fexp (Z.add (Zdigits radix2 (Zpos mz)) ez)) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
generalize (Zdigits radix2 (Zpos mz)).
(* Goal: forall (z : Z) (_ : Z.le prec z), Z.le ez (fexp (Z.add z ez)) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
unfold fexp, FLT_exp.
(* Goal: forall (z : Z) (_ : Z.le prec z), Z.le ez (Z.max (Z.sub (Z.add z ez) prec) emin) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
clear.
(* Goal: forall (z : Z) (_ : Z.le prec z), Z.le ez (Z.max (Z.sub (Z.add z ez) prec) emin) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
intros ; zify ; subst.
(* Goal: Z.le ez z1 *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
omega.
(* . mz < 0 *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
elim Rlt_not_le with (1 := proj2 (inbetween_float_bounds _ _ _ _ _ Bz)).
(* Goal: Rle (@F2R radix2 (Float radix2 (Z.add (Zneg mz) (Zpos xH)) ez)) (Rdiv (@F2R radix2 (Float radix2 (Zpos mx) ex)) (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rle_trans with R0.
(* Goal: Rle (@F2R radix2 (Float radix2 (Z.add (Zneg mz) (Zpos xH)) ez)) R0 *)
(* Goal: Rle R0 (Rdiv (@F2R radix2 (Float radix2 (Zpos mx) ex)) (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply F2R_le_0_compat.
(* Goal: Z.le (@Fnum radix2 (Float radix2 (Z.add (Zneg mz) (Zpos xH)) ez)) Z0 *)
(* Goal: Rle R0 (Rdiv (@F2R radix2 (Float radix2 (Zpos mx) ex)) (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now case mz.
(* Goal: Rle (IZR Z0) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rmult_le_pos.
(* Goal: Rle (IZR Z0) (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) *)
(* Goal: Rle (IZR Z0) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_ge_0_compat.
(* Goal: Rle (IZR Z0) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rlt_le.
(* Goal: Rlt (IZR Z0) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rinv_0_lt_compat.
(* Goal: Rlt (IZR Z0) (@F2R radix2 (Float radix2 (Zpos my) ey)) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_gt_0_compat.
(* *)
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
case sy ; simpl.
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zneg my) ey)))) (IZR Z0)) (xorb sx true) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb sx false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
change (Zneg my) with (Zopp (Zpos my)).
(* Goal: Rlt (Rmult (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb false false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
rewrite F2R_Zopp.
rewrite <- Ropp_inv_permute.
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Ropp (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey))))) (IZR Z0)) (xorb sx true) *)
(* Goal: not (@eq R (@F2R radix2 (Float radix2 (Zpos my) ey)) (IZR Z0)) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb sx false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
rewrite Ropp_mult_distr_r_reverse.
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
case sx ; simpl.
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb false false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rlt_bool_false.
rewrite <- Ropp_mult_distr_l_reverse.
(* Goal: Rle (IZR Z0) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rmult_le_pos.
rewrite <- F2R_opp.
(* Goal: Rle (IZR Z0) (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) *)
(* Goal: Rle (IZR Z0) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_ge_0_compat.
(* Goal: Rle (IZR Z0) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rlt_le.
(* Goal: Rlt (IZR Z0) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rinv_0_lt_compat.
(* Goal: Rlt (IZR Z0) (@F2R radix2 (Float radix2 (Zpos my) ey)) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_gt_0_compat.
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb true false) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb false false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rlt_bool_true.
rewrite <- Ropp_0.
(* Goal: Rlt (Ropp (Rmult (@F2R radix2 (Float radix2 (Zpos mx) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey))))) (Ropp (IZR Z0)) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb false false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Ropp_lt_contravar.
(* Goal: Rlt (IZR Z0) (Rmult (@F2R radix2 (Float radix2 (Zpos mx) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb false false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rmult_lt_0_compat.
(* Goal: Rlt (IZR Z0) (@F2R radix2 (Float radix2 (Zpos my) ey)) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_gt_0_compat.
(* Goal: Rlt (IZR Z0) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rinv_0_lt_compat.
(* Goal: Rlt (IZR Z0) (@F2R radix2 (Float radix2 (Zpos my) ey)) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_gt_0_compat.
(* Goal: not (@eq R (@F2R radix2 (Float radix2 (Zpos my) ey)) (IZR Z0)) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb sx false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rgt_not_eq.
(* Goal: Rlt (IZR Z0) (@F2R radix2 (Float radix2 (Zpos my) ey)) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_gt_0_compat.
(* Goal: and (@eq R (B2R (if sx then B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) else FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex))))) (and (@eq bool (is_finite (if sx then B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) else FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (if sx then false else true)) (forall _ : @eq bool (is_nan (if sx then B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) else FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (if sx then B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) else FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) sx)) *)
case sx.
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb true false) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb false false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rlt_bool_true.
(* Goal: Rlt (Rmult (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb false false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
rewrite F2R_Zopp.
(* Goal: Rlt (Rmult (Ropp (@F2R radix2 (Float radix2 (Zpos mx) ex))) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb false false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
rewrite Ropp_mult_distr_l_reverse.
rewrite <- Ropp_0.
(* Goal: Rlt (Ropp (Rmult (@F2R radix2 (Float radix2 (Zpos mx) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey))))) (Ropp (IZR Z0)) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb false false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Ropp_lt_contravar.
(* Goal: Rlt (IZR Z0) (Rmult (@F2R radix2 (Float radix2 (Zpos mx) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb false false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rmult_lt_0_compat.
(* Goal: Rlt (IZR Z0) (@F2R radix2 (Float radix2 (Zpos my) ey)) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_gt_0_compat.
(* Goal: Rlt (IZR Z0) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rinv_0_lt_compat.
(* Goal: Rlt (IZR Z0) (@F2R radix2 (Float radix2 (Zpos my) ey)) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_gt_0_compat.
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) (IZR Z0)) (xorb false false) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rlt_bool_false.
(* Goal: Rle (IZR Z0) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rmult_le_pos.
(* Goal: Rle (IZR Z0) (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) *)
(* Goal: Rle (IZR Z0) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_ge_0_compat.
(* Goal: Rle (IZR Z0) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rlt_le.
(* Goal: Rlt (IZR Z0) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rinv_0_lt_compat.
(* Goal: Rlt (IZR Z0) (@F2R radix2 (Float radix2 (Zpos my) ey)) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_gt_0_compat.
(* *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
unfold Fdiv_core_binary, Fdiv_core.
(* Goal: @eq (prod (prod Z Z) location) (let (m, e') := match Z.sub (Z.add (Zdigits radix2 (Zpos my)) prec) (Zdigits radix2 (Zpos mx)) with | Z0 => @pair Z Z (Zpos mx) (Z.sub ex ey) | Zpos p => @pair Z Z (Z.mul (Zpos mx) (Z.pow_pos (radix_val radix2) p)) (Z.add (Z.sub ex ey) (Zneg p)) | Zneg p => @pair Z Z (Zpos mx) (Z.sub ex ey) end in let 'pair q r := Z.div_eucl m (Zpos my) in @pair (prod Z Z) location (@pair Z Z q e') (new_location (Zpos my) r loc_Exact)) (let (m, e') := match Z.sub (Z.add (Zdigits2 (Zpos my)) prec) (Zdigits2 (Zpos mx)) with | Z0 => @pair Z Z (Zpos mx) (Z.sub ex ey) | Zpos p => @pair Z Z (Z.shiftl (Zpos mx) (Zpos p)) (Z.add (Z.sub ex ey) (Zneg p)) | Zneg p => @pair Z Z (Zpos mx) (Z.sub ex ey) end in let 'pair q r := Zfast_div_eucl m (Zpos my) in @pair (prod Z Z) location (@pair Z Z q e') (new_location (Zpos my) r loc_Exact)) *)
rewrite 2!Zdigits2_Zdigits.
(* Goal: @eq (prod (prod Z Z) location) (let (m, e') := match Z.sub (Z.add (Zdigits radix2 (Zpos my)) prec) (Zdigits radix2 (Zpos mx)) with | Z0 => @pair Z Z (Zpos mx) (Z.sub ex ey) | Zpos p => @pair Z Z (Z.mul (Zpos mx) (Z.pow_pos (radix_val radix2) p)) (Z.add (Z.sub ex ey) (Zneg p)) | Zneg p => @pair Z Z (Zpos mx) (Z.sub ex ey) end in let 'pair q r := Z.div_eucl m (Zpos my) in @pair (prod Z Z) location (@pair Z Z q e') (new_location (Zpos my) r loc_Exact)) (let (m, e') := match Z.sub (Z.add (Zdigits radix2 (Zpos my)) prec) (Zdigits radix2 (Zpos mx)) with | Z0 => @pair Z Z (Zpos mx) (Z.sub ex ey) | Zpos p => @pair Z Z (Z.shiftl (Zpos mx) (Zpos p)) (Z.add (Z.sub ex ey) (Zneg p)) | Zneg p => @pair Z Z (Zpos mx) (Z.sub ex ey) end in let 'pair q r := Zfast_div_eucl m (Zpos my) in @pair (prod Z Z) location (@pair Z Z q e') (new_location (Zpos my) r loc_Exact)) *)
change 2%Z with (radix_val radix2).
destruct (Zdigits radix2 (Z.pos my) + prec - Zdigits radix2 (Z.pos mx))%Z as [|p|p].
(* Goal: @eq (prod (prod Z Z) location) (let 'pair q r := Z.div_eucl (Zpos mx) (Zpos my) in @pair (prod Z Z) location (@pair Z Z q (Z.sub ex ey)) (new_location (Zpos my) r loc_Exact)) (let 'pair q r := Zfast_div_eucl (Zpos mx) (Zpos my) in @pair (prod Z Z) location (@pair Z Z q (Z.sub ex ey)) (new_location (Zpos my) r loc_Exact)) *)
now rewrite Zfast_div_eucl_correct.
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
rewrite Z.shiftl_mul_pow2 by easy.
(* Goal: @eq (prod (prod Z Z) location) (let 'pair q r := Z.div_eucl (Zpos mx) (Zpos my) in @pair (prod Z Z) location (@pair Z Z q (Z.sub ex ey)) (new_location (Zpos my) r loc_Exact)) (let 'pair q r := Zfast_div_eucl (Zpos mx) (Zpos my) in @pair (prod Z Z) location (@pair Z Z q (Z.sub ex ey)) (new_location (Zpos my) r loc_Exact)) *)
now rewrite Zfast_div_eucl_correct.
(* Goal: @eq (prod (prod Z Z) location) (let 'pair q r := Z.div_eucl (Zpos mx) (Zpos my) in @pair (prod Z Z) location (@pair Z Z q (Z.sub ex ey)) (new_location (Zpos my) r loc_Exact)) (let 'pair q r := Zfast_div_eucl (Zpos mx) (Zpos my) in @pair (prod Z Z) location (@pair Z Z q (Z.sub ex ey)) (new_location (Zpos my) r loc_Exact)) *)
now rewrite Zfast_div_eucl_correct.
Qed.

Definition Bdiv div_nan m x y :=
  let f pl := B754_nan (fst pl) (snd pl) in
  match x, y with
  | B754_nan _ _, _ | _, B754_nan _ _ => f (div_nan x y)
  | B754_infinity sx, B754_infinity sy => f (div_nan x y)
  | B754_infinity sx, B754_finite sy _ _ _ => B754_infinity (xorb sx sy)
  | B754_finite sx _ _ _, B754_infinity sy => B754_zero (xorb sx sy)
  | B754_infinity sx, B754_zero sy => B754_infinity (xorb sx sy)
  | B754_zero sx, B754_infinity sy => B754_zero (xorb sx sy)
  | B754_finite sx _ _ _, B754_zero sy => B754_infinity (xorb sx sy)
  | B754_zero sx, B754_finite sy _ _ _ => B754_zero (xorb sx sy)
  | B754_zero sx, B754_zero sy => f (div_nan x y)
  | B754_finite sx mx ex _, B754_finite sy my ey _ =>
    FF2B _ (proj1 (Bdiv_correct_aux m sx mx ex sy my ey))
  end.

Theorem Bdiv_correct :
  forall div_nan m x y,
  B2R y <> 0%R ->
  if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (B2R x / B2R y))) (bpow radix2 emax) then
    B2R (Bdiv div_nan m x y) = round radix2 fexp (round_mode m) (B2R x / B2R y) /\
    is_finite (Bdiv div_nan m x y) = is_finite x /\
    (is_nan (Bdiv div_nan m x y) = false ->
      Bsign (Bdiv div_nan m x y) = xorb (Bsign x) (Bsign y))
  else
    B2FF (Bdiv div_nan m x y) = binary_overflow m (xorb (Bsign x) (Bsign y)).
Proof.
(* Goal: forall (div_nan : forall (_ : binary_float) (_ : binary_float), prod bool nan_pl) (m : mode) (x y : binary_float) (_ : not (@eq R (B2R y) (IZR Z0))), if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (B2R x) (B2R y)))) (bpow radix2 emax) then and (@eq R (B2R (Bdiv div_nan m x y)) (round radix2 fexp (round_mode m) (Rdiv (B2R x) (B2R y)))) (and (@eq bool (is_finite (Bdiv div_nan m x y)) (is_finite x)) (forall _ : @eq bool (is_nan (Bdiv div_nan m x y)) false, @eq bool (Bsign (Bdiv div_nan m x y)) (xorb (Bsign x) (Bsign y)))) else @eq full_float (B2FF (Bdiv div_nan m x y)) (binary_overflow m (xorb (Bsign x) (Bsign y))) *)
intros div_nan m x [sy|sy|sy ply|sy my ey Hy] Zy ; try now elim Zy.
(* Goal: if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (B2R x) (B2R (B754_finite sy my ey Hy))))) (bpow radix2 emax) then and (@eq R (B2R (Bdiv div_nan m x (B754_finite sy my ey Hy))) (round radix2 fexp (round_mode m) (Rdiv (B2R x) (B2R (B754_finite sy my ey Hy))))) (and (@eq bool (is_finite (Bdiv div_nan m x (B754_finite sy my ey Hy))) (is_finite x)) (forall _ : @eq bool (is_nan (Bdiv div_nan m x (B754_finite sy my ey Hy))) false, @eq bool (Bsign (Bdiv div_nan m x (B754_finite sy my ey Hy))) (xorb (Bsign x) (Bsign (B754_finite sy my ey Hy))))) else @eq full_float (B2FF (Bdiv div_nan m x (B754_finite sy my ey Hy))) (binary_overflow m (xorb (Bsign x) (Bsign (B754_finite sy my ey Hy)))) *)
revert x.
(* Goal: forall y : if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy)), if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (B2R (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) true) (forall _ : @eq bool (is_nan (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) false, @eq bool (Bsign (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) (xorb sx sy))) else @eq full_float (B2FF (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) (binary_overflow m (xorb sx sy)) *)
unfold Rdiv.
intros [sx|sx|sx plx|sx mx ex Hx] ;
  try ( rewrite Rmult_0_l, round_0, Rabs_R0, Rlt_bool_true ; [ now repeat constructor | apply bpow_gt_0 | auto with typeclass_instances ] ).
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
simpl.
(* Goal: if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (B2R (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (Bdiv_correct_aux m sx mx ex sy my ey)))) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (Bdiv_correct_aux m sx mx ex sy my ey)))) true) (forall _ : @eq bool (is_nan (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (Bdiv_correct_aux m sx mx ex sy my ey)))) false, @eq bool (Bsign (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (Bdiv_correct_aux m sx mx ex sy my ey)))) (xorb sx sy))) else @eq full_float (B2FF (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (Bdiv_correct_aux m sx mx ex sy my ey)))) (binary_overflow m (xorb sx sy)) *)
case Bdiv_correct_aux.
(* Goal: forall (e : @eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (y : if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))), if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (B2R (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) e y)))) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) e y)))) true) (forall _ : @eq bool (is_nan (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) e y)))) false, @eq bool (Bsign (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) e y)))) (xorb sx sy))) else @eq full_float (B2FF (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) e y)))) (binary_overflow m (xorb sx sy)) *)
intros H1.
(* Goal: forall y : if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy)), if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (B2R (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) true) (forall _ : @eq bool (is_nan (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) false, @eq bool (Bsign (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) (xorb sx sy))) else @eq full_float (B2FF (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) (binary_overflow m (xorb sx sy)) *)
unfold Rdiv.
(* Goal: forall y : if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy)), if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (B2R (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) true) (forall _ : @eq bool (is_nan (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) false, @eq bool (Bsign (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) (xorb sx sy))) else @eq full_float (B2FF (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) else @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) (binary_overflow m (xorb sx sy)) *)
case Rlt_bool.
(* Goal: forall y : and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))), and (@eq R (B2R (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy)))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy)))) H1 y)))) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy)))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy)))) H1 y)))) true) (forall _ : @eq bool (is_nan (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy)))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy)))) H1 y)))) false, @eq bool (Bsign (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy)))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy)))) H1 y)))) (xorb sx sy))) *)
(* Goal: forall y : @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy)), @eq full_float (B2FF (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) (binary_overflow m (xorb sx sy)) *)
intros (H2, (H3, H4)).
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
split.
(* Goal: @eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)))) *)
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
now rewrite B2R_FF2B.
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
split.
(* Goal: @eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true *)
(* Goal: forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false *)
now rewrite is_finite_FF2B.
(* Goal: forall _ : @eq bool (is_nan (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy)))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy)))) H1 (@conj (@eq R (FF2R radix2 match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy))) H2 (@conj (@eq bool (is_finite_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy)) H3 H4)))))) false, @eq bool (sign_FF match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (xorb sx sy) *)
(* Goal: forall y : @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy)), @eq full_float (B2FF (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) (binary_overflow m (xorb sx sy)) *)
rewrite Bsign_FF2B. congruence.
(* Goal: forall y : @eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy)), @eq full_float (B2FF (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 y)))) (binary_overflow m (xorb sx sy)) *)
intros H2.
(* Goal: @eq full_float (B2FF (FF2B match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) (@conj (@eq bool (valid_binary match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq full_float match Fdiv_core_binary (Zpos mx) ex (Zpos my) ey with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m (xorb sx sy) mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (binary_overflow m (xorb sx sy))) H1 H2)))) (binary_overflow m (xorb sx sy)) *)
now rewrite B2FF_FF2B.
Qed.

(** Square root *)

Definition Fsqrt_core_binary m e :=
  let d := Zdigits2 m in
  let s := Zmax (2 * prec - d) 0 in
  let e' := (e - s)%Z in
  let (s', e'') := if Zeven e' then (s, e') else (s + 1, e' - 1)%Z in
  let m' :=
    match s' with
    | Zpos p => Z.shiftl m (Zpos p)
    | _ => m
    end in
  let (q, r) := Z.sqrtrem m' in
  let l :=
    if Zeq_bool r 0 then loc_Exact
    else loc_Inexact (if Zle_bool r q then Lt else Gt) in
  (q, Zdiv2 e'', l).

Lemma Bsqrt_correct_aux :
  forall m mx ex (Hx : bounded mx ex = true),
  let x := F2R (Float radix2 (Zpos mx) ex) in
  let z :=
    let '(mz, ez, lz) := Fsqrt_core_binary (Zpos mx) ex in
    match mz with
    | Zpos mz => binary_round_aux m false mz ez lz
    | _ => F754_nan false xH (* dummy *)
    end in
  valid_binary z = true /\
  FF2R radix2 z = round radix2 fexp (round_mode m) (sqrt x) /\
  is_finite_FF z = true /\ sign_FF z = false.
Proof with auto with typeclass_instances.
intros m mx ex Hx.
replace (Fsqrt_core_binary (Zpos mx) ex) with (Fsqrt_core radix2 prec (Zpos mx) ex).
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
simpl.
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
refine (_ (Fsqrt_core_correct radix2 prec (Zpos mx) ex _)) ; try easy.
destruct (Fsqrt_core radix2 prec (Zpos mx) ex) as ((mz, ez), lz).
(* Goal: forall _ : and (Z.le prec (Zdigits radix2 mz)) (inbetween_float radix2 mz ez (Rdiv (@F2R radix2 (Float radix2 (Zpos mx) ex)) (@F2R radix2 (Float radix2 (Zpos my) ey))) lz), and (@eq bool (valid_binary match mz with | Z0 => F754_nan false xH | Zpos mz => binary_round_aux m (xorb sx sy) mz ez lz | Zneg p => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match mz with | Z0 => F754_nan false xH | Zpos mz => binary_round_aux m (xorb sx sy) mz ez lz | Zneg p => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rdiv (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey))))) (and (@eq bool (is_finite_FF match mz with | Z0 => F754_nan false xH | Zpos mz => binary_round_aux m (xorb sx sy) mz ez lz | Zneg p => F754_nan false xH end) true) (@eq bool (sign_FF match mz with | Z0 => F754_nan false xH | Zpos mz => binary_round_aux m (xorb sx sy) mz ez lz | Zneg p => F754_nan false xH end) (xorb sx sy))) else @eq full_float match mz with | Z0 => F754_nan false xH | Zpos mz => binary_round_aux m (xorb sx sy) mz ez lz | Zneg p => F754_nan false xH end (binary_overflow m (xorb sx sy))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
intros (Pz, Bz).
(* Goal: and (@eq bool (valid_binary match mz with | Z0 => F754_nan false xH | Zpos mz => binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz | Zneg p => F754_nan false xH end) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 match mz with | Z0 => F754_nan false xH | Zpos mz => binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz | Zneg p => F754_nan false xH end) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF match mz with | Z0 => F754_nan false xH | Zpos mz => binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz | Zneg p => F754_nan false xH end) true) (@eq bool (sign_FF match mz with | Z0 => F754_nan false xH | Zpos mz => binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz | Zneg p => F754_nan false xH end) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float match mz with | Z0 => F754_nan false xH | Zpos mz => binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz | Zneg p => F754_nan false xH end (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
destruct mz as [|mz|mz].
(* . mz = 0 *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: and (@eq bool (valid_binary (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) true) (@eq bool (sign_FF (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
elim (Zlt_irrefl prec).
(* Goal: Z.lt prec prec *)
(* Goal: and (@eq bool (valid_binary (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) true) (@eq bool (sign_FF (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (binary_round_aux m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) mz ez lz) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply Zle_lt_trans with Z0.
(* . mz > 0 *)
refine (_ (binary_round_aux_correct m (sqrt (F2R (Float radix2 (Zpos mx) ex))) mz ez lz _ _)).
rewrite Rlt_bool_false. 2: apply sqrt_ge_0.
rewrite Rlt_bool_true.
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
easy.
(* .. *)
rewrite Rabs_pos_eq.
refine (_ (relative_error_FLT_ex radix2 emin prec (prec_gt_0 prec) (round_mode m) (sqrt (F2R (Float radix2 (Zpos mx) ex))) _)).
fold fexp.
intros (eps, (Heps, Hr)).
rewrite Hr.
assert (Heps': (Rabs eps < 1)%R).
apply Rlt_le_trans with (1 := Heps).
fold (bpow radix2 0).
apply bpow_le.
generalize (prec_gt_0 prec).
clear ; omega.
apply Rsqr_incrst_0.
3: apply bpow_ge_0.
rewrite Rsqr_mult.
rewrite Rsqr_sqrt.
(* Goal: Rle (IZR Z0) (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) *)
(* Goal: Rle (IZR Z0) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
2: now apply F2R_ge_0_compat.
unfold Rsqr.
apply Rmult_ge_0_gt_0_lt_compat.
apply Rle_ge.
apply Rle_0_sqr.
apply bpow_gt_0.
(* Goal: Rlt (@F2R radix2 (Float radix2 (Z.abs (Zpos mx)) ex)) (bpow radix2 emax) *)
now apply bounded_lt_emax.
apply Rlt_le_trans with 4%R.
apply Rsqr_incrst_1.
apply Rplus_lt_compat_l.
apply (Rabs_lt_inv _ _ Heps').
rewrite <- (Rplus_opp_r 1).
apply Rplus_le_compat_l.
(* Goal: Rle (IZR Z0) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rlt_le.
apply (Rabs_lt_inv _ _ Heps').
now apply (Z2R_le 0 2).
change 4%R with (bpow radix2 2).
apply bpow_le.
generalize (prec_gt_0 prec).
clear -Hmax ; omega.
(* Goal: Rle (IZR Z0) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey)))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rmult_le_pos.
apply sqrt_ge_0.
rewrite <- (Rplus_opp_r 1).
apply Rplus_le_compat_l.
(* Goal: Rle (IZR Z0) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rlt_le.
apply (Rabs_lt_inv _ _ Heps').
rewrite Rabs_pos_eq.
2: apply sqrt_ge_0.
apply Rsqr_incr_0.
2: apply bpow_ge_0.
2: apply sqrt_ge_0.
rewrite Rsqr_sqrt.
(* Goal: Rle (IZR Z0) (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)) *)
(* Goal: Rle (IZR Z0) (Rinv (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
2: now apply F2R_ge_0_compat.
apply Rle_trans with (bpow radix2 emin).
unfold Rsqr.
rewrite <- bpow_plus.
apply bpow_le.
(* Goal: forall (z z0 z1 : Z) (_ : Z.lt Z0 z) (_ : Z.lt Z0 z0) (_ : Z.le (Z.sub (Z.add z z0) (Zpos xH)) z1) (_ : @eq Z (Z.max (Z.sub (Z.add z ex) prec) emin) ex) (_ : @eq Z (Z.max (Z.sub (Z.add z0 ey) prec) emin) ey), Z.le (Z.add ex ey) (Z.max (Z.sub (Z.add z1 (Z.add ex ey)) prec) emin) *)
(* Goal: @eq bool (Rlt_bool (@F2R radix2 (Float radix2 (Z.mul (cond_Zopp sx (Zpos mx)) (cond_Zopp sy (Zpos my))) (Z.add ex ey))) (IZR Z0)) (xorb sx sy) *)
unfold emin.
clear -Hmax ; omega.
apply generic_format_ge_bpow with fexp.
(* Goal: forall (p : positive) (_ : @eq Z (Z.sub ex' ex) (Zneg p)), @eq Z ex' ex' *)
intros.
apply Zle_max_r.
(* Goal: Rlt (IZR Z0) (@F2R radix2 (Float radix2 (Zpos my) ey)) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now apply F2R_gt_0_compat.
(* Goal: generic_format radix2 fexp (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) *)
apply generic_format_canonic.
apply (canonic_canonic_mantissa false).
apply (andb_prop _ _ Hx).
(* .. *)
apply round_ge_generic...
apply generic_format_0.
apply sqrt_ge_0.
rewrite Rabs_pos_eq.
exact Bz.
apply sqrt_ge_0.
(* Goal: Z.le ez (fexp (Z.add (Zdigits radix2 (Zpos mz)) ez)) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
revert Pz.
(* Goal: forall _ : Z.le prec (Zdigits radix2 (Zpos mz)), Z.le ez (fexp (Z.add (Zdigits radix2 (Zpos mz)) ez)) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
generalize (Zdigits radix2 (Zpos mz)).
(* Goal: forall (z : Z) (_ : Z.le prec z), Z.le ez (fexp (Z.add z ez)) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
unfold fexp, FLT_exp.
(* Goal: forall (z : Z) (_ : Z.le prec z), Z.le ez (Z.max (Z.sub (Z.add z ez) prec) emin) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
clear.
(* Goal: forall (z : Z) (_ : Z.le prec z), Z.le ez (Z.max (Z.sub (Z.add z ez) prec) emin) *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
intros ; zify ; subst.
(* Goal: Z.le ez z1 *)
(* Goal: and (@eq bool (valid_binary (F754_nan false xH)) true) (if Rlt_bool (Rabs (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (bpow radix2 emax) then and (@eq R (FF2R radix2 (F754_nan false xH)) (round radix2 fexp (round_mode m) (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))))) (and (@eq bool (is_finite_FF (F754_nan false xH)) true) (@eq bool (sign_FF (F754_nan false xH)) (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) else @eq full_float (F754_nan false xH) (binary_overflow m (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
omega.
(* . mz < 0 *)
elim Rlt_not_le  with (1 := proj2 (inbetween_float_bounds _ _ _ _ _ Bz)).
(* Goal: Rle (@F2R radix2 (Float radix2 (Z.add (Zneg mz) (Zpos xH)) ez)) (Rdiv (@F2R radix2 (Float radix2 (Zpos mx) ex)) (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply Rle_trans with R0.
(* Goal: Rle (@F2R radix2 (Float radix2 (Z.add (Zneg mz) (Zpos xH)) ez)) R0 *)
(* Goal: Rle R0 (Rdiv (@F2R radix2 (Float radix2 (Zpos mx) ex)) (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
apply F2R_le_0_compat.
(* Goal: Z.le (@Fnum radix2 (Float radix2 (Z.add (Zneg mz) (Zpos xH)) ez)) Z0 *)
(* Goal: Rle R0 (Rdiv (@F2R radix2 (Float radix2 (Zpos mx) ex)) (@F2R radix2 (Float radix2 (Zpos my) ey))) *)
(* Goal: @eq bool (Rlt_bool (Rmult (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex)) (Rinv (@F2R radix2 (Float radix2 (cond_Zopp sy (Zpos my)) ey)))) (IZR Z0)) (xorb sx sy) *)
(* Goal: @eq (prod (prod Z Z) location) (Fdiv_core radix2 prec (Zpos mx) ex (Zpos my) ey) (Fdiv_core_binary (Zpos mx) ex (Zpos my) ey) *)
now case mz.
apply sqrt_ge_0.
(* *)
unfold Fsqrt_core, Fsqrt_core_binary.
(* Goal: forall _ : @eq (prod (prod Z Z) location) (truncate radix2 fexp (@pair (prod Z Z) location (@pair Z Z m e) l)) (@pair (prod Z Z) location (@pair Z Z m' e') l'), @eq (prod shr_record Z) (shr (shr_record_of_loc m l) e (Z.sub (fexp (Z.add (Zdigits2 m) e)) e)) (@pair shr_record Z (shr_record_of_loc m' l') e') *)
rewrite Zdigits2_Zdigits.
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
destruct (if Zeven _ then _ else _) as [[|s'|s'] e''] ; try easy.
now rewrite Z.shiftl_mul_pow2.
Qed.

Definition Bsqrt sqrt_nan m x :=
  let f pl := B754_nan (fst pl) (snd pl) in
  match x with
  | B754_nan sx plx => f (sqrt_nan x)
  | B754_infinity false => x
  | B754_infinity true => f (sqrt_nan x)
  | B754_finite true _ _ _ => f (sqrt_nan x)
  | B754_zero _ => x
  | B754_finite sx mx ex Hx =>
    FF2B _ (proj1 (Bsqrt_correct_aux m mx ex Hx))
  end.

Theorem Bsqrt_correct :
  forall sqrt_nan m x,
  B2R (Bsqrt sqrt_nan m x) = round radix2 fexp (round_mode m) (sqrt (B2R x)) /\
  is_finite (Bsqrt sqrt_nan m x) = match x with B754_zero _ => true | B754_finite false _ _ _ => true | _ => false end /\
  (is_nan (Bsqrt sqrt_nan m x) = false -> Bsign (Bsqrt sqrt_nan m x) = Bsign x).
Proof.
(* Goal: forall (sqrt_nan : forall _ : binary_float, prod bool nan_pl) (m : mode) (x : binary_float), and (@eq R (B2R (Bsqrt sqrt_nan m x)) (round radix2 fexp (round_mode m) (sqrt (B2R x)))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m x)) match x with | B754_zero b => true | B754_infinity b => false | B754_nan b n => false | B754_finite (true as b) m0 e e0 => false | B754_finite (false as b) m0 e e0 => true end) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m x)) false, @eq bool (Bsign (Bsqrt sqrt_nan m x)) (Bsign x))) *)
intros sqrt_nan m [sx|[|]| |sx mx ex Hx] ; try ( now simpl ; rewrite sqrt_0, round_0 ; intuition auto with typeclass_instances ).
(* Goal: and (@eq R (B2R (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (round radix2 fexp (round_mode m) (sqrt (B2R (B754_finite sx mx ex Hx))))) (and (@eq bool (is_finite (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (if sx then false else true)) (forall _ : @eq bool (is_nan (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) false, @eq bool (Bsign (Bsqrt sqrt_nan m (B754_finite sx mx ex Hx))) (Bsign (B754_finite sx mx ex Hx)))) *)
simpl.
(* Goal: and (@eq R (B2R (if sx then B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) else FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (Bsqrt_correct_aux m mx ex Hx)))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex))))) (and (@eq bool (is_finite (if sx then B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) else FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (Bsqrt_correct_aux m mx ex Hx)))) (if sx then false else true)) (forall _ : @eq bool (is_nan (if sx then B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) else FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (Bsqrt_correct_aux m mx ex Hx)))) false, @eq bool (Bsign (if sx then B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) else FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (Bsqrt_correct_aux m mx ex Hx)))) sx)) *)
case Bsqrt_correct_aux.
(* Goal: forall (e : @eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (a : and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))), and (@eq R (B2R (if sx then B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) else FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) e a)))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex))))) (and (@eq bool (is_finite (if sx then B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) else FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) e a)))) (if sx then false else true)) (forall _ : @eq bool (is_nan (if sx then B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) else FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) e a)))) false, @eq bool (Bsign (if sx then B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) else FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) e a)))) sx)) *)
intros H1 (H2, (H3, H4)).
(* Goal: and (@eq R (B2R (if sx then B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) else FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp sx (Zpos mx)) ex))))) (and (@eq bool (is_finite (if sx then B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) else FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (if sx then false else true)) (forall _ : @eq bool (is_nan (if sx then B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) else FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (if sx then B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite sx mx ex Hx))) else FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) sx)) *)
case sx.
(* Goal: and (@eq R (B2R (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex))))) (and (@eq bool (is_finite (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false) (forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true)) *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
refine (conj _ (conj (refl_equal false) _)).
(* Goal: @eq R (B2R (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)))) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
apply sym_eq.
(* Goal: @eq R (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)))) (B2R (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
unfold sqrt.
(* Goal: @eq R (round radix2 fexp (round_mode m) match Rcase_abs (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) with | left r => IZR Z0 | right a => Rsqrt (mknonnegreal (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (Rge_le (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) a)) end) (B2R (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
case Rcase_abs.
(* Goal: forall _ : Rlt (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0), @eq R (round radix2 fexp (round_mode m) (IZR Z0)) (B2R (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) *)
(* Goal: forall r : Rge (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0), @eq R (round radix2 fexp (round_mode m) (Rsqrt (mknonnegreal (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (Rge_le (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) r)))) (B2R (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
intros _.
(* Goal: @eq R (round radix2 fexp (round_mode m) (IZR Z0)) (B2R (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) *)
(* Goal: forall r : Rge (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0), @eq R (round radix2 fexp (round_mode m) (Rsqrt (mknonnegreal (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (Rge_le (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) r)))) (B2R (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
apply round_0.
(* Goal: Valid_rnd (round_mode m) *)
(* Goal: forall r : Rge (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0), @eq R (round radix2 fexp (round_mode m) (Rsqrt (mknonnegreal (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (Rge_le (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) r)))) (B2R (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
auto with typeclass_instances.
(* Goal: forall r : Rge (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0), @eq R (round radix2 fexp (round_mode m) (Rsqrt (mknonnegreal (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (Rge_le (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) r)))) (B2R (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
intros H.
(* Goal: @eq R (round radix2 fexp (round_mode m) (Rsqrt (mknonnegreal (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (Rge_le (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) H)))) (B2R (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
elim Rge_not_lt with (1 := H).
(* Goal: Rlt (@F2R radix2 (Float radix2 (cond_Zopp true (Zpos mx)) ex)) (IZR Z0) *)
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
now apply F2R_lt_0_compat.
(* Goal: forall _ : @eq bool (is_nan (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) false, @eq bool (Bsign (B754_nan (@fst bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))) (@snd bool nan_pl (sqrt_nan (B754_finite true mx ex Hx))))) true *)
(* Goal: and (@eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex))))) (and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false)) *)
easy.
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
split.
(* Goal: @eq R (B2R (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (cond_Zopp false (Zpos mx)) ex)))) *)
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
now rewrite B2R_FF2B.
(* Goal: and (@eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true) (forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false) *)
split.
(* Goal: @eq bool (is_finite (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) true *)
(* Goal: forall _ : @eq bool (is_nan (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false, @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false *)
now rewrite is_finite_FF2B.
(* Goal: @eq bool (Bsign (FF2B match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end (@proj1 (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) (@conj (@eq bool (valid_binary match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (and (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false))) H1 (@conj (@eq R (FF2R radix2 match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) (round radix2 fexp (round_mode m) (sqrt (@F2R radix2 (Float radix2 (Zpos mx) ex))))) (and (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false)) H2 (@conj (@eq bool (is_finite_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) true) (@eq bool (sign_FF match Fsqrt_core_binary (Zpos mx) ex with | pair (pair (Z0 as mz) ez as p) lz => F754_nan false xH | pair (pair (Zpos mz0 as mz) ez as p) lz => binary_round_aux m false mz0 ez lz | pair (pair (Zneg p0 as mz) ez as p) lz => F754_nan false xH end) false) H3 H4)))))) false *)
intro. rewrite Bsign_FF2B. auto.
Qed.

End Binary.
