diff options
author | Guillaume Melquiond <guillaume.melquiond@inria.fr> | 2017-03-05 20:48:52 +0100 |
---|---|---|
committer | Maxime Dénès <mail@maximedenes.fr> | 2017-03-22 17:19:51 +0100 |
commit | a4a76c253474ac4ce523b70d0150ea5dcf546385 (patch) | |
tree | ebde19ff337a88fd8029ac5dc9eca03df1202367 /theories/Reals/R_Ifp.v | |
parent | ddbc3839923731686a89a401d0f9dd44f3ad339b (diff) |
Make IZR use a compact representation of integers.
That way, (IZR 5) is no longer reduced to 2 + 1 + 1 + 1 (which is not
convertible to 5) but instead to 1 + 2 * 2 (which is). Moreover, it means
that, after reduction, real constants no longer exponentially blow up.
Note that I was not able to fix the test-suite for the declarative mode,
so the missing proof terms have been admitted.
Diffstat (limited to 'theories/Reals/R_Ifp.v')
-rw-r--r-- | theories/Reals/R_Ifp.v | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/theories/Reals/R_Ifp.v b/theories/Reals/R_Ifp.v index b6d072837..d0f9aea28 100644 --- a/theories/Reals/R_Ifp.v +++ b/theories/Reals/R_Ifp.v @@ -92,7 +92,7 @@ Proof. auto with zarith real. (*inf a 1*) cut (r - IZR (up r) < 0). - rewrite <- Z_R_minus; simpl; intro; unfold Rminus; + rewrite <- Z_R_minus; change (IZR 1) with 1; intro; unfold Rminus; rewrite Ropp_plus_distr; rewrite <- Rplus_assoc; fold (r - IZR (up r)); rewrite Ropp_involutive; elim (Rplus_ne 1); intros a b; pattern 1 at 2; @@ -376,7 +376,7 @@ Proof. rewrite (Ropp_involutive (IZR 1)); rewrite (Ropp_involutive (IZR (Int_part r2))); rewrite (Ropp_plus_distr (IZR (Int_part r1))); - rewrite (Ropp_involutive (IZR (Int_part r2))); simpl; + rewrite (Ropp_involutive (IZR (Int_part r2))); change (IZR 1) with 1; rewrite <- (Rplus_assoc (r1 + - r2) (- IZR (Int_part r1) + IZR (Int_part r2)) 1) ; rewrite (Rplus_assoc r1 (- r2) (- IZR (Int_part r1) + IZR (Int_part r2))); |