diff options
author | letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2006-05-19 10:05:36 +0000 |
---|---|---|
committer | letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2006-05-19 10:05:36 +0000 |
commit | 47d79dcb2247f42be9e5734e784e2ca9b18fd599 (patch) | |
tree | 22f81e1e637dd230006470705c3be405f4c2ab2e /test-suite/success/ROmega0.v | |
parent | a13575eeaf69ec3dadb9b3c6a3e365a7d8371390 (diff) |
tests de Romega
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@8832 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'test-suite/success/ROmega0.v')
-rw-r--r-- | test-suite/success/ROmega0.v | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/test-suite/success/ROmega0.v b/test-suite/success/ROmega0.v new file mode 100644 index 000000000..2cb66fef1 --- /dev/null +++ b/test-suite/success/ROmega0.v @@ -0,0 +1,133 @@ +Require Import ZArith ROmega. +Open Scope Z_scope. + +(* Pierre L: examples gathered while debugging romega. *) + +Lemma test_romega_1 : + forall (z z1 z2 : Z), + z2 <= z1 -> + z1 <= z2 -> + z1 >= 0 -> + z2 >= 0 -> + z1 >= z2 /\ z = z1 \/ z1 <= z2 /\ z = z2 -> + z >= 0. +Proof. +intros. +romega. +Qed. + +Lemma test_romega_1b : + forall (z z1 z2 : Z), + z2 <= z1 -> + z1 <= z2 -> + z1 >= 0 -> + z2 >= 0 -> + z1 >= z2 /\ z = z1 \/ z1 <= z2 /\ z = z2 -> + z >= 0. +Proof. +intros z z1 z2. +(* romega. *) +Admitted. + +Lemma test_romega_2 : forall a b c:Z, + 0<=a-b<=1 -> b-c<=2 -> a-c<=3. +Proof. +intros. +romega. +Qed. + +Lemma test_romega_2b : forall a b c:Z, + 0<=a-b<=1 -> b-c<=2 -> a-c<=3. +Proof. +intros a b c. +(*romega.*) +Admitted. + +Lemma test_romega_3 : forall a b h hl hr ha hb, + 0 <= ha - hl <= 1 -> + -2 <= hl - hr <= 2 -> + h =b+1 -> + (ha >= hr /\ a = ha \/ ha <= hr /\ a = hr) -> + (hl >= hr /\ b = hl \/ hl <= hr /\ b = hr) -> + (-3 <= ha -hr <=3 -> 0 <= hb - a <= 1) -> + (-2 <= ha-hr <=2 -> hb = a + 1) -> + 0 <= hb - h <= 1. +Proof. +intros. +romega. +Qed. + +Lemma test_romega_3b : forall a b h hl hr ha hb, + 0 <= ha - hl <= 1 -> + -2 <= hl - hr <= 2 -> + h =b+1 -> + (ha >= hr /\ a = ha \/ ha <= hr /\ a = hr) -> + (hl >= hr /\ b = hl \/ hl <= hr /\ b = hr) -> + (-3 <= ha -hr <=3 -> 0 <= hb - a <= 1) -> + (-2 <= ha-hr <=2 -> hb = a + 1) -> + 0 <= hb - h <= 1. +Proof. +intros a b h hl hr ha hb. +romega. +Qed. + + +Lemma test_romega_4 : forall hr ha, + ha = 0 -> + (ha = 0 -> hr =0) -> + hr = 0. +Proof. +intros hr ha. +romega. +Qed. + +Lemma test_romega_5 : forall hr ha, + ha = 0 -> + (~ha = 0 \/ hr =0) -> + hr = 0. +Proof. +intros hr ha. +romega. +Qed. + +Lemma test_romega_6 : forall z, z>=0 -> 0>z+2 -> False. +Proof. +intros. +romega. +Qed. + +Lemma test_romega_6b : forall z, z>=0 -> 0>z+2 -> False. +Proof. +intros z. +(*romega. *) +Admitted. + +Lemma test_romega_7 : forall z, + 0>=0 /\ z=0 \/ 0<=0 /\ z =0 -> 1 = z+1. +Proof. +intros. +(*romega.*) +Admitted. + +Lemma test_romega_7b : forall z, + 0>=0 /\ z=0 \/ 0<=0 /\ z =0 -> 1 = z+1. +Proof. +intros. +(*romega.*) +Admitted. + +(* Magaud #240 *) + +Lemma test_romega_8 : forall x y:Z, x*x<y*y-> ~ y*y <= x*x. +intros. +romega. +Qed. + +Lemma test_romega_8b : forall x y:Z, x*x<y*y-> ~ y*y <= x*x. +intros x y. +romega. +Qed. + + + + |