Commit 1c9be77b by Guillaume Melquiond

### Simplified proofs.

parent de10d038
 ... @@ -69,46 +69,38 @@ generalize (prec_gt_0 prec). ... @@ -69,46 +69,38 @@ generalize (prec_gt_0 prec). split ; intros ; omega. split ; intros ; omega. Qed. Qed. Theorem FLXN_format_FTZ : forall x, FTZ_format x -> FLXN_format beta prec x. Proof. intros x ((xm, xe), (Hx1, (Hx2, Hx3))). eexists. apply (conj Hx1 Hx2). Qed. Theorem generic_format_FTZ : Theorem generic_format_FTZ : forall x, FTZ_format x -> generic_format beta FTZ_exp x. forall x, FTZ_format x -> generic_format beta FTZ_exp x. Proof. Proof. intros x ((xm, xe), (Hx1, (Hx2, Hx3))). intros x Hx. destruct (Req_dec x 0) as [Hx4|Hx4]. cut (generic_format beta (FLX_exp prec) x). rewrite Hx4. apply generic_inclusion_ln_beta. apply generic_format_0. intros Zx. specialize (Hx2 Hx4). destruct Hx as ((xm, xe), (Hx1, (Hx2, Hx3))). rewrite Hx1. simpl in Hx2, Hx3. apply generic_format_F2R. specialize (Hx2 Zx). unfold canonic_exponent, FTZ_exp. assert (Zxm: xm <> Z0). rewrite <- Hx1. contradict Zx. destruct (ln_beta beta x) as (ex, Hx6). rewrite Hx1, Zx. simpl. apply F2R_0. specialize (Hx6 Hx4). unfold FTZ_exp, FLX_exp. generalize (Zlt_cases (ex - prec) emin). rewrite Zlt_bool_false. case (Zlt_bool (ex - prec) emin) ; intros H1. apply Zle_refl. elim (Rlt_not_le _ _ (proj2 Hx6)). rewrite Hx1, ln_beta_F2R with (1 := Zxm). apply Rle_trans with (bpow (prec - 1) * bpow emin)%R. cut (prec - 1 < ln_beta beta (Z2R xm))%Z. rewrite <- bpow_plus. clear -Hx3 ; omega. apply bpow_le. apply ln_beta_Z2R_gt with (1 := Zxm). omega. rewrite Hx1, abs_F2R. unfold F2R. simpl. apply Rmult_le_compat. apply bpow_ge_0. apply bpow_ge_0. rewrite <- Z2R_Zpower. now apply Z2R_le. apply Zle_minus_le_0. now apply (Zlt_le_succ 0). now apply bpow_le. cut (ex - 1 < prec + xe)%Z. omega. apply (lt_bpow beta). apply Rle_lt_trans with (1 := proj1 Hx6). rewrite Hx1. apply F2R_lt_bpow. simpl. ring_simplify (prec + xe - xe)%Z. apply Hx2. apply Hx2. apply generic_format_FLXN. now apply FLXN_format_FTZ. Qed. Qed. Theorem FTZ_format_generic : Theorem FTZ_format_generic : ... @@ -185,23 +177,6 @@ apply FTZ_format_generic. ... @@ -185,23 +177,6 @@ apply FTZ_format_generic. apply generic_format_FTZ. apply generic_format_FTZ. Qed. Qed. Theorem FLXN_format_FTZ : forall x, FTZ_format x -> FLXN_format beta prec x. Proof with auto with typeclass_instances. intros x Fx. apply FLXN_format_generic... apply generic_format_FTZ in Fx. revert Fx. apply generic_inclusion_ln_beta. intros _. unfold FLX_exp, FTZ_exp. case Zlt_bool_spec. generalize (prec_gt_0 prec). omega. intros _. apply Zle_refl. Qed. Theorem FTZ_format_FLXN : Theorem FTZ_format_FLXN : forall x : R, forall x : R, (bpow (emin + prec - 1) <= Rabs x)%R -> (bpow (emin + prec - 1) <= Rabs x)%R -> ... ...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!