diff options
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, |