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 /test-suite/bugs/closed/shouldsucceed | |
| 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
Diffstat (limited to 'test-suite/bugs/closed/shouldsucceed')
| -rw-r--r-- | test-suite/bugs/closed/shouldsucceed/1041.v | 13 | ||||
| -rw-r--r-- | test-suite/bugs/closed/shouldsucceed/1322.v | 24 | ||||
| -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 |
5 files changed, 71 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/shouldsucceed/1322.v b/test-suite/bugs/closed/shouldsucceed/1322.v new file mode 100644 index 0000000000..01c06f2c40 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1322.v @@ -0,0 +1,24 @@ +Require Import Setoid. + +Section transition_gen. + +Variable I : Type. +Variable I_eq :I -> I -> Prop. +Variable I_eq_equiv : Setoid_Theory I I_eq. + +(* Add Relation I I_eq + reflexivity proved by I_eq_equiv.(Seq_refl I I_eq) + symmetry proved by I_eq_equiv.(Seq_sym I I_eq) + transitivity proved by I_eq_equiv.(Seq_trans I I_eq) +as I_eq_relation. *) + +Add Setoid I I_eq I_eq_equiv as I_with_eq. + +Variable F : I -> Type. +Variable F_morphism : forall i j, I_eq i j -> F i = F j. + + +Add Morphism F with signature I_eq ==> eq as F_morphism2. +Admitted. + +End transition_gen. 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. |
