Debian Codegraph @

test-suite/bugs/bug_4383.v

raw
1 Definition resp {A B} (R:A->A->Prop) (R':B->B->Prop) (f g : A -> B)
2 := forall x y, R x y -> R' (f x) (g y).
3 Definition restr {A} P R (x y : A) := (P x /\ P y) /\ R x y .
4 Definition func {A} (P:A -> Prop) F := A -> F .
5
6 Lemma foo {A B} {P:A->Prop} {R1} {R2:B->B->Prop} {f g}
7 (E : resp (restr P R1) R2 f g) x : P x -> R1 x x -> R2 (f x) (g x).
8 Proof. firstorder. Qed.
9
10 Section sec.
11 Context A (P:A->Prop) (R1:A->A->Prop).
12 Context B (R2:B->B->Prop).
13 Context (f g : func P B).
14
15 Definition R' := resp (restr P R1) R2.
16
17 Context (E: R' f g) (x:A).
18
19 Goal True.
20 pose proof foo E x.
21 Abort.
22
23 Typeclasses Opaque func.
24
25 Goal True.
26 pose proof foo E x.
27 (* Used to be: Unable to unify "R2 (f x0) (g y)" with
28 "?R2 (?f x0) (?g y)". *)
29 pose proof foo (f:=f) (g:=g) E x.
30 Abort.
31 End sec.