Commit 8ceec0c2 authored by Guillaume Melquiond's avatar Guillaume Melquiond

Clean some proofs.

parent 3e0176c2
This diff is collapsed.
......@@ -627,7 +627,7 @@ destruct (Zle_or_lt (fexp1 ex) (fexp2 ex)) as [H2|H2].
[now apply Rplus_le_lt_compat;
[|rewrite Rabs_right; [|apply Rle_ge, Rlt_le]]|].
apply Rle_trans with (2 * bpow (fexp1 ex - 1)).
- rewrite Rmult_plus_distr_r, Rmult_1_l.
- replace (2 * bpow (fexp1 ex - 1)) with (bpow (fexp1 ex - 1) + bpow (fexp1 ex - 1)) by ring.
apply Rplus_le_compat; [|now apply bpow_le; omega].
apply Rle_trans with (bpow (fexp2 ex)); [|now apply bpow_le; omega].
rewrite <- (Rmult_1_l (bpow (fexp2 _))); unfold canonic_exp.
......@@ -645,7 +645,8 @@ destruct (Zle_or_lt (fexp1 ex) (fexp2 ex)) as [H2|H2].
replace (bpow ex) with (/ 2 * (2 * bpow ex)) by field.
rewrite <- Rmult_plus_distr_l; apply Rmult_le_compat_l; [lra|].
apply Rle_trans with (3 * bpow (fexp1 ex - 1)).
+ rewrite (Rmult_plus_distr_r _ 2); rewrite Rmult_1_l; apply Rplus_le_compat.
+ replace (3 * bpow (fexp1 ex - 1)) with (bpow (fexp1 ex - 1) + 2 * bpow (fexp1 ex - 1)) by ring.
apply Rplus_le_compat.
* apply bpow_le; unfold canonic_exp; rewrite Hex'; omega.
* apply Rmult_le_compat_l; [lra|]; apply bpow_le; omega.
+ rewrite <- (Rmult_1_l (bpow (fexp1 _))).
......@@ -1781,8 +1782,8 @@ destruct (Req_dec rd 0) as [Zrd|Nzrd].
rewrite <- Rmult_plus_distr_r.
replace (Z2R m) with (/ 2 * (2 * Z2R m)) by field.
rewrite <- (Rmult_1_r (/ 2)) at 2; rewrite <- Rmult_plus_distr_l.
change 2 with (Z2R 2) at 2; rewrite <- Z2R_mult.
change 1 with (Z2R 1) at 3; rewrite <- Z2R_plus.
change (2 * Z2R m + 1) with (Z2R 2 * Z2R m + Z2R 1).
rewrite <- Z2R_mult, <- Z2R_plus.
rewrite <- Hm.
unfold Zminus; rewrite Zplus_comm; rewrite bpow_plus.
rewrite <- Rmult_assoc; rewrite (Rmult_assoc (/ 2)).
......@@ -1828,7 +1829,7 @@ destruct (Req_dec rd 0) as [Zrd|Nzrd].
rewrite <- Rmult_plus_distr_l.
apply Rlt_le_trans with (/ 2 * (2 * u)).
* apply Rmult_lt_compat_l; [lra|].
rewrite Rmult_plus_distr_r; rewrite Rmult_1_l.
replace (2 * u) with (u + u) by ring.
apply Rplus_lt_compat_l.
unfold u, ulp, canonic_exp; apply bpow_lt.
omega.
......@@ -1859,7 +1860,7 @@ destruct (Req_dec rd 0) as [Zrd|Nzrd].
* rewrite Xmid' at 1.
rewrite <- Rmult_plus_distr_l.
apply Rmult_lt_compat_l; [lra|].
rewrite Rmult_plus_distr_r; rewrite Rmult_1_l.
replace (2 * u) with (u + u) by ring.
apply Rplus_lt_compat_l.
unfold u, ulp, canonic_exp; apply bpow_lt.
omega.
......@@ -1889,7 +1890,7 @@ destruct (Req_dec rd 0) as [Zrd|Nzrd].
apply (Rmult_le_reg_l 2); [lra|].
rewrite <- Rmult_assoc; replace (2 * _) with 1 by field;
rewrite Rmult_1_l.
rewrite Rmult_plus_distr_r; rewrite Rmult_1_l.
replace (2 * bpow (ln_beta x)) with (bpow (ln_beta x) + bpow (ln_beta x)) by ring.
unfold u, ulp, canonic_exp; rewrite <- Hlx.
apply Rplus_le_compat_l; apply bpow_le; omega.
- (* rd <> 0 *)
......@@ -1974,7 +1975,7 @@ destruct (Req_dec rd 0) as [Zrd|Nzrd].
rewrite Rmult_1_l.
rewrite ulp_neq_0; trivial.
unfold canonic_exp; rewrite <- Hlr; change (bpow (fexp1 _)) with u.
rewrite Rmult_plus_distr_r; rewrite Rmult_1_l.
replace (2 * u) with (u + u) by ring.
apply Rplus_lt_compat_l; unfold u, ulp, canonic_exp, f2; apply bpow_lt.
omega. }
rewrite Hl2.
......@@ -1999,7 +2000,8 @@ destruct (Req_dec rd 0) as [Zrd|Nzrd].
apply (Rmult_lt_reg_l 2); [lra|]; rewrite <- Rmult_assoc.
replace (2 * / 2) with 1 by field; rewrite Rmult_1_l.
change (bpow f1) with u.
rewrite Rmult_plus_distr_r; rewrite Rmult_1_l; apply Rplus_lt_compat_l.
replace (2 * u) with (u + u) by ring.
apply Rplus_lt_compat_l.
unfold f2, u, ulp, canonic_exp; apply bpow_lt; omega. }
unfold Znearest.
rewrite Hfld.
......@@ -2150,7 +2152,7 @@ destruct (Zle_or_lt (fexp1 ex) (fexp2 ex)) as [H2|H2].
[now apply Rplus_le_lt_compat;
[|rewrite Rabs_right; [|apply Rle_ge, Rlt_le]]|].
apply Rle_trans with (2 * bpow (fexp1 ex - 1)).
- rewrite Rmult_plus_distr_r, Rmult_1_l.
- replace (2 * bpow (fexp1 ex - 1)) with (bpow (fexp1 ex - 1) + bpow (fexp1 ex - 1)) by ring.
apply Rplus_le_compat; [|now apply bpow_le; omega].
apply Rle_trans with (bpow (fexp2 ex)); [|now apply bpow_le; omega].
rewrite <- (Rmult_1_l (bpow _)).
......@@ -2170,7 +2172,8 @@ destruct (Zle_or_lt (fexp1 ex) (fexp2 ex)) as [H2|H2].
replace (bpow ex) with (/ 2 * (2 * bpow ex)) by field.
rewrite <- Rmult_plus_distr_l; apply Rmult_le_compat_l; [lra|].
apply Rle_trans with (3 * bpow (fexp1 ex - 1)).
+ rewrite (Rmult_plus_distr_r _ 2); rewrite Rmult_1_l; apply Rplus_le_compat.
+ replace (3 * bpow (fexp1 ex - 1)) with (bpow (fexp1 ex - 1) + 2 * bpow (fexp1 ex - 1)) by ring.
apply Rplus_le_compat.
* rewrite ulp_neq_0; try now apply Rgt_not_eq.
apply bpow_le; unfold canonic_exp; rewrite Hex'; omega.
* apply Rmult_le_compat_l; [lra|]; apply bpow_le; omega.
......
......@@ -209,7 +209,7 @@ apply Rmult_le_compat_r with (1 := HM).
now apply Rplus_le_compat.
unfold Zminus.
rewrite bpow_plus.
simpl (bpow radix2 1).
change (bpow radix2 1) with 2%R.
rewrite F2R_bpow.
ring.
Qed.
......
......@@ -346,11 +346,11 @@ Proof.
intros. destruct x, y; try (apply B2R_inj; now eauto).
- simpl in H2. congruence.
- symmetry in H1. apply Rmult_integral in H1.
destruct H1. apply eq_Z2R with (n:=0%Z) in H1. destruct b0; discriminate H1.
destruct H1. apply (eq_Z2R _ 0) in H1. destruct b0; discriminate H1.
simpl in H1. pose proof (bpow_gt_0 radix2 e).
rewrite H1 in H3. apply Rlt_irrefl in H3. destruct H3.
- apply Rmult_integral in H1.
destruct H1. apply eq_Z2R with (n:=0%Z) in H1. destruct b; discriminate H1.
destruct H1. apply (eq_Z2R _ 0) in H1. destruct b; discriminate H1.
simpl in H1. pose proof (bpow_gt_0 radix2 e).
rewrite H1 in H3. apply Rlt_irrefl in H3. destruct H3.
Qed.
......
......@@ -183,8 +183,8 @@ destruct (Req_dec x' 0) as [Zx'|Nzx'].
apply Rplus_le_compat_r.
apply (Rmult_le_reg_r (bpow (- ln_beta x))); [now apply bpow_gt_0|].
unfold ulp, canonic_exp; bpow_simplify.
rewrite <- (Rinv_r 2) at 3; [|lra].
rewrite Rmult_comm; apply Rmult_le_compat_r; [lra|].
replace 1%R with (/2 * 2)%R by field.
apply Rmult_le_compat_l; [lra|].
apply Rle_trans with 1; [|lra].
change 1 with (bpow 0); apply bpow_le.
omega.
......@@ -1037,10 +1037,11 @@ destruct Hexp as (_,(_,(_,Hexp4))).
assert (Hf2 : (fexp2 (ln_beta x) <= fexp1 (ln_beta x))%Z);
[now apply Hexp4; omega|].
assert (Bpow2 : bpow (- 2) <= / 2 * / 2).
{ unfold Fcore_Raux.bpow, Z.pow_pos; simpl.
rewrite <- Rinv_mult_distr; [|lra|lra].
{ replace (/2 * /2) with (/4) by field.
rewrite (bpow_opp _ 2).
apply Rinv_le; [lra|].
change 4 with (Z2R (2 * 2)); apply Z2R_le; rewrite Zmult_1_r.
apply (Z2R_le (2 * 2) (beta * (beta * 1))).
rewrite Zmult_1_r.
now apply Zmult_le_compat; omega. }
assert (P2 : (0 < 2)%Z) by omega.
unfold double_round_eq.
......@@ -1384,10 +1385,11 @@ assert (Hf2 : (fexp2 (ln_beta x) <= fexp1 (ln_beta x))%Z);
assert (Hfx : (fexp1 (ln_beta x) < ln_beta x)%Z);
[now apply ln_beta_generic_gt; [|apply Rgt_not_eq|]|].
assert (Bpow2 : bpow (- 2) <= / 2 * / 2).
{ unfold Fcore_Raux.bpow, Z.pow_pos; simpl.
rewrite <- Rinv_mult_distr; [|lra|lra].
{ replace (/2 * /2) with (/4) by field.
rewrite (bpow_opp _ 2).
apply Rinv_le; [lra|].
change 4 with (Z2R (2 * 2)); apply Z2R_le; rewrite Zmult_1_r.
apply (Z2R_le (2 * 2) (beta * (beta * 1))).
rewrite Zmult_1_r.
now apply Zmult_le_compat; omega. }
assert (Ly : y < bpow (ln_beta y)).
{ apply Rabs_lt_inv.
......@@ -1449,7 +1451,7 @@ apply double_round_gt_mid.
unfold canonic_exp.
apply (Rplus_le_reg_r (bpow (fexp2 (ln_beta (x - y))))); ring_simplify.
apply Rle_trans with (2 * bpow (fexp1 (ln_beta (x - y)) - 1)).
* rewrite Rmult_plus_distr_r; rewrite Rmult_1_l.
* replace (2 * bpow (fexp1 (ln_beta (x - y)) - 1)) with (bpow (fexp1 (ln_beta (x - y)) - 1) + bpow (fexp1 (ln_beta (x - y)) - 1)) by ring.
apply Rplus_le_compat_l.
now apply bpow_le.
* unfold Zminus; rewrite bpow_plus.
......@@ -1458,10 +1460,9 @@ apply double_round_gt_mid.
apply Rmult_le_compat_l; [now apply bpow_ge_0|].
unfold Fcore_Raux.bpow, Z.pow_pos; simpl.
rewrite Zmult_1_r.
rewrite <- (Rinv_r 2) at 3; [|lra].
rewrite Rmult_comm; apply Rmult_le_compat_l; [lra|].
apply Rinv_le; [lra|].
now change 2 with (Z2R 2); apply Z2R_le.
apply Z2R_le, Rinv_le in Hbeta.
lra.
apply Rlt_0_2.
Qed.
(* double_round_minus_aux{0,1,2} together *)
......@@ -4220,7 +4221,7 @@ destruct (Zle_or_lt Z0 (fexp1 (ln_beta x) - fexp1 (ln_beta (x / y))
bpow_simplify.
rewrite (Rmult_comm _ y).
do 2 rewrite Rmult_assoc.
change (Z2R _ * _) with x'.
change (Z2R (Zfloor _) * _) with x'.
change (bpow _) with u1.
apply (Rmult_lt_reg_l (/ 2)); [lra|].
rewrite Rmult_plus_distr_l.
......
......@@ -20,7 +20,7 @@ COPYING file for more details.
(** * Rounding to odd and its properties, including the equivalence
between rnd_NE and double rounding with rnd_odd and then rnd_NE *)
Require Import Reals Psatz.
Require Import Fcore.
Require Import Fcalc_ops.
......@@ -577,29 +577,23 @@ Qed.
Lemma d_le_m: (F2R d <= m)%R.
apply Rmult_le_reg_l with 2%R.
auto with real.
apply Rplus_le_reg_l with (-F2R d)%R.
apply Rle_trans with (F2R d).
right; ring.
apply Rle_trans with (F2R u).
apply Rle_trans with x.
apply Hd.
apply Hu.
right; unfold m; field.
Proof.
assert (F2R d <= F2R u)%R.
apply Rle_trans with x.
apply Hd.
apply Hu.
unfold m.
lra.
Qed.
Lemma m_le_u: (m <= F2R u)%R.
apply Rmult_le_reg_l with 2%R.
auto with real.
apply Rplus_le_reg_l with (-F2R u)%R.
apply Rle_trans with (F2R d).
right; unfold m; field.
apply Rle_trans with (F2R u).
apply Rle_trans with x.
apply Hd.
apply Hu.
right; ring.
Proof.
assert (F2R d <= F2R u)%R.
apply Rle_trans with x.
apply Hd.
apply Hu.
unfold m.
lra.
Qed.
Lemma ln_beta_m: (0 < F2R d)%R -> (ln_beta beta m =ln_beta beta (F2R d) :>Z).
......@@ -641,20 +635,13 @@ now apply Rgt_not_eq.
now apply generic_format_canonic.
now left.
replace m with (F2R d).
destruct (ln_beta beta (F2R d)) as (e,He).
destruct (ln_beta beta (F2R d)) as (e,He).
simpl in *; rewrite Rabs_right in He.
apply He.
now apply Rgt_not_eq.
apply Rle_ge; now left.
assert (F2R d = F2R u).
apply Rmult_eq_reg_l with (/2)%R.
apply Rplus_eq_reg_l with (/2*F2R u)%R.
apply trans_eq with m.
unfold m, Rdiv; ring.
rewrite H; field.
auto with real.
apply Rgt_not_eq, Rlt_gt; auto with real.
unfold m; rewrite <- H0; field.
unfold m in H |- *.
lra.
Qed.
......@@ -666,7 +653,7 @@ apply ln_beta_unique_pos.
unfold m; rewrite <- Y, Rplus_0_l.
rewrite u_eq.
destruct (ln_beta beta x) as (e,He).
rewrite Rabs_right in He.
rewrite Rabs_pos_eq in He by now apply Rlt_le.
rewrite round_UP_small_pos with (ex:=e).
rewrite ln_beta_bpow.
ring_simplify (fexp e + 1 - 1)%Z.
......@@ -676,7 +663,7 @@ unfold Rdiv; apply Rmult_le_compat_l.
apply bpow_ge_0.
simpl; unfold Z.pow_pos; simpl.
rewrite Zmult_1_r; apply Rinv_le.
auto with real.
exact Rlt_0_2.
apply (Z2R_le 2).
specialize (radix_gt_1 beta).
omega.
......@@ -684,13 +671,11 @@ apply Rlt_le_trans with (bpow (fexp e)*1)%R.
2: right; ring.
unfold Rdiv; apply Rmult_lt_compat_l.
apply bpow_gt_0.
rewrite <- Rinv_1 at 3.
apply Rinv_lt; auto with real.
lra.
now apply He, Rgt_not_eq.
apply exp_small_round_0_pos with beta (Zfloor) x...
now apply He, Rgt_not_eq.
now rewrite <- d_eq, Y.
now left.
Qed.
......@@ -723,8 +708,7 @@ unfold Rdiv; apply f_equal.
unfold F2R; simpl; unfold Z.pow_pos; simpl.
rewrite Zmult_1_r, Hb, Z2R_mult.
simpl; field.
apply Rgt_not_eq, Rmult_lt_reg_l with (Z2R 2).
simpl; auto with real.
apply Rgt_not_eq, Rmult_lt_reg_l with (1 := Rlt_0_2).
rewrite Rmult_0_r, <-Z2R_mult, <-Hb.
apply radix_pos.
apply trans_eq with (-1+Fexp (Fplus beta d u'))%Z.
......@@ -752,8 +736,7 @@ unfold Rdiv; apply f_equal.
unfold F2R; simpl; unfold Z.pow_pos; simpl.
rewrite Zmult_1_r, Hb, Z2R_mult.
simpl; field.
apply Rgt_not_eq, Rmult_lt_reg_l with (Z2R 2).
simpl; auto with real.
apply Rgt_not_eq, Rmult_lt_reg_l with (1 := Rlt_0_2).
rewrite Rmult_0_r, <-Z2R_mult, <-Hb.
apply radix_pos.
apply trans_eq with (-1+Fexp u)%Z.
......
......@@ -1532,13 +1532,13 @@ Qed.
Theorem bpow_opp :
forall e : Z, (bpow (-e) = /bpow e)%R.
Proof.
intros e; destruct e.
simpl; now rewrite Rinv_1.
now replace (-Zpos p)%Z with (Zneg p) by reflexivity.
replace (-Zneg p)%Z with (Zpos p) by reflexivity.
intros [|p|p].
apply eq_sym, Rinv_1.
now change (-Zpos p)%Z with (Zneg p).
change (-Zneg p)%Z with (Zpos p).
simpl; rewrite Rinv_involutive; trivial.
generalize (bpow_gt_0 (Zpos p)).
simpl; auto with real.
apply Rgt_not_eq.
apply (bpow_gt_0 (Zpos p)).
Qed.
Theorem Z2R_Zpower_nat :
......@@ -2047,20 +2047,19 @@ destruct Hex as (Hex0,Hex1); [now apply Rgt_not_eq|].
assert (Haxy : (Rabs (x + y) < bpow (ex + 1))%R).
{ rewrite bpow_plus1.
apply Rlt_le_trans with (2 * bpow ex)%R.
- apply Rle_lt_trans with (2 * Rabs x)%R.
+ rewrite Rabs_right.
{ apply Rle_trans with (x + x)%R; [now apply Rplus_le_compat_l|].
rewrite Rabs_right.
{ rewrite Rmult_plus_distr_r.
rewrite Rmult_1_l.
now apply Rle_refl. }
now apply Rgt_ge. }
apply Rgt_ge.
rewrite <- (Rplus_0_l 0).
now apply Rplus_gt_compat.
+ now apply Rmult_lt_compat_l; intuition.
- apply Rmult_le_compat_r; [now apply bpow_ge_0|].
now change 2%R with (Z2R 2); apply Z2R_le. }
- rewrite Rabs_pos_eq.
apply Rle_lt_trans with (2 * Rabs x)%R.
+ rewrite Rabs_pos_eq.
replace (2 * x)%R with (x + x)%R by ring.
now apply Rplus_le_compat_l.
now apply Rlt_le.
+ apply Rmult_lt_compat_l with (2 := Hex1).
exact Rlt_0_2.
+ rewrite <- (Rplus_0_l 0).
now apply Rlt_le, Rplus_lt_compat.
- apply Rmult_le_compat_r.
now apply bpow_ge_0.
now apply (Z2R_le 2). }
assert (Haxy2 : (bpow (ex - 1) <= Rabs (x + y))%R).
{ apply (Rle_trans _ _ _ Hex0).
rewrite Rabs_right; [|now apply Rgt_ge].
......
......@@ -18,6 +18,7 @@ COPYING file for more details.
*)
(** * Unit in the Last Place: our definition using fexp and its properties, successor and predecessor *)
Require Import Reals Psatz.
Require Import Fcore_Raux.
Require Import Fcore_defs.
Require Import Fcore_rnd.
......@@ -1966,7 +1967,7 @@ rewrite Hx in Hfx; contradict Hfx; auto with real.
intros H.
apply Rle_trans with (1:=error_le_half_ulp _ _).
apply Rmult_le_compat_l.
auto with real.
apply Rlt_le, pos_half_prf.
apply ulp_le.
rewrite Hx; rewrite (Rabs_left1 x), Rabs_left; try assumption.
apply Ropp_le_contravar.
......@@ -1982,7 +1983,7 @@ case (Rle_or_lt 0 (round beta fexp Zceil x)).
intros H; destruct H.
apply Rle_trans with (1:=error_le_half_ulp _ _).
apply Rmult_le_compat_l.
auto with real.
apply Rlt_le, pos_half_prf.
apply ulp_le_pos; trivial.
case (Rle_or_lt 0 x); trivial.
intros H1; contradict H.
......@@ -2210,21 +2211,7 @@ apply generic_format_0.
left; apply Rlt_le_trans with (1:=H).
rewrite V1,V2; right; field.
(* *)
assert (T: (u < (u + succ u) / 2 < succ u)%R).
split.
apply Rmult_lt_reg_l with 2%R.
now auto with real.
apply Rplus_lt_reg_l with (-u)%R.
apply Rle_lt_trans with u;[right; ring|idtac].
apply Rlt_le_trans with (1:=V).
right; field.
apply Rmult_lt_reg_l with 2%R.
now auto with real.
apply Rplus_lt_reg_l with (-succ u)%R.
apply Rle_lt_trans with u;[right; field|idtac].
apply Rlt_le_trans with (1:=V).
right; ring.
(* *)
assert (T: (u < (u + succ u) / 2 < succ u)%R) by lra.
destruct T as (T1,T2).
apply Rnd_N_pt_monotone with F v ((u + succ u) / 2)%R...
apply round_N_pt...
......
......@@ -133,7 +133,7 @@ assert (Hy0: (0 <= y)%R).
apply Rplus_le_reg_r with y.
apply Rle_trans with x.
now rewrite Rplus_0_l.
now rewrite Rmult_plus_distr_r, Rmult_1_l in Hxy2.
now replace (y + y)%R with (2 * y)%R by ring.
rewrite Rabs_pos_eq with (1 := Hy0).
rewrite Rabs_pos_eq.
unfold Rmin.
......
......@@ -191,7 +191,7 @@ apply Rsqr_le_abs_1.
apply Rle_trans with (1 := Rabs_triang _ _).
rewrite Rabs_R1.
apply Rplus_le_reg_l with (-1)%R.
rewrite <- Rplus_assoc, Rplus_opp_l, Rplus_0_l.
replace (-1 + (1 + Rabs eps))%R with (Rabs eps) by ring.
apply Rle_trans with (1 := Heps1).
rewrite Rabs_pos_eq.
apply Rmult_le_reg_l with 2%R.
......@@ -256,8 +256,7 @@ replace (prec+(Fexp fr+Fexp fr))%Z with (Fexp fr + (prec+Fexp fr))%Z by ring.
rewrite bpow_plus, Rmult_assoc.
apply Rmult_lt_compat_l.
apply bpow_gt_0.
apply Rmult_lt_reg_l with 2%R.
auto with real.
apply Rmult_lt_reg_l with (1 := Rlt_0_2).
apply Rle_lt_trans with (Rabs (F2R fr + sqrt x)).
right; field.
apply Rle_lt_trans with (1:=Rabs_triang _ _).
......@@ -273,7 +272,7 @@ rewrite <- Hr1; auto.
apply Rlt_le_trans with (bpow (prec + Fexp fr)+ Rabs (sqrt x))%R.
now apply Rplus_lt_compat_r.
(* . *)
rewrite Rmult_plus_distr_r, Rmult_1_l.
replace (2 * bpow (prec + Fexp fr))%R with (bpow (prec + Fexp fr) + bpow (prec + Fexp fr))%R by ring.
apply Rplus_le_compat_l.
assert (sqrt x <> 0)%R.
apply Rgt_not_eq.
......
......@@ -588,7 +588,7 @@ rewrite Rabs_right;[assumption|apply Rle_ge; now left].
exists eps; exists 0%R.
split;[assumption|split].
rewrite Rabs_R0; apply Rmult_le_pos.
auto with real.
apply Rlt_le, pos_half_prf.
apply bpow_ge_0.
split;[apply Rmult_0_r|idtac].
now rewrite Rplus_0_r.
......@@ -596,13 +596,14 @@ now rewrite Rplus_0_r.
exists 0%R; exists (round beta (FLT_exp emin prec) (Znearest choice) x - x)%R.
split.
rewrite Rabs_R0; apply Rmult_le_pos.
auto with real.
apply Rlt_le, pos_half_prf.
apply bpow_ge_0.
split.
apply Rle_trans with (/2*ulp beta (FLT_exp emin prec) x)%R.
apply error_le_half_ulp.
now apply FLT_exp_valid.
apply Rmult_le_compat_l; auto with real.
apply Rmult_le_compat_l.
apply Rlt_le, pos_half_prf.
rewrite ulp_neq_0.
2: now apply Rgt_not_eq.
apply bpow_le.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment