aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite/micromega/square.v
diff options
context:
space:
mode:
authorGravatar fbesson <fbesson@85f007b7-540e-0410-9357-904b9bb8a0f7>2008-07-02 13:24:47 +0000
committerGravatar fbesson <fbesson@85f007b7-540e-0410-9357-904b9bb8a0f7>2008-07-02 13:24:47 +0000
commit3bf96f48739699da368bb872663945ebdb2d78a4 (patch)
tree7d29f2a7a70a3b345bdc3587fe2563d6a586576d /test-suite/micromega/square.v
parent7f110df7d7ff6a4d43f3c8d19305b20e24f4800e (diff)
Improved robustness of micromega parser. Proof search of Micromega test-suites is now bounded -- ensure termination
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11200 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'test-suite/micromega/square.v')
-rw-r--r--test-suite/micromega/square.v8
1 files changed, 4 insertions, 4 deletions
diff --git a/test-suite/micromega/square.v b/test-suite/micromega/square.v
index 5594afbb9..b78bba25c 100644
--- a/test-suite/micromega/square.v
+++ b/test-suite/micromega/square.v
@@ -11,7 +11,7 @@ Open Scope Z_scope.
Lemma Zabs_square : forall x, (Zabs x)^2 = x^2.
Proof.
- intros ; case (Zabs_dec x) ; intros ; psatz Z.
+ intros ; case (Zabs_dec x) ; intros ; psatz Z 2.
Qed.
Hint Resolve Zabs_pos Zabs_square.
@@ -21,11 +21,11 @@ intros [n [p [Heq Hnz]]]; pose (n' := Zabs n); pose (p':=Zabs p).
assert (facts : 0 <= Zabs n /\ 0 <= Zabs p /\ Zabs n^2=n^2
/\ Zabs p^2 = p^2) by auto.
assert (H : (0 < n' /\ 0 <= p' /\ n' ^2 = 2* p' ^2)) by
- (destruct facts as [Hf1 [Hf2 [Hf3 Hf4]]]; unfold n', p' ; psatz Z).
+ (destruct facts as [Hf1 [Hf2 [Hf3 Hf4]]]; unfold n', p' ; psatz Z 2).
generalize p' H; elim n' using (well_founded_ind (Zwf_well_founded 0)); clear.
intros n IHn p [Hn [Hp Heq]].
-assert (Hzwf : Zwf 0 (2*p-n) n) by (unfold Zwf; psatz Z).
-assert (Hdecr : 0 < 2*p-n /\ 0 <= n-p /\ (2*p-n)^2=2*(n-p)^2) by psatz Z.
+assert (Hzwf : Zwf 0 (2*p-n) n) by (unfold Zwf; psatz Z 2).
+assert (Hdecr : 0 < 2*p-n /\ 0 <= n-p /\ (2*p-n)^2=2*(n-p)^2) by psatz Z 2.
apply (IHn (2*p-n) Hzwf (n-p) Hdecr).
Qed.