Debian Codegraph @

test-suite/bugs/HoTT_coq_124.v

raw
1 Set Implicit Arguments.
2 Set Primitive Projections.
3
4 Polymorphic Inductive eqp A (x : A) : A -> Type := eqp_refl : eqp x x.
5 Monomorphic Inductive eqm A (x : A) : A -> Type := eqm_refl : eqm x x.
6
7 Polymorphic Record prodp (A B : Type) : Type := pairp { fstp : A; sndp : B }.
8 Monomorphic Record prodm (A B : Type) : Type := pairm { fstm : A; sndm : B }.
9
10 Check eqm_refl _ : eqm (fun x : prodm Set Set => pairm (fstm x) (sndm x)) (fun x => x). (* success *)
11 Check eqp_refl _ : eqp (fun x : prodm Set Set => pairm (fstm x) (sndm x)) (fun x => x). (* success *)
12 Check eqm_refl _ : eqm (fun x : prodp Set Set => pairp (fstp x) (sndp x)) (fun x => x). (* Error:
13 The term
14 "eqm_refl (fun x : prodp Set Set => {| fstp := fstp x; sndp := sndp x |})"
15 has type
16 "eqm (fun x : prodp Set Set => {| fstp := fstp x; sndp := sndp x |})
17 (fun x : prodp Set Set => {| fstp := fstp x; sndp := sndp x |})"
18 while it is expected to have type
19 "eqm (fun x : prodp Set Set => {| fstp := fstp x; sndp := sndp x |})
20 (fun x : prodp Set Set => x)". *)
21 Check eqp_refl _ : eqp (fun x : prodp Set Set => pairp (fstp x) (sndp x)) (fun x => x). (* Error:
22 The term
23 "eqp_refl (fun x : prodp Set Set => {| fstp := fstp x; sndp := sndp x |})"
24 has type
25 "eqp (fun x : prodp Set Set => {| fstp := fstp x; sndp := sndp x |})
26 (fun x : prodp Set Set => {| fstp := fstp x; sndp := sndp x |})"
27 while it is expected to have type
28 "eqp (fun x : prodp Set Set => {| fstp := fstp x; sndp := sndp x |})
29 (fun x : prodp Set Set => x)". *)