diff options
author | Guillaume Melquiond <guillaume.melquiond@inria.fr> | 2015-09-22 15:41:50 +0200 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@inria.fr> | 2015-09-22 15:41:50 +0200 |
commit | 0af966a42eb60e9af43f9a450d924758a83946c6 (patch) | |
tree | 2bef73e80a8a80da1c47deee66dc825feac45bdd /flocq/Core/Fcore_float_prop.v | |
parent | c212ab7a8adea516db72f17d818393629dbde1b3 (diff) | |
download | compcert-0af966a42eb60e9af43f9a450d924758a83946c6.tar.gz compcert-0af966a42eb60e9af43f9a450d924758a83946c6.zip |
Upgrade to Flocq 2.5.0.
Note: this version of Flocq is compatible with both Coq 8.4 and 8.5.
Diffstat (limited to 'flocq/Core/Fcore_float_prop.v')
-rw-r--r-- | flocq/Core/Fcore_float_prop.v | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/flocq/Core/Fcore_float_prop.v b/flocq/Core/Fcore_float_prop.v index e1535bc9..8199ede6 100644 --- a/flocq/Core/Fcore_float_prop.v +++ b/flocq/Core/Fcore_float_prop.v @@ -233,6 +233,37 @@ rewrite <- F2R_0 with (Fexp f). now apply F2R_lt_compat. Qed. +Theorem F2R_neq_0_compat : + forall f : float beta, + (Fnum f <> 0)%Z -> + (F2R f <> 0)%R. +Proof. +intros f H H1. +apply H. +now apply F2R_eq_0_reg with (Fexp f). +Qed. + + +Lemma Fnum_ge_0_compat: forall (f : float beta), + (0 <= F2R f)%R -> (0 <= Fnum f)%Z. +Proof. +intros f H. +case (Zle_or_lt 0 (Fnum f)); trivial. +intros H1; contradict H. +apply Rlt_not_le. +now apply F2R_lt_0_compat. +Qed. + +Lemma Fnum_le_0_compat: forall (f : float beta), + (F2R f <= 0)%R -> (Fnum f <= 0)%Z. +Proof. +intros f H. +case (Zle_or_lt (Fnum f) 0); trivial. +intros H1; contradict H. +apply Rlt_not_le. +now apply F2R_gt_0_compat. +Qed. + (** Floats and bpow *) Theorem F2R_bpow : forall e : Z, |