Debian Codegraph @

test-suite/bugs/bug_17346_1.v

raw
1 Require Import Setoid.
2
3 Import Corelib.Classes.Morphisms.
4 Import Corelib.Relations.Relation_Definitions.
5
6 Lemma interp (base_interp : nat -> Type) : Type.
7 Admitted.
8
9 Lemma related {base_interp : nat -> Type} (R : forall t, relation (base_interp t))
10 : relation (interp base_interp).
11 Admitted.
12
13 Axiom Forall : forall [A : Type], (A -> Prop) -> list A -> Prop.
14 Axiom Forall2 : forall [A B : Type], (A -> B -> Prop) -> list A -> list B -> Prop.
15
16 Lemma Forall2_Forall {A R ls}
17 : @Forall2 A A R ls ls
18 <-> @Forall A (Proper R) ls.
19 Admitted.
20
21 Axiom base_interp : nat -> Type.
22
23 Lemma foo
24 (l' : list (interp base_interp))
25 (H : Forall (fun v : interp base_interp => related (fun t : nat => eq) v v) l')
26 : True.
27 erewrite <- (Forall2_Forall (R:=related (fun _ => eq))) in H.
28 exact I.
29 Qed.
30 (*
31 unmodified:
32 ((Forall2_Forall (interp ?X22@{__:=?M0; __:=?M0})
33 (related ?X22@{__:=?M0; __:=?M0}
34 (fun t : nat => eq (?X22@{__:=?M0; __:=?M0} t)))
35 ?X25@{__:=?M0; __:=?M0}),
36 NoBindings)
37
38 in unify_app for the first time
39 l1 = [|(interp ?X22@{__:=?M0; __:=?M0});
40 (Proper (interp ?X22@{__:=?M0; __:=?M0})
41 (related ?X22@{__:=?M0; __:=?M0}
42 (fun t : nat => eq (?X22@{__:=?M0; __:=?M0} t))));
43 ?X25@{__:=?M0; __:=?M0}|]
44 l2 = [|(interp base_interp);
45 (fun v : interp base_interp =>
46 related base_interp (fun t : nat => eq (base_interp t)) v v);
47 l'|]
48
49
50 modified
51 ((Forall2_Forall ?X21@{__:=?M0; __:=?M0}
52 (related ?X22@{__:=?M0; __:=?M0}
53 (fun t : nat => eq ?X24@{__:=?M0; __:=?M0; __:=t}))
54 ?X25@{__:=?M0; __:=?M0}),
55 NoBindings)
56
57 unify_app
58 l1 = [|?X21@{__:=?M0; __:=?M0};
59 (Proper ?X21@{__:=?M0; __:=?M0}
60 (related ?X22@{__:=?M0; __:=?M0}
61 (fun t : nat => eq ?X24@{__:=?M0; __:=?M0; __:=t})));
62 ?X25@{__:=?M0; __:=?M0}|]
63 l2 = [|(interp base_interp);
64 (fun v : interp base_interp =>
65 related base_interp (fun t : nat => eq (base_interp t)) v v);
66 l'|]
67
68 ?X21==[l' H |- => interp ?base_interp@{l':=l'; H:=H}] (parameter A of
69 Forall2_Forall)
70 ?X22==[l' H |- ] (parameter base_interp of related) {?base_interp}
71
72 (?X22, SList.Default (2, SList.Nil)), base_interp goes into the evarsubst
73
74 *)