summaryrefslogtreecommitdiff
path: root/test-suite/bugs/closed/1791.v
diff options
context:
space:
mode:
authorGravatar Enrico Tassi <gareuselesinge@debian.org>2015-01-25 14:42:51 +0100
committerGravatar Enrico Tassi <gareuselesinge@debian.org>2015-01-25 14:42:51 +0100
commit7cfc4e5146be5666419451bdd516f1f3f264d24a (patch)
treee4197645da03dc3c7cc84e434cc31d0a0cca7056 /test-suite/bugs/closed/1791.v
parent420f78b2caeaaddc6fe484565b2d0e49c66888e5 (diff)
Imported Upstream version 8.5~beta1+dfsg
Diffstat (limited to 'test-suite/bugs/closed/1791.v')
-rw-r--r--test-suite/bugs/closed/1791.v38
1 files changed, 38 insertions, 0 deletions
diff --git a/test-suite/bugs/closed/1791.v b/test-suite/bugs/closed/1791.v
new file mode 100644
index 00000000..be0e8ae8
--- /dev/null
+++ b/test-suite/bugs/closed/1791.v
@@ -0,0 +1,38 @@
+(* simpl performs eta expansion *)
+
+Set Implicit Arguments.
+Require Import List.
+
+Definition k0 := Set.
+Definition k1 := k0 -> k0.
+
+(** iterating X n times *)
+Fixpoint Pow (X:k1)(k:nat){struct k}:k1:=
+ match k with 0 => fun X => X
+ | S k' => fun A => X (Pow X k' A)
+ end.
+
+Parameter Bush: k1.
+Parameter BushToList: forall (A:k0), Bush A -> list A.
+
+Definition BushnToList (n:nat)(A:k0)(t:Pow Bush n A): list A.
+Proof.
+ intros.
+ induction n.
+ exact (t::nil).
+ simpl in t.
+ exact (flat_map IHn (BushToList t)).
+Defined.
+
+Parameter bnil : forall (A:k0), Bush A.
+Axiom BushToList_bnil: forall (A:k0), BushToList (bnil A) = nil(A:=A).
+
+Lemma BushnToList_bnil (n:nat)(A:k0):
+ BushnToList (S n) A (bnil (Pow Bush n A)) = nil.
+Proof.
+ intros.
+ simpl.
+ rewrite BushToList_bnil.
+ simpl.
+ reflexivity.
+Qed.