diff options
| author | notin | 2007-12-21 18:56:05 +0000 |
|---|---|---|
| committer | notin | 2007-12-21 18:56:05 +0000 |
| commit | 57666ce7c6156906ffa67e42ed24447dd5bd4880 (patch) | |
| tree | b5708d6e682ced05ef40ab2cd1aed6be10074efb | |
| parent | 86641acb9e10e19844354906b0c517a3b4d9dcec (diff) | |
Ajouts de quelques tests sur les bugs
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10400 85f007b7-540e-0410-9357-904b9bb8a0f7
| -rw-r--r-- | test-suite/bugs/closed/shouldsucceed/1041.v | 13 | ||||
| -rw-r--r-- | test-suite/bugs/closed/shouldsucceed/1322.v (renamed from test-suite/bugs/closed/1322.v) | 0 | ||||
| -rw-r--r-- | test-suite/bugs/closed/shouldsucceed/1411.v | 5 | ||||
| -rw-r--r-- | test-suite/bugs/closed/shouldsucceed/1614.v | 21 | ||||
| -rw-r--r-- | test-suite/bugs/closed/shouldsucceed/1643.v | 15 | ||||
| -rw-r--r-- | test-suite/bugs/opened/shouldnotfail/1338.v | 12 | ||||
| -rw-r--r-- | test-suite/bugs/opened/shouldnotfail/1740.v | 20 |
7 files changed, 79 insertions, 7 deletions
diff --git a/test-suite/bugs/closed/shouldsucceed/1041.v b/test-suite/bugs/closed/shouldsucceed/1041.v new file mode 100644 index 0000000000..a5de82e0d8 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1041.v @@ -0,0 +1,13 @@ +Goal Prop. + +pose (P:=(fun x y :Prop => y)). +evar (Q: (forall X Y,P X Y -> Prop)) . + +instantiate (1:= fun _ => _ ) in (Value of Q). +instantiate (1:= fun _ => _ ) in (Value of Q). +instantiate (1:= fun _ => _ ) in (Value of Q). + +instantiate (1:=H) in (Value of Q). + +Admitted. + diff --git a/test-suite/bugs/closed/1322.v b/test-suite/bugs/closed/shouldsucceed/1322.v index 01c06f2c40..01c06f2c40 100644 --- a/test-suite/bugs/closed/1322.v +++ b/test-suite/bugs/closed/shouldsucceed/1322.v diff --git a/test-suite/bugs/closed/shouldsucceed/1411.v b/test-suite/bugs/closed/shouldsucceed/1411.v index 2ac7454b0c..11eb69b5d3 100644 --- a/test-suite/bugs/closed/shouldsucceed/1411.v +++ b/test-suite/bugs/closed/shouldsucceed/1411.v @@ -27,3 +27,8 @@ Program Fixpoint fetch t p (x:Exact t p) {struct x} := | Br l r, false::t => fetch r t _ end. +Next Obligation. inversion x. Qed. +Next Obligation. inversion x. Qed. +Next Obligation. inversion x; trivial. Qed. +Next Obligation. inversion x; trivial. Qed. + diff --git a/test-suite/bugs/closed/shouldsucceed/1614.v b/test-suite/bugs/closed/shouldsucceed/1614.v new file mode 100644 index 0000000000..6bc165d406 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1614.v @@ -0,0 +1,21 @@ +Require Import Ring. +Require Import ArithRing. + +Fixpoint eq_nat_bool (x y : nat) {struct x} : bool := +match x, y with +| 0, 0 => true +| S x', S y' => eq_nat_bool x' y' +| _, _ => false +end. + +Theorem eq_nat_bool_implies_eq : forall x y, eq_nat_bool x y = true -> x = y. +Proof. +induction x; destruct y; simpl; intro H; try (reflexivity || inversion H). +apply IHx in H; rewrite H; reflexivity. +Qed. + +Add Ring MyNatSRing : natSRth (decidable eq_nat_bool_implies_eq). + +Goal 0 = 0. + ring. +Qed. diff --git a/test-suite/bugs/closed/shouldsucceed/1643.v b/test-suite/bugs/closed/shouldsucceed/1643.v index 6ecbc810b7..4114987d36 100644 --- a/test-suite/bugs/closed/shouldsucceed/1643.v +++ b/test-suite/bugs/closed/shouldsucceed/1643.v @@ -4,17 +4,18 @@ CoInductive Str : Set := Cons (h:nat) (t:Str). Definition decomp_func (s:Str) := - match s with - | Cons h t => Cons h t - end. + match s with + | Cons h t => Cons h t + end. Theorem decomp s: s = decomp_func s. Proof. -intros s. -case s; simpl; reflexivity. + intros s. + case s; simpl; reflexivity. Qed. Definition zeros := (cofix z : Str := Cons 0 z). Lemma zeros_rw : zeros = Cons 0 zeros. -rewrite (decomp zeros). -simpl. + rewrite (decomp zeros). + simpl. +Admitted. diff --git a/test-suite/bugs/opened/shouldnotfail/1338.v b/test-suite/bugs/opened/shouldnotfail/1338.v new file mode 100644 index 0000000000..f383d53440 --- /dev/null +++ b/test-suite/bugs/opened/shouldnotfail/1338.v @@ -0,0 +1,12 @@ +Require Import Omega. + +Goal forall x, 0 <= x -> x <= 20 -> +x <> 0 + -> x <> 1 -> x <> 2 -> x <> 3 -> x <>4 -> x <> 5 -> x <> 6 -> x <> 7 -> x <> 8 +-> x <> 9 -> x <> 10 + -> x <> 11 -> x <> 12 -> x <> 13 -> x <> 14 -> x <> 15 -> x <> 16 -> x <> 17 +-> x <> 18 -> x <> 19 -> x <> 20 -> False. +Proof. + intros. + omega. +Qed. diff --git a/test-suite/bugs/opened/shouldnotfail/1740.v b/test-suite/bugs/opened/shouldnotfail/1740.v new file mode 100644 index 0000000000..bde7087865 --- /dev/null +++ b/test-suite/bugs/opened/shouldnotfail/1740.v @@ -0,0 +1,20 @@ + +Definition f := + fun n m : nat => + match n, m with + | O, _ => O + | n, O => n + | _, _ => O + end. + +Goal f = + fun n m : nat => + match n, m with + | O, _ => O + | n, O => n + | _, _ => O + end. + unfold f. + reflexivity. +Qed. + |
