Debian Codegraph @

test-suite/bugs/bug_3428.v

raw
1 (* File reduced by coq-bug-finder from original input, then from 2809 lines to 39 lines *)
2 Set Primitive Projections.
3 Set Implicit Arguments.
4 Module Export foo.
5 Record prod (A B : Type) := pair { fst : A ; snd : B }.
6 End foo.
7 Inductive paths {A : Type} (a : A) : A -> Type := idpath : paths a a where "x = y" := (@paths _ x y) : type_scope.
8 Arguments idpath {A a} , [A] a.
9 Definition ap {A B:Type} (f:A -> B) {x y:A} (p:x = y) : f x = f y := match p with idpath => idpath end.
10 Axiom path_prod : forall {A B : Type} (z z' : prod A B), (fst z = fst z') -> (snd z = snd z') -> (z = z').
11 Notation fst := (@fst _ _).
12 Notation snd := (@snd _ _).
13 Definition ap_fst_path_prod {A B : Type} {z z' : prod A B} (p : @paths A (fst z) (fst z')) (q : snd z = snd z')
14 : ap fst (path_prod z z' p q) = p.
15 Abort.
16
17 Notation fstp x := (x.(foo.fst)).
18 Notation fstap x := (foo.fst x).
19
20 Definition ap_fst_path_prod' {A B : Type} {z z' : prod A B} (p : @paths A (fst z) (fst z')) (q : snd z = snd z')
21 : ap (fun x => fstap x) (path_prod z z' p q) = p.
22
23 Abort.
24
25 (* Toplevel input, characters 137-138:
26 Error:
27 In environment
28 A : Type
29 B : Type
30 z : prod A B
31 z' : prod A B
32 p : @paths A (foo.fst ?11 ?14 z) (foo.fst ?26 ?29 z')
33 q : @paths ?54 (foo.snd ?42 ?45 z) (foo.snd ?57 ?60 z')
34 The term "p" has type "@paths A (foo.fst ?11 ?14 z) (foo.fst ?26 ?29 z')"
35 while it is expected to have type "@paths A (foo.fst z) (foo.fst z')". *)