Debian Codegraph @

test-suite/bugs/bug_4782.v

raw
1 (* About typing of with bindings *)
2
3 Record r : Type := mk_r { type : Type; cond : type -> Prop }.
4
5 Inductive p : Prop := consp : forall (e : r) (x : type e), cond e x -> p.
6
7 Goal p.
8 Fail apply consp with (fun _ : bool => mk_r unit (fun x => True)) nil.
9 Abort.
10
11 (* A simplification of an example from coquelicot, which was failing
12 at some time after a fix #4782 was committed. *)
13
14 Record T := { dom : Type }.
15 Definition pairT A B := {| dom := (dom A * dom B)%type |}.
16 Class C (A:Type).
17 Parameter B:T.
18 #[export] Instance c (A:T) : C (dom A) := {}.
19 #[export] Instance cn : C (dom B) := {}.
20 Parameter F : forall A:T, C (dom A) -> forall x:dom A, x=x -> A = A.
21 Set Typeclasses Debug.
22 Goal forall (A:T) (x:dom A), pairT A A = pairT A A.
23 intros.
24 apply (F _ _) with (x,x).
25 Abort.