Professional Documents
Culture Documents
- 58 -
- 59 -
Terminal objects
An object I |K| is terminal in K if for each object A |K| there is exactly one
morphism from A to I.
terminal = co-initial
Exercises:
- 60 -
Products
A product of two objects A, B |K|, is any object A B |K| with two morphisms
(product projections) 1 : A B A and 2 : A B B such that for any object
C |K| with morphisms f1 : C A and f2 : C B there exists a unique morphism
h : C A B such that h;1 = f1 and h;2 = f2 .
1
2
AB
A
B
In Set, Cartesian product is a product
I
@
6
@
@
! h
We write hf1 , f2 i for h defined as above. Then:
f1 @
f2
@
hf1 , f2 i;1 = f1 and hf1 , f2 i;2 = f2 . Moreover,
@
for any h into the product A B: h = hh;1 , h;2 i.
C
Essentially, this equationally defines a product!
Fact: Products are defined to within an isomorphism (which commutes with
projections).
- 61 -
Exercises
Product commutes (up to isomorphism): A B
=BA
Product is associative (up to isomorphism): (A B) C
= A (B C)
What is a product of two objects in a preorder category?
Define the product of any family of objects. What is the product of the empty
family?
For any algebraic signature |AlgSig|, try to define products in Alg(),
PAlgs (), PAlg(). Expect troubles in the two latter cases. . .
Define products in the category of partial functions, Pfn, with sets (as objects)
and partial functions as morphisms between them.
Define products in the category of relations, Rel, with sets (as objects) and
binary relations as morphisms between them.
BTW: What about products in Relop ?
- 62 -
Coproducts
coproduct = co-product
- 63 -
Equalisers
An equaliser of two parallel morphisms f, g : A B is a morphism e : E A such
that e;f = e;g, and such that for all h : H A, if h;f = h;g then for a unique
f
morphism k : H E, k;e = h.
e
-A
-B
E
g
3
6
Equalisers are unique up to isomorphism.
! k
h
Every equaliser is mono.
H
Every epi equaliser is iso.
In Set, given functions f, g : A B, define E = {a A | f (a) = g(a)}
The inclusion e : E , A is an equaliser of f and g.
Define equalisers in Alg().
Try also in: PAlgs (), PAlg(), Pfn, Rel, . . .
- 64 -
Coequalisers
A coequaliser of two parallel morphisms f, g : A B is a morphism c : B C
such that f ;c = g;c, and such that for all h : B H, if f ;h = g;h then for a unique
f
morphism k : C H, c;k = h.
c
-C
-B
A
g
Q
Coequalisers are unique up to isomorphism.
Q
Q
! k
Q
h
Every coequaliser is epi.
QQ
s ?
Every mono coequaliser is iso.
H
In Set, given functions f, g : A B,
let B B be the least equivalence such that f (a) g(a) for all a A
The quotient function [ ] : B B/ is a coequaliser of f and g.
Define coequalisers in Alg().
Try also in: PAlgs (), PAlg(), Pfn, Rel, . . .
- 65 -
Pullbacks
A pullback of two morphisms with common target f : A C and g : B C is an
object P |K| with morphisms j : P A and k : P B such that j;f = k;g, and
such that for all P 0 |K| with morphisms j 0 : P 0 A and k 0 : P 0 B, if
j 0 ;f = k 0 ;g then for a unique morphism h : P 0 P , h;j = j 0 and h;k = k 0 .
C
In Set, given functions f : A C and f : B C,
define P = {ha, bi A B | f (a) = g(b)}
I
@
@g
@
@
A
B
I
AK@
j
k
A@
@
A
@
A0
0
P
jA
k
A 6
A! h
A
P0
- 66 -
Few facts
C
I
@
@g
@
@
If K has all products (of pairs of objects) and all equalisers (of pairs of parallel morphisms) then it has all pullB
A
backs (of pairs of morphisms with common target).
@
I
6
6
2
@ 1
If K has all pullbacks and a terminal object then it
@
has all binary products and equalisers. HINT: to build
-@
AB
an equaliser of f, g : A B, consider a pullback of
6
hidA , f i, hidA , gi : A A B.
eq(1 ;f, 2 ;g)
Pullbacks translate monos to monos: if the following is
a pullback square and f is mono then f 0 is mono as well.
60
f6
f
j0
P
0
&
P
k0
- 67 -
Pushouts
pushout = co-pullback
P0
AK
6
! h A
A
0
j
A k0
P
@
I A
@ A
k@ A
j
@A
A
B
I
@
@
g
f@
@
C
- 68 -
Example
{0, 1, 2, 3}
@ {1 7 [1 = 1],
I
@ 2 7 2, 3 7 [2, 3]}
@
@
{1, 2, 3}
PO
@
I
@
{a 7 1, b 7 2}@
{a 7 1, b 7 3}
@
{a, b}
- 69 -
Example in AlgSig
sort String
ops a, . . . , z : String;
b : String String
String
6
PO
sort Elem
- 70 -
Graphs
A graph consists of sets of nodes and edges,
and indicate source and target nodes for each edge
Graph = sorts nodes, edges
opns source : edges nodes
target : edges nodes
- 71 -
Diagrams
A diagram in K is a graph with nodes labelled with K-objects
and edges labelled with K-morphisms with appropriate sources and targets.
A diagram D consists of:
a graph G(D),
an object Dn |K| for each node n |G(D)|nodes ,
a morphism De : Dsource(e) Dtarget(e) for each edge e |G(D)|edges .
For any small category K, define its diagram, D(K), with graph G(D(K)) = G(K)
- 72 -
Diagram categories
Given a graph G with nodes N = |G|nodes and edges
E = |G|edges , the category of diagrams of shape G in
K, DiagG
K , is defined as follows:
objects: all diagrams D in K with G(D) = G
morphisms: for any two diagrams D and D0 in K
of shape G, a morphism : D D0 is any family
= hn : Dn Dn0 inN of morphisms in K such
that for each edge e E with source G(D) (e) = n
and target G(D) (e) = m,
n ;De0 = De ;m
.
'
$
AK
A
De
Dn
Dm
&
%
'
$
?
?
AK
A ? De0 - ?
0
Dn0
Dm
&
%
- 73 -
Let D be a diagram over G(D) with nodes N = |G(D)|nodes and edges E = |G(D)|edges .
X
BS
BS
B S
'
$
B S
w
/
B S
B m
AK n
A
De -BBN
D
Dm %
n
&
BMBS
7
o
BS
S
B
S
A cocone on D (in K) is an object X |K| together
'
$
B
S
B
with a family of morphisms hn : Dn XinN such
Bm
AK n
that for each edge e E with source G(D) (e) = n and
A
De -B
- 74 -
X
X0
h
Z
C
J Z
C
J Z
J
ZZ C
D such that for all cones hn0 : X 0 Dn inN on D, '
$
J
C
~W
Z
=
for a unique morphism h : X 0 X, h;n = n0 for all
J
AKA
J
n0
n N.
J
^?
A?
-X 0
D
X
n
&
%
h
}
Z
>
]
JZ
6
CO
6
J Z
C
n Z
C
J
Z
J
Z C
'
$
A colimit of D (in K) is a cocone hn : Dn XinN
Z
C
J
0
0
J
on
D
such
that
for
all
cocones
h
:
D
X
inN on
n
n
0
AKA
n
J
D, for a unique morphism h : X X 0 , n ;h = n0 for
A
J
-
Dn
all n N .
&
%
- 75 -
Some limits
diagram
limit
in Set
(empty)
terminal object
{}
product
AB
A
B
equaliser
{a A | f (a) = g(a)} , A
pullback
A
f
A C B
- 76 -
. . . & colimits
diagram
colimit
in Set
(empty)
initial object
coproduct
A]B
A
B
coequaliser
B B/
A
f
A C B
pushout
(A ] B)/
where f (c) g(c) for all c C
- 77 -
Exercises
For any diagram D, define the category of cones over D, Cone(D):
objects: all cones over D
morphisms: a morphism from hn : X Dn inN to hn0 : X 0 Dn inN is
any K-morphism h : X X 0 such that h;n0 = n for all n N .
Show that limits of D are terminal objects in Cone(D). Conclude that limits are
defined uniquely up to isomorphism (which commutes with limit projections).
Construct a limit in Set of the following diagram:
f0
f1
f2
A0 A1 A2
Show that limiting cones are jointly mono, i.e., if hn : X Dn inN is a limit
of D then for all f, g : A X, f = g whenever f ;n = g;n for all n N .
Dualise all the exercises above!
- 78 -
If K has a terminal object, binary products (of all pairs of objects) and equalisers
(of all pairs of parallel morphisms) then it is finitely complete.
If K has products of all families of objects and equalisers (of all pairs of parallel
morphisms) then it is complete.
Prove completeness of Set, Alg(), AlgSig, Pfn, . . .
When a preorder category is complete?
BTW: If a small category is complete then it is a preorder.
- 79 -