diff options
| author | herbelin | 2010-05-10 12:51:01 +0000 |
|---|---|---|
| committer | herbelin | 2010-05-10 12:51:01 +0000 |
| commit | cf45db61ef11da9062fc83176ed758d58fb2bc83 (patch) | |
| tree | c3b513d1902da22b1025acac234c5472baab5437 | |
| parent | 8dffde4935aa579bfbcbb321ff542861315c5c7e (diff) | |
Backporting r13007 (evar_merge wrong and costly) to V8.3 and added test.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13009 85f007b7-540e-0410-9357-904b9bb8a0f7
| -rw-r--r-- | test-suite/bugs/closed/shouldsucceed/1711.v | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test-suite/bugs/closed/shouldsucceed/1711.v b/test-suite/bugs/closed/shouldsucceed/1711.v new file mode 100644 index 0000000000..e16612e380 --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/1711.v @@ -0,0 +1,34 @@ +(* Test for evar map consistency - was failing at some point and was *) +(* assumed to be solved from revision 10151 (but using a bad fix) *) + +Require Import List. +Set Implicit Arguments. + +Inductive rose : Set := Rose : nat -> list rose -> rose. + +Section RoseRec. +Variables (P: rose -> Set)(L: list rose -> Set). +Hypothesis + (R: forall n rs, L rs -> P (Rose n rs)) + (Lnil: L nil) + (Lcons: forall r rs, P r -> L rs -> L (cons r rs)). + +Fixpoint rose_rec2 (t:rose) {struct t} : P t := + match t as x return P x with + | Rose n rs => + R n ((fix rs_ind (l' : list rose): L l' := + match l' as x return L x with + | nil => Lnil + | cons t tl => Lcons (rose_rec2 t) (rs_ind tl) + end) + rs) + end. +End RoseRec. + +Lemma rose_map : rose -> rose. +Proof. intro H; elim H using rose_rec2 with + (L:=fun _ => list rose); (* was assumed to fail here *) +(* (L:=fun (_:list rose) => list rose); *) + clear H; simpl; intros. + exact (Rose n rs). exact nil. exact (H::H0). +Defined. |
