aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2008-06-18 21:21:47 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2008-06-18 21:21:47 +0000
commit8838528fb6fe72499ea37beeaf26d409ead90102 (patch)
tree5da998ac8526f075d352d908fa8558c57f87d630 /test-suite
parentaecc008e57ca056552c8bbb156d2b45b70575c1d (diff)
Propagation des révisions 11144 et 11136 de la 8.2 vers le trunk
(résolution entre autres des bugs 1882, 1883, 1884). git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11145 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/success/apply.v16
-rw-r--r--test-suite/success/destruct.v19
-rw-r--r--test-suite/success/evars.v24
3 files changed, 59 insertions, 0 deletions
diff --git a/test-suite/success/apply.v b/test-suite/success/apply.v
index deeab4cb6..fcce68b91 100644
--- a/test-suite/success/apply.v
+++ b/test-suite/success/apply.v
@@ -185,3 +185,19 @@ intro.
eapply H.
apply (forall B:Prop,B->B) || (instantiate (1:=True); exact I).
Defined.
+
+(* Fine-tuning coercion insertion in presence of unfolding (bug #1883) *)
+
+Parameter name : Set.
+Definition atom := name.
+
+Inductive exp : Set :=
+ | var : atom -> exp.
+
+Coercion var : atom >-> exp.
+
+Axiom silly_axiom : forall v : exp, v = v -> False.
+
+Lemma silly_lemma : forall x : atom, False.
+intros x.
+apply silly_axiom with (v := x). (* fails *)
diff --git a/test-suite/success/destruct.v b/test-suite/success/destruct.v
index 02f88b727..5aa78816b 100644
--- a/test-suite/success/destruct.v
+++ b/test-suite/success/destruct.v
@@ -36,3 +36,22 @@ Theorem Refl : forall P, P <-> P. tauto. Qed.
Goal True.
case Refl || ecase Refl.
Abort.
+
+
+(* Submitted by B. Baydemir (bug #1882) *)
+
+Require Import List.
+
+Definition alist R := list (nat * R)%type.
+
+Section Properties.
+ Variables A : Type.
+ Variables a : A.
+ Variables E : alist A.
+
+ Lemma silly : E = E.
+ Proof.
+ clear. induction E. (* this fails. *)
+ Abort.
+
+End Properties.
diff --git a/test-suite/success/evars.v b/test-suite/success/evars.v
index e117bf62f..082cbfbe1 100644
--- a/test-suite/success/evars.v
+++ b/test-suite/success/evars.v
@@ -186,3 +186,27 @@ refine
Abort.
End Additions_while.
+
+(* Two examples from G. Melquiond (bugs #1878 and #1884) *)
+
+Parameter F1 G1 : nat -> Prop.
+Goal forall x : nat, F1 x -> G1 x.
+refine (fun x H => proj2 (_ x H)).
+Abort.
+
+Goal forall x : nat, F1 x -> G1 x.
+refine (fun x H => proj2 (_ x H) _).
+Abort.
+
+(* Remark: the following example does not succeed any longer in 8.2 because,
+ the algorithm is more general and does exclude a solution that it should
+ exclude for typing reason. Handling of types and backtracking is still to
+ be done
+
+Section S.
+Variables A B : nat -> Prop.
+Goal forall x : nat, A x -> B x.
+refine (fun x H => proj2 (_ x H) _).
+Abort.
+End S.
+*)