| 1 |
(* File reduced by coq-bug-finder from original input, then from 9492 lines to 119 lines *) |
| 2 |
(* coqc version 8.5beta1 (January 2015) compiled on Jan 18 2015 7:27:36 with OCaml 3.12.1 |
| 3 |
coqtop version 8.5beta1 (January 2015) *) |
| 4 |
|
| 5 |
Set Typeclasses Dependency Order. |
| 6 |
|
| 7 |
Inductive paths {A : Type} (a : A) : A -> Type := |
| 8 |
idpath : paths a a. |
| 9 |
Arguments idpath {A a} , [A] a. |
| 10 |
Notation "x = y" := (@paths _ x y) : type_scope. |
| 11 |
Definition ap {A B:Type} (f:A -> B) {x y:A} (p:x = y) : f x = f y |
| 12 |
:= match p with idpath => idpath end. |
| 13 |
|
| 14 |
Set Implicit Arguments. |
| 15 |
Delimit Scope morphism_scope with morphism. |
| 16 |
Delimit Scope category_scope with category. |
| 17 |
Delimit Scope object_scope with object. |
| 18 |
|
| 19 |
Record PreCategory := Build_PreCategory' { |
| 20 |
object :> Type; |
| 21 |
morphism : object -> object -> Type; |
| 22 |
identity : forall x, morphism x x; |
| 23 |
compose : forall s d d', |
| 24 |
morphism d d' |
| 25 |
-> morphism s d |
| 26 |
-> morphism s d' }. |
| 27 |
Arguments identity {!C%_category} / x%_object : rename. |
| 28 |
Arguments compose {!C%_category} / {s d d'}%_object (m1 m2)%_morphism : rename. |
| 29 |
|
| 30 |
Class IsIsomorphism {C : PreCategory} {s d} (m : morphism C s d) := { |
| 31 |
morphism_inverse : morphism C d s; |
| 32 |
left_inverse : compose morphism_inverse m = identity _; |
| 33 |
right_inverse : compose m morphism_inverse = identity _ }. |
| 34 |
Arguments morphism_inverse {C s d} m {_}. |
| 35 |
Local Notation "m ^-1" := (morphism_inverse m) (at level 3, format "m '^-1'") : morphism_scope. |
| 36 |
|
| 37 |
Class Isomorphic {C : PreCategory} s d := { |
| 38 |
morphism_isomorphic :: morphism C s d; |
| 39 |
isisomorphism_isomorphic :: IsIsomorphism morphism_isomorphic }. |
| 40 |
Coercion morphism_isomorphic : Isomorphic >-> morphism. |
| 41 |
|
| 42 |
Parameter C : PreCategory. |
| 43 |
Parameters s d : C. |
| 44 |
|
| 45 |
Definition path_isomorphic (i j : Isomorphic s d) |
| 46 |
: @morphism_isomorphic _ _ _ i = @morphism_isomorphic _ _ _ j -> i = j. |
| 47 |
Admitted. |
| 48 |
|
| 49 |
Definition ap_morphism_inverse_path_isomorphic (i j : Isomorphic s d) p q |
| 50 |
: ap (fun e : Isomorphic s d => e^-1)%morphism (path_isomorphic i j p) = q. |
| 51 |
Abort. |