-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDiscreteCategory.v
46 lines (36 loc) · 1.35 KB
/
DiscreteCategory.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Require Export SpecializedCategory.
Require Import Common.
Set Implicit Arguments.
Set Asymmetric Patterns.
Set Universe Polymorphism.
Section DCategory.
Variable O : Type.
Local Ltac simpl_eq := subst_body; hnf in *; simpl in *; intros; destruct_type @inhabited; simpl in *;
repeat constructor;
repeat subst;
auto;
simpl_transitivity.
Let DiscreteCategory_Morphism (s d : O) := s = d.
Definition DiscreteCategory_Compose (s d d' : O) (m : DiscreteCategory_Morphism d d') (m' : DiscreteCategory_Morphism s d) :
DiscreteCategory_Morphism s d'.
simpl_eq.
Defined.
Definition DiscreteCategory_Identity o : DiscreteCategory_Morphism o o.
simpl_eq.
Defined.
Global Arguments DiscreteCategory_Compose [s d d'] m m' /.
Global Arguments DiscreteCategory_Identity o /.
Definition DiscreteCategory : @SpecializedCategory O.
refine (@Build_SpecializedCategory _
DiscreteCategory_Morphism
DiscreteCategory_Identity
DiscreteCategory_Compose
_
_
_);
abstract (
unfold DiscreteCategory_Compose, DiscreteCategory_Identity;
simpl_eq
).
Defined.
End DCategory.