aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite/bugs
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2010-03-27 14:22:00 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2010-03-27 14:22:00 +0000
commiteab11e537905472fdcc3257bc9913df82c82b3e4 (patch)
tree9a790e0f2b61d54dd9e562dac54377273638cc37 /test-suite/bugs
parentd69a67fc06051fd72895b60de4b908317511687f (diff)
Applied greenrd's patch to fix bug 2255 (injection failed to
detect indirect dependencies). git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12886 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'test-suite/bugs')
-rw-r--r--test-suite/bugs/closed/shouldsucceed/2255.v21
1 files changed, 21 insertions, 0 deletions
diff --git a/test-suite/bugs/closed/shouldsucceed/2255.v b/test-suite/bugs/closed/shouldsucceed/2255.v
new file mode 100644
index 000000000..bf80ff660
--- /dev/null
+++ b/test-suite/bugs/closed/shouldsucceed/2255.v
@@ -0,0 +1,21 @@
+(* Check injection in presence of dependencies hidden in applicative terms *)
+
+Inductive TupleT : nat -> Type :=
+ nilT : TupleT 0
+| consT {n} A : (A -> TupleT n) -> TupleT (S n).
+
+Inductive Tuple : forall n, TupleT n -> Type :=
+ nil : Tuple _ nilT
+| cons {n} A (x : A) (F : A -> TupleT n) : Tuple _ (F x) -> Tuple _ (consT A F).
+
+Goal forall n A F x X n0 A0 x0 F0 H0 (H : existT (fun n0 : nat => {H0 : TupleT
+n0 & Tuple n0 H0})
+ (S n0)
+ (existT (fun H0 : TupleT (S n0) => Tuple (S n0) H0)
+ (consT A0 F0) (cons A0 x0 F0 H0)) =
+ existT (fun n0 : nat => {H0 : TupleT n0 & Tuple n0 H0})
+ (S n)
+ (existT (fun H0 : TupleT (S n) => Tuple (S n) H0)
+ (consT A F) (cons A x F X))), False.
+intros.
+injection H.