Debian Codegraph @

test-suite/bugs/bug_1711.v

raw
1 (* Test for evar map consistency - was failing at some point and was *)
2 (* assumed to be solved from revision 10151 (but using a bad fix) *)
3
4 Set Implicit Arguments.
5
6 Inductive rose : Set := Rose : nat -> list rose -> rose.
7
8 Section RoseRec.
9 Variables (P: rose -> Set)(L: list rose -> Set).
10 Hypothesis
11 (R: forall n rs, L rs -> P (Rose n rs))
12 (Lnil: L nil)
13 (Lcons: forall r rs, P r -> L rs -> L (cons r rs)).
14
15 Fixpoint rose_rec2 (t:rose) {struct t} : P t :=
16 match t as x return P x with
17 | Rose n rs =>
18 R n ((fix rs_ind (l' : list rose): L l' :=
19 match l' as x return L x with
20 | nil => Lnil
21 | cons t tl => Lcons (rose_rec2 t) (rs_ind tl)
22 end)
23 rs)
24 end.
25 End RoseRec.
26
27 Lemma rose_map : rose -> rose.
28 Proof. intro H; elim H using rose_rec2 with
29 (L:=fun _ => list rose); (* was assumed to fail here *)
30 (* (L:=fun (_:list rose) => list rose); *)
31 clear H; simpl; intros.
32 exact (Rose n rs). exact nil. exact (cons H H0).
33 Defined.