Debian Codegraph @

test-suite/bugs/bug_3567.v

raw
1
2 (* File reduced by coq-bug-finder from original input, then from 2901 lines to 69 lines, then from 80 lines to 63 lines *)
3 (* coqc version trunk (September 2014) compiled on Sep 2 2014 2:7:1 with OCaml 4.01.0
4 coqtop version cagnode17:/afs/csail.mit.edu/u/j/jgross/coq-trunk,trunk (3c5daf4e23ee20f0788c0deab688af452e83ccf0) *)
5
6 Set Primitive Projections.
7 Set Implicit Arguments.
8 Record prod (A B : Type) := pair { fst : A ; snd : B }.
9 Arguments fst {A B} _ / .
10 Arguments snd {A B} _ / .
11 Add Printing Let prod.
12 Notation "x * y" := (prod x y) : type_scope.
13 Notation "( x , y , .. , z )" := (pair .. (pair x y) .. z) : core_scope.
14 Unset Implicit Arguments.
15 Inductive paths {A : Type} (a : A) : A -> Type := idpath : paths a a where "x = y" := (@paths _ x y) : type_scope.
16 Arguments idpath {A a} , [A] a.
17 Definition ap {A B:Type} (f:A -> B) {x y:A} (p:x = y) : f x = f y := match p with idpath => idpath end.
18 Definition Sect {A B : Type} (s : A -> B) (r : B -> A) := forall x : A, r (s x) = x.
19 Class IsEquiv {A B : Type} (f : A -> B) :=
20 { equiv_inv : B -> A ;
21 eisretr : Sect equiv_inv f;
22 eissect : Sect f equiv_inv;
23 eisadj : forall x : A, eisretr (f x) = ap f (eissect x) }.
24 Definition path_prod_uncurried {A B : Type} (z z' : A * B) (pq : (fst z = fst z') * (snd z = snd z'))
25 : (z = z')
26 := match fst pq in (_ = z'1), snd pq in (_ = z'2) return z = (z'1, z'2) with
27 | idpath, idpath => idpath
28 end.
29 Definition path_prod {A B : Type} (z z' : A * B) :
30 (fst z = fst z') -> (snd z = snd z') -> (z = z')
31 := fun p q => path_prod_uncurried z z' (p,q).
32 Definition path_prod' {A B : Type} {x x' : A} {y y' : B}
33 : (x = x') -> (y = y') -> ((x,y) = (x',y'))
34 := fun p q => path_prod (x,y) (x',y') p q.
35 Axiom ap_fst_path_prod : forall {A B : Type} {z z' : A * B}
36 (p : fst z = fst z') (q : snd z = snd z'),
37 ap fst (path_prod _ _ p q) = p.
38 Axiom ap_snd_path_prod : forall {A B : Type} {z z' : A * B}
39 (p : fst z = fst z') (q : snd z = snd z'),
40 ap snd (path_prod _ _ p q) = q.
41 Axiom eta_path_prod : forall {A B : Type} {z z' : A * B} (p : z = z'),
42 path_prod _ _(ap fst p) (ap snd p) = p.
43 Definition isequiv_path_prod {A B : Type} {z z' : A * B} : IsEquiv (path_prod_uncurried z z').
44 Proof.
45 refine (Build_IsEquiv
46 _ _ _
47 (fun r => (ap fst r, ap snd r))
48 eta_path_prod
49 (fun pq => match pq with
50 | (p,q) => path_prod'
51 (ap_fst_path_prod p q) (ap_snd_path_prod p q)
52 end) _).
53 destruct z as [x y], z' as [x' y']. simpl.
54 (* Toplevel input, characters 15-50:
55 Error: Abstracting over the term "z" leads to a term
56 fun z0 : A * B =>
57 forall x : (fst z0 = fst z') * (snd z0 = snd z'),
58 eta_path_prod (path_prod_uncurried z0 z' x) =
59 ap (path_prod_uncurried z0 z')
60 (let (p, q) as pq
61 return
62 ((ap (fst) (path_prod_uncurried z0 z' pq),
63 ap (snd) (path_prod_uncurried z0 z' pq)) = pq) := x in
64 path_prod' (ap_fst_path_prod p q) (ap_snd_path_prod p q))
65 which is ill-typed.
66 Reason is: Pattern-matching expression on an object of inductive type prod
67 has invalid information.
68 *)
69 Abort.