Commit b44a973d authored by BOLDO Sylvie's avatar BOLDO Sylvie

WIP renaming

parent e0c4c9f4
......@@ -233,7 +233,7 @@ case (Req_bool_spec u 0); intros Hu'.
rewrite Hu', Rmult_0_r.
rewrite <- (Rmult_1_l (ulp_flt 0)) at 1.
apply Rmult_le_compat_r.
apply ulp_pos.
apply ulp_ge_0.
left; apply Rlt_plus_1.
rewrite 2!ulp_neq_0; trivial.
2: apply Rmult_integral_contrapositive_currified; trivial.
......@@ -312,7 +312,7 @@ split; trivial.
apply Rle_trans with (1:=Hh).
rewrite <- (Rmult_1_l (ulp_flt f)) at 2.
apply Rmult_le_compat_r.
apply ulp_pos.
apply ulp_ge_0.
fourier.
apply Rplus_lt_reg_l with (-f); ring_simplify.
apply Rlt_le_trans with (/2*ulp_flt f).
......@@ -345,7 +345,7 @@ apply Rle_ge; now left.
assert (T1:(ulp_flt (pred_flt f) = ulp_flt f)
\/ ( ulp_flt (pred_flt f) = /2* ulp_flt f
/\ f = bpow (ln_beta radix2 f -1))).
generalize H; rewrite pred_pos_eq; [idtac|now left].
generalize H; rewrite pred_eq_pos; [idtac|now left].
unfold pred_pos; case Req_bool_spec; intros K HH.
(**)
right; split; try assumption.
......@@ -402,7 +402,7 @@ contradict H0.
now apply sym_not_eq.
apply Rle_ge; now left.
assert (bpow (ln_beta radix2 f -1) + ulp_flt (bpow (ln_beta radix2 f-1)) <= f).
rewrite <- succ_pos_eq;[idtac|apply bpow_ge_0].
rewrite <- succ_eq_pos;[idtac|apply bpow_ge_0].
apply succ_le_lt...
apply FLT_format_bpow...
unfold Prec_gt_0 in prec_gt_0_;omega.
......@@ -464,13 +464,13 @@ auto with real.
apply Rle_trans with (1:=Hh).
apply Rle_trans with (/2*ulp_flt f).
apply Rmult_le_compat_r.
apply ulp_pos.
apply ulp_ge_0.
fourier.
case H0.
intros Y; rewrite Y.
rewrite <- (Rmult_1_l (ulp_flt f)) at 2.
apply Rmult_le_compat_r.
apply ulp_pos.
apply ulp_ge_0.
fourier.
intros Y; rewrite (proj1 Y); now right.
replace (f+h) with (pred_flt f + (f-pred_flt f+h)) by ring.
......@@ -489,11 +489,11 @@ fourier.
apply Rlt_le_trans with (1:=Y2).
rewrite Y1.
apply Rmult_le_compat_r.
apply ulp_pos.
apply ulp_ge_0.
fourier.
apply Rplus_le_reg_l with (-ulp_flt (pred_flt f)); ring_simplify.
now left.
rewrite pred_pos_eq; try now left.
rewrite pred_eq_pos; try now left.
pattern f at 2; rewrite <- (pred_pos_plus_ulp radix2 (FLT_exp emin prec) f)...
ring.
apply Rplus_lt_reg_l with (-f); ring_simplify.
......@@ -501,7 +501,7 @@ apply Rle_lt_trans with (-(/2 * ulp_flt (pred_flt f))).
right.
apply trans_eq with ((pred_flt f - f) / 2).
field.
rewrite pred_pos_eq; try now left.
rewrite pred_eq_pos; try now left.
pattern f at 2; rewrite <- (pred_pos_plus_ulp radix2 (FLT_exp emin prec) f)...
field.
replace h with (--h) by ring.
......@@ -518,7 +518,7 @@ right; field.
(* complex case: even choosing *)
elim H0; intros T1 (T2,T3); clear H0.
assert (pred_flt f = bpow (ln_beta radix2 f - 1) - bpow (ln_beta radix2 f - 1 -prec)).
rewrite pred_pos_eq; try now left.
rewrite pred_eq_pos; try now left.
unfold pred_pos; case Req_bool_spec.
intros _; rewrite <- T2.
apply f_equal, f_equal.
......@@ -534,7 +534,7 @@ split.
auto with real.
rewrite T3, T1.
apply Rmult_le_compat_r.
apply ulp_pos.
apply ulp_ge_0.
fourier.
assert (round radix2 (FLT_exp emin prec) Zceil (f+h) = f).
replace (f+h) with (pred_flt f + /2*ulp_flt (pred_flt f)).
......@@ -546,7 +546,7 @@ rewrite ulp_neq_0; try now apply Rgt_not_eq.
apply bpow_gt_0.
rewrite <- (Rmult_1_l (ulp_flt (pred_flt f))) at 2.
apply Rmult_le_compat_r.
apply ulp_pos.
apply ulp_ge_0.
fourier.
rewrite T1, H0, <- T2.
replace h with (--h) by ring; rewrite T3.
......@@ -608,7 +608,7 @@ reflexivity.
rewrite H5, H4.
pattern f at 1; rewrite <- (pred_pos_plus_ulp radix2 (FLT_exp emin prec) f); try assumption.
ring_simplify.
rewrite <- pred_pos_eq;[idtac|now left].
rewrite <- pred_eq_pos;[idtac|now left].
rewrite T1.
replace h with (--h) by ring.
rewrite T3.
......@@ -766,7 +766,7 @@ Lemma average1_correct_weak2: Rabs (av -a) <= 3/2*ulp_flt a.
Proof with auto with typeclass_instances.
apply Rle_trans with (1:=average1_correct_weak1).
apply Rmult_le_compat_r.
unfold ulp; apply ulp_pos.
unfold ulp; apply ulp_ge_0.
apply Rle_trans with (1/2); unfold Rdiv.
right; ring.
apply Rmult_le_compat_r.
......@@ -1019,7 +1019,7 @@ case (round_DN_or_UP radix2 (FLT_exp emin prec) ZnearestE (y-x));
apply Rplus_le_reg_l with (-round radix2 (FLT_exp emin prec) Zfloor (y - x)).
ring_simplify.
now left.
rewrite ulp_DN_UP.
rewrite round_UP_DN_ulp.
apply Rplus_le_reg_l with (-round radix2 (FLT_exp emin prec) Zfloor (y - x)); ring_simplify.
apply round_DN_pt...
apply generic_format_ulp...
......@@ -1739,7 +1739,7 @@ apply Rmult_le_pos.
apply Rmult_le_pos.
apply Fourier_util.Rle_zero_pos_plus1; now auto with real.
now auto with real.
apply ulp_pos.
apply ulp_ge_0.
Qed.
......
......@@ -344,7 +344,7 @@ assert (Hf2f1' : (fexp2 (ln_beta x) <= fexp1 (ln_beta x))%Z) by omega.
assert (NF1x : ~ generic_format beta fexp1 x).
{ now intro H; apply NF2x, (generic_inclusion_ln_beta _ fexp1). }
assert (Hrx1c : rx1c = rx1 + ulp beta fexp1 x).
{ now apply ulp_DN_UP. }
{ now apply round_UP_DN_ulp. }
rewrite ulp_neq_0 in Hrx1c; try now apply Rgt_not_eq.
destruct (midpoint_beta_odd_remains rx1 Nnrx1 ex1 ex2 Hf2f1' Hrx1)
as (rx2,(Nnrx2, (Hrx2, Hrx12))).
......@@ -545,7 +545,7 @@ destruct (Rle_or_lt x (midp beta fexp1 x)) as [H1|H1].
now apply neq_midpoint_beta_odd_aux1; [| | | |split].
- (* midp fexp1 x < x *)
assert (Hm : midp' beta fexp1 x = midp beta fexp1 x).
{ now unfold midp', midp; rewrite ulp_DN_UP; [field|]. }
{ now unfold midp', midp; rewrite round_UP_DN_ulp; [field|]. }
destruct (Zle_or_lt (fexp1 (ln_beta x)) (fexp2 (ln_beta x))) as [H3|H3].
+ (* fexp2 (ln_beta x) = fexp1 (ln_beta x) *)
assert (H3' : fexp2 (ln_beta x) = fexp1 (ln_beta x));
......
......@@ -219,7 +219,7 @@ destruct (Req_dec x' 0) as [Zx'|Nzx'].
assert (/ 2 * ulp beta fexp1 x <= ulp beta fexp1 x).
rewrite <- (Rmult_1_l (ulp _ _ _)) at 2.
apply Rmult_le_compat_r; [|lra].
apply ulp_pos.
apply ulp_ge_0.
rewrite 2!ulp_neq_0 in Hx2;[|now apply Rgt_not_eq|now apply Rgt_not_eq].
rewrite ulp_neq_0 in Hx';[|now apply Rgt_not_eq].
rewrite ulp_neq_0 in H;[|now apply Rgt_not_eq].
......@@ -825,7 +825,7 @@ split.
apply Rle_trans with (bpow (ln_beta x - 1)
+ ulp beta fexp (bpow (ln_beta x - 1))).
+ now apply Rplus_le_compat_l; apply Rlt_le.
+ rewrite <- succ_pos_eq;[idtac|apply bpow_ge_0].
+ rewrite <- succ_eq_pos;[idtac|apply bpow_ge_0].
apply succ_le_lt; [apply Vfexp|idtac|exact Fx|assumption].
apply (generic_format_bpow beta fexp (ln_beta x - 1)).
replace (_ + _)%Z with (ln_beta x : Z) by ring.
......@@ -2561,7 +2561,7 @@ destruct (generic_format_EM beta fexp1 x) as [Fx|Nfx].
now apply (generic_inclusion_ln_beta beta fexp1); [omega|].
- (* ~ generic_format beta fexp1 x *)
assert (Hceil : round beta fexp1 Zceil x = rd + u1);
[now apply ulp_DN_UP|].
[now apply round_UP_DN_ulp|].
assert (Hf2' : (fexp2 (ln_beta x) <= fexp1 (ln_beta x) - 1)%Z); [omega|].
destruct (Rlt_or_le (x - rd) (/ 2 * (u1 - u2))).
+ (* x - rd < / 2 * (u1 - u2) *)
......@@ -3751,7 +3751,7 @@ destruct (Ztrichotomy (ln_beta x) (fexp1 (ln_beta x) - 1)) as [Hlt|[Heq|Hgt]].
now apply (generic_inclusion_ln_beta beta fexp1); [omega|].
- (* ~ generic_format beta fexp1 x *)
assert (Hceil : round beta fexp1 Zceil x = x' + u1);
[now apply ulp_DN_UP|].
[now apply round_UP_DN_ulp|].
assert (Hf2' : (fexp2 (ln_beta x) <= fexp1 (ln_beta x) - 1)%Z);
[omega|].
assert (midp' fexp1 x + / 2 * ulp beta fexp2 x < x);
......
......@@ -90,9 +90,9 @@ Proof.
intros x; unfold ulp.
case Req_bool_spec; intros Zx.
case (negligible_exp_spec FIX_exp).
intros (_,T); specialize (T (emin-1)%Z); contradict T.
intros T; specialize (T (emin-1)%Z); contradict T.
unfold FIX_exp; omega.
intros (n,(H1,_)); rewrite H1; reflexivity.
intros n _; reflexivity.
reflexivity.
Qed.
......
......@@ -238,13 +238,13 @@ intros x Hx.
unfold ulp; case Req_bool_spec; intros Hx2.
(* x = 0 *)
case (negligible_exp_spec FLT_exp).
intros (_,T); specialize (T (emin-1)%Z); contradict T.
intros T; specialize (T (emin-1)%Z); contradict T.
apply Zle_not_lt; unfold FLT_exp.
apply Zle_trans with (2:=Z.le_max_r _ _); omega.
assert (V:FLT_exp emin = emin).
unfold FLT_exp; apply Z.max_r.
unfold Prec_gt_0 in prec_gt_0_; omega.
intros (n,(H1,H2)); rewrite H1, <-V.
intros n H2; rewrite <-V.
apply f_equal, fexp_negligible_exp_eq...
omega.
(* x <> 0 *)
......
......@@ -216,8 +216,8 @@ Theorem ulp_FLX_0: (ulp beta FLX_exp 0 = 0)%R.
Proof.
unfold ulp; rewrite Req_bool_true; trivial.
case (negligible_exp_spec FLX_exp).
intros (H1,H2); now rewrite H1.
intros (n,(H1,H2)); contradict H2.
intros _; reflexivity.
intros n H2; contradict H2.
unfold FLX_exp; unfold Prec_gt_0 in prec_gt_0_; omega.
Qed.
......
......@@ -199,12 +199,12 @@ Theorem ulp_FTZ_0: ulp beta FTZ_exp 0 = bpow (emin+prec-1).
Proof with auto with typeclass_instances.
unfold ulp; rewrite Req_bool_true; trivial.
case (negligible_exp_spec FTZ_exp).
intros (_,T); specialize (T (emin-1)%Z); contradict T.
intros T; specialize (T (emin-1)%Z); contradict T.
apply Zle_not_lt; unfold FTZ_exp; unfold Prec_gt_0 in prec_gt_0_.
rewrite Zlt_bool_true; omega.
assert (V:(FTZ_exp (emin+prec-1) = emin+prec-1)%Z).
unfold FTZ_exp; rewrite Zlt_bool_true; omega.
intros (n,(H1,H2)); rewrite H1, <-V.
intros n H2; rewrite <-V.
apply f_equal, fexp_negligible_exp_eq...
omega.
Qed.
......
......@@ -164,7 +164,7 @@ now apply Rlt_le.
assert (Hxe2 : (fexp (ex + 1) <= ex)%Z) by now apply valid_exp.
assert (Hud: (F2R xu = F2R xd + ulp beta fexp x)%R).
rewrite Hxu, Hxd.
now apply ulp_DN_UP.
now apply round_UP_DN_ulp.
destruct (total_order_T (bpow ex) (F2R xu)) as [[Hu2|Hu2]|Hu2].
(* - xu > bpow ex *)
elim (Rlt_not_le _ _ Hu2).
......
This diff is collapsed.
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