Debian Codegraph @

test-suite/bugs/bug_4490.v

raw
1 Require Import ListDef Morphisms.
2
3 Definition list_caset A (P : list A -> Type) (N : P nil) (C : forall x xs, P (x::xs))
4 ls
5 : P ls
6 := match ls with
7 | nil => N
8 | x::xs => C x xs
9 end.
10
11 Global Instance list_caset_Proper {A P}
12 : Proper (eq
13 ==> pointwise_relation _ (pointwise_relation _ eq)
14 ==> pointwise_relation _ eq)
15 (@ list_caset A (fun _ => P)).
16 Proof.
17 lazy.
18 intros ??? ?? H [|? ?]; subst; eauto.
19 Qed.
20
21 Global Instance list_caset_Proper' {A P}
22 : Proper (eq
23 ==> pointwise_relation _ (pointwise_relation _ eq)
24 ==> eq
25 ==> eq)
26 (@ list_caset A (fun _ => P)).
27 Proof.
28 lazy.
29 intros ??? ?? H [|? ?] ??; subst; eauto.
30 Qed.
31
32 Goal True.
33 Proof.
34 Succeed let P := nat in
35 let A := nat in
36 pose proof (_ : Proper (@ eq P ==> pointwise_relation A (pointwise_relation _ eq) ==> _ ==> _) (@ list_caset A (fun _ => P))).
37 Succeed let P := nat in
38 let A := nat in
39 pose proof (_ : Proper (@ eq P ==> pointwise_relation A _ ==> _ ==> _) (@ list_caset A (fun _ => P))).
40 Abort.