A categoryC is a collection of objects, denoted
objC together with a collection of classes of morphisms
between pairs of objects, each of which is denoted Mor(a,b) for any pair
a,b∈objC, such that the following data is given:
(1). For any objects a,b,c∈objC, there
exist composition maps
∘:Mor(b,c)×Mor(a,b)→Mor(a,c)
associating to each pair of morphisms (g,f) a morphism g∘f called the
composition of the morphism g with the morphism f.
(2). For any objects a,b,c,d∈objC, and for
any morphisms f∈Mor(a,b), g∈Mor(b,c), and h∈Mor(c,d), the composition
maps between morphisms associate wherever they exist; that is:
h∘(g∘f)=(h∘g)∘f
whenever either h∘(g∘f) or (h∘g)∘f
exists.
(3). For any object a∈objC, there is a
morphism ida∈Mor(a,a), called the identity
morphism on a, such that for any objects b,c∈objC,
and for any morphisms f∈Mor(a,b) and g∈Mor(c,a),
the following holds:
f∘ida=f and ida∘g=g
Given objects a,b∈objC, we denote a morphism f∈Mor(a,b) by f:a→b.
(sidenote: Here we take the terms _object_ and _morphism_ to be undefined.
)