Debian Codegraph @

test-suite/bugs/bug_4498.v

raw
1 Require Export Corelib.Classes.Morphisms.
2 Require Export Corelib.Relations.Relation_Definitions.
3 Require Export Corelib.Setoids.Setoid.
4
5 Set Universe Polymorphism.
6
7 Reserved Notation "a ~> b" (at level 90, right associativity).
8
9 Class Category := {
10 ob : Type;
11 uhom := Type : Type;
12 hom : ob -> ob -> uhom where "a ~> b" := (hom a b);
13 compose : forall {A B C}, (B ~> C) -> (A ~> B) -> (A ~> C);
14 equiv : forall {A B}, relation (A ~> B);
15 is_equiv : forall {A B}, @Equivalence (A ~> B) equiv;
16 comp_respects : forall {A B C},
17 Proper (@equiv B C ==> @equiv A B ==> @equiv A C) (@compose A B C);
18 }.
19
20 Add Parametric Morphism `{Category} {A B C} : (@compose _ A B C) with
21 signature equiv ==> equiv ==> equiv as compose_mor.
22 Proof. apply comp_respects. Qed.