Commit 29e086f9 by Guillaume Melquiond

### Simplified proofs.

parent 1f89a36b
 ... @@ -159,11 +159,8 @@ Theorem bpow_le_F2R : ... @@ -159,11 +159,8 @@ Theorem bpow_le_F2R : (bpow e <= F2R (Float beta m e))%R. (bpow e <= F2R (Float beta m e))%R. Proof. Proof. intros m e H. intros m e H. rewrite <- (Rmult_1_l (bpow e)). rewrite <- F2R_bpow. unfold F2R. simpl. apply F2R_le_compat. apply Rmult_le_compat_r. apply bpow_ge_0. apply (Z2R_le 1). now apply (Zlt_le_succ 0). now apply (Zlt_le_succ 0). Qed. Qed. ... @@ -328,10 +325,7 @@ rewrite <- (Zabs_eq m1), <- abs_F2R. ... @@ -328,10 +325,7 @@ rewrite <- (Zabs_eq m1), <- abs_F2R. apply H1. apply H1. apply Rgt_not_eq. apply Rgt_not_eq. apply Rlt_gt. apply Rlt_gt. unfold F2R. simpl. now apply F2R_gt_0_compat. apply Rmult_lt_0_compat. now apply (Z2R_lt 0). apply bpow_gt_0. now apply Zlt_le_weak. now apply Zlt_le_weak. clear H1. clear H1. rewrite abs_F2R, Zabs_eq. rewrite abs_F2R, Zabs_eq. ... ...
 ... @@ -94,8 +94,7 @@ split ; intros H ; rewrite Hx. ... @@ -94,8 +94,7 @@ split ; intros H ; rewrite Hx. apply generic_format_0. apply generic_format_0. exists (Float beta 0 0). exists (Float beta 0 0). split. split. unfold F2R. simpl. now rewrite F2R_0. now rewrite Rmult_0_l. apply Zpower_gt_0. apply Zpower_gt_0. now apply Zlt_le_trans with (2 := radix_prop beta). now apply Zlt_le_trans with (2 := radix_prop beta). now apply Zlt_le_weak. now apply Zlt_le_weak. ... @@ -144,12 +143,11 @@ destruct (Z_eq_dec xm 0) as [H3|H3]. ... @@ -144,12 +143,11 @@ destruct (Z_eq_dec xm 0) as [H3|H3]. exists (Float beta 0 0). exists (Float beta 0 0). split. split. rewrite H1, H3. rewrite H1, H3. unfold F2R. simpl. now rewrite 2!F2R_0. now rewrite 2!Rmult_0_l. intros H. intros H. elim H. elim H. rewrite H1, H3. rewrite H1, H3. apply Rmult_0_l. apply F2R_0. destruct (ln_beta beta (Z2R xm)) as (d,H4). destruct (ln_beta beta (Z2R xm)) as (d,H4). specialize (H4 (Z2R_neq _ _ H3)). specialize (H4 (Z2R_neq _ _ H3)). assert (H5: (0 <= prec - d)%Z). assert (H5: (0 <= prec - d)%Z). ... ...
 ... @@ -28,6 +28,13 @@ Definition generic_format (x : R) := ... @@ -28,6 +28,13 @@ Definition generic_format (x : R) := exists f : float beta, exists f : float beta, canonic x f. canonic x f. Theorem generic_format_0 : generic_format 0. Proof. exists (Float beta 0 _) ; repeat split. now rewrite F2R_0. Qed. Theorem generic_DN_pt_large_pos_ge_pow : Theorem generic_DN_pt_large_pos_ge_pow : forall x ex, forall x ex, (fexp ex < ex)%Z -> (fexp ex < ex)%Z -> ... @@ -109,10 +116,7 @@ rewrite ln_beta_unique with (1 := H) in Hg2. ... @@ -109,10 +116,7 @@ rewrite ln_beta_unique with (1 := H) in Hg2. simpl in Hg2. simpl in Hg2. apply Rlt_not_le with (1 := Hrg). apply Rlt_not_le with (1 := Hrg). rewrite Hg1, Hg2. rewrite Hg1, Hg2. unfold F2R. simpl. apply F2R_le_compat. apply Rmult_le_compat_r. apply bpow_ge_0. apply Z2R_le. apply Zfloor_lub. apply Zfloor_lub. apply Rmult_le_reg_r with (bpow (fexp ex)). apply Rmult_le_reg_r with (bpow (fexp ex)). apply bpow_gt_0. apply bpow_gt_0. ... @@ -127,12 +131,9 @@ now rewrite <- Hg1. ... @@ -127,12 +131,9 @@ now rewrite <- Hg1. (* - positive too small *) (* - positive too small *) replace (Zfloor (x * bpow (- fexp ex))) with Z0. replace (Zfloor (x * bpow (- fexp ex))) with Z0. (* - . rounded *) (* - . rounded *) unfold F2R. simpl. rewrite F2R_0. rewrite Rmult_0_l. split. split. exists (Float beta Z0 _) ; repeat split. exact generic_format_0. unfold F2R. simpl. now rewrite Rmult_0_l. split. split. apply Rle_trans with (2 := Hx1). apply Rle_trans with (2 := Hx1). apply bpow_ge_0. apply bpow_ge_0. ... @@ -158,18 +159,11 @@ apply Rle_lt_trans with (2 := Hx2). ... @@ -158,18 +159,11 @@ apply Rle_lt_trans with (2 := Hx2). apply Rle_trans with (2 := Hgx). apply Rle_trans with (2 := Hgx). exact (proj1 Hg4). exact (proj1 Hg4). rewrite Hg1. rewrite Hg1. unfold F2R. simpl. rewrite <- F2R_bpow. pattern (bpow ge) at 1 ; rewrite <- Rmult_1_l. apply F2R_le_compat. apply Rmult_le_compat_r. apply bpow_ge_0. apply (Z2R_le 1). apply (Zlt_le_succ 0). apply (Zlt_le_succ 0). apply lt_Z2R. apply F2R_lt_reg with beta ge. apply Rmult_lt_reg_r with (bpow ge). now rewrite F2R_0, <- Hg1. apply bpow_gt_0. rewrite Rmult_0_l. unfold F2R in Hg1. simpl in Hg1. now rewrite <- Hg1. now apply Rlt_le. now apply Rlt_le. (* - . . *) (* - . . *) apply sym_eq. apply sym_eq. ... @@ -433,14 +427,6 @@ apply bpow_gt_0. ... @@ -433,14 +427,6 @@ apply bpow_gt_0. exact Hx. exact Hx. Qed. Qed. Theorem generic_format_0 : generic_format 0. Proof. exists (Float beta 0 _) ; repeat split. unfold F2R. simpl. now rewrite Rmult_0_l. Qed. Theorem canonic_unicity : Theorem canonic_unicity : forall x f1 f2, forall x f1 f2, canonic x f1 -> canonic x f1 -> ... @@ -532,9 +518,7 @@ Theorem generic_DN_pt_small_pos : ... @@ -532,9 +518,7 @@ Theorem generic_DN_pt_small_pos : Proof. Proof. intros x ex Hx He. intros x ex Hx He. split. split. exists (Float beta 0 _) ; repeat split. exact generic_format_0. unfold F2R. simpl. now rewrite Rmult_0_l. split. split. apply Rle_trans with (2 := proj1 Hx). apply Rle_trans with (2 := proj1 Hx). apply bpow_ge_0. apply bpow_ge_0. ... ...
 ... @@ -219,13 +219,11 @@ rewrite Rnd_N_pt_idempotent with (1 := Hxr). ... @@ -219,13 +219,11 @@ rewrite Rnd_N_pt_idempotent with (1 := Hxr). unfold Rminus. unfold Rminus. rewrite Rplus_opp_r. rewrite Rplus_opp_r. rewrite Rabs_R0. rewrite Rabs_R0. unfold ulp, F2R. simpl. rewrite Rmult_1_l. apply Rmult_le_pos. apply Rmult_le_pos. apply Rlt_le. apply Rlt_le. apply Rinv_0_lt_compat. apply Rinv_0_lt_compat. now apply (Z2R_lt 0 2). now apply (Z2R_lt 0 2). apply bpow_ge_0. now apply F2R_ge_0_compat. apply Hd. apply Hd. Qed. Qed. ... @@ -237,8 +235,7 @@ Theorem ulp_monotone : ... @@ -237,8 +235,7 @@ Theorem ulp_monotone : Proof. Proof. intros Hm x y Hx Hxy. intros Hm x y Hx Hxy. unfold ulp. unfold ulp. unfold F2R. simpl. rewrite 2!F2R_bpow. rewrite 2!Rmult_1_l. apply -> bpow_le. apply -> bpow_le. apply Hm. apply Hm. now apply ln_beta_monotone. now apply ln_beta_monotone. ... @@ -249,14 +246,13 @@ Theorem ulp_bpow : ... @@ -249,14 +246,13 @@ Theorem ulp_bpow : intros e. intros e. unfold ulp. unfold ulp. rewrite (ln_beta_unique beta (bpow e) (e + 1)). rewrite (ln_beta_unique beta (bpow e) (e + 1)). unfold F2R. apply F2R_bpow. now rewrite Rmult_1_l. rewrite Rabs_pos_eq. rewrite Rabs_pos_eq. split. split. apply -> bpow_le. apply -> bpow_le. omega. omega. apply -> bpow_lt. apply -> bpow_lt. omega. apply Zlt_succ. apply bpow_ge_0. apply bpow_ge_0. Qed. Qed. ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!