Upload
brittany-lamb
View
218
Download
0
Tags:
Embed Size (px)
Citation preview
Products and Sums
http://cis.k.hosei.ac.jp/~yukita/
2
Products
• To express the notion of function with several variables
• We need to talk about products of objects.
3
Ex. 1. Add and Multiply
ZYXf
yxyx
multiply
yxyx
add
:
form theof arrowan need We
),(
:
),(
:
RRR
RRR
4
The one point set and the empty set
. is possiblityonly The
. ofsubset a is : above, case In the
.),(;!; hereproperty w with the
ofsubset a ,definitionby is, :function A
.:!by thisdenote also We
. to fromfunction oneexactly is thereset any Given [2]
{*}.:!by thisdenote We
{*}. to fromfunction oneexactly is thereset any Given [1]
f
XXf
fyxYyXxYX
YXf
X
XX
X
XX
Remark
5
Prop. Property [2] characterizes the empty set.
.isomorphic are and that showswhich
,:1 and :1 have also We
.1 bemust which function oneexactly and
:function oneexactly is theresays ofproperty same The
.1 bemust which function oneexactly and
:function oneexactly is thereSo
.function oneexactly is there,set any For
[2].property thehasset that another be Let
Z
ZZ
Z
ZZ
Z
XZX
Z
Z
Z
Proof.
6
Prop. Property [1] characterizes the one point set.
.isomorphic are *}{ and that showswhich
,{*}*}{:1 and :1 have also We
.1 bemust which {*}*}{function oneexactly and
{*}:function oneexactly is theresays *}{ ofproperty same The
.1 bemust which function oneexactly and
{*}:function oneexactly is thereSo
.function oneexactly is there,set any For
[1].property thehasset that another be Let
{*}
{*}
Z
ZZ
Z
ZZ
Z
ZXX
Z
Z
Z
Proof.
7
What is the use of this kind of argument?
• We respect specification by arrows.
• Properties [1] and [2] are specifications.
• Corresponding implementations are the one point set and the empty set.
• There are many cases where specification determines implementation up to isomorphism.
8
Def. Initial and terminal objects
.1 arrow unique a is therein object any for if
called is (one) 1object An
.0 arrow unique a is therein object any for if
called is (zero) 0object an category aIn
XX
terminal
XX
initial
A
A
A
9
Ex. 2. Elements of a set
.) of or (or
of 1 arrows call wein terminalis 1 If
. ofelement an toscorrespond {*}function Each
Aconstantspoints
AelementsA
XX
A Def.
10
Ex. 3. The power set 2X
not. do categories small objects;
terminaland initial have to tendcategories large general,In
arrow. oneexactly with
monoid theisobject terminala have tomonoidonly The
.2in terminalis itself subset The
Note.
4. Ex.
XX
11
.conversely and
,in object initialan is then in object terminala is If
dual. are terminaland initial of sdefinition The op AA
Remark.
AA
12
Products
.categoriesother in products of
concept apply thecan that weso arrowsonly using and to
it relatingby product cartesian thezecharacteri try toWe
ofcategory in the
},|),{(
by defined is and ofproduct cartesian The
YX
YX
YyXxyxYX
YX
Sets.
13
YX YX 2p1p
x y
1
Cartesian product of X and Y
. and of , us gives , with composingthen
, of 1: an and 1object terminala have weIf
21 YXyxelementspp
YXYXelement
14.then
,,
such that : arrowan is there
such that :, arrows Given two s)(uniquenes
.,
such that : arrowan is there
,:,: arrowsGiven )(existence
:assplit becan The
.,
such that : arrow unique a is there
,:,:
arrows and object any given if, and of a called is
arrows with twoobject an ,category aIn
2211
21
21
21
pppp
YXZ
YXZ
ypxp
YXZ
YZyXZx
conditionty universali
ypxp
YXZ
YZyXZx
ZYXproduct
YYXX
YXpp
Note.
ADef.
15
YX YX 2p1p
x y
Z
Universality (existence)
commute. diagram following themakes that : arrowan have we
, diagramany Given
YXZ
YZX yx
16
YX YX 2p1p
Z
Universality (uniqueness)
).,(by denote We
. have then we, and
such that :, arrows any twoGiven
2211
yx
pppp
YXZ
17
. and such that :
arrowan is e that thermeans ofproperty defining The
. toisomorphic is that
show Weproduct.another is Suppose
2211
21
qpqpYXQ
YX
YXQ
YQX qq
Proof.
Prop. The product of two objects in a category is unique up to isomorphism.
YX YX 2p1p
1q 2q
Q
18
. and such that :
arrowan is e that thermeans ofproperty defining The
2211 pqpqQYX
Q
)(continued
YX YX 2p1p
1q 2q
Q
19
YX
Q
2q1q
1q
Q1
2q
Q
.1 have we
property, uniqueness By the
Q
20
YX
YX
2p1p
1p
YX1
2p
YX
.1 have we
property, uniqueness By the
YX
21
Note
.1 and 1 such that : and
: morphisms twoare thereif isomorphic be to
said are and category. a of objects are and Let
BA gffgABg
BAf
BABA
22
Ex. 6. Category 2X
product. of uniqueness theguaranteesproperty This
arrow. onemost at is thereobjects ofpair any Between
.
isproduct Their . of subsets are and Let
.in contained is means category In this
product. a has 2category in the objects ofpair Each
VVUU
XVU
BABA
X
23
Preordered Category
• The product of two objects, if it exists, is their intersection.
• In other words, the greatest lower bound of the two objects.
24
Ex. 7. The monoid with one object A and two arrows 1A and , satisfying 2=, does not have products.
. arrow single and
, arrows of pairsbetween bijection is thereand
again. be it would existed, If
AAAA
AAAA
AAAAA
AAA
25
Ex. 8. The Diagonal Function
function. or thecalled
),,(
:
function, a is thereset aGiven
copyfunction diagonal
xxx
XXX
X
26
Def. Diagonal in an Arbitrary Category with Products
:commute diagram following themaking arrow unique theis X
.XX XX 2p1p
X1X X1
X
27
parallel.in and functions two thesay, toSo
)).(),((),(
:
:by denotedfunction a is there
:,: functions given two ,In
2121
2121
2211
gf
xgxfxx
YYXXgf
YXgYXf
Sets9. Ex.
28
Def. Parallel Functions in an Arbitrary Category with Products
commute. diagram following themaking arrow unique theis arrow the
,: ,: arrows Given two 2211
gf
YXgYXf
2Y1Y21 YY
2Yp1Yp
f gf g
21 XX 1X 2X2Xp
1Xp
29
Ex. 10. The Twist Function
),(),(
:
function a is there and sets given two ,In
,
xyyx
XYYXtwist
YX
YX
Sets
30
Def. The Twist Function in an Aribitrary Category with Products
:commute diagram following themakes that arrow unique theis Then
. of sprojection thebe , and of sprojection thebe ,Let
,
2121
YXtwist
XYqqYXpp
.XY XY
2p 1p
1q
twist
2q
YX
31
Object oriented viewpublic class ObjCatA{
}
public class ProdCatA extends ObjCatA{
ObjCatA x, y;
public ProdCatA(ObjCatA x, ObjCatyA y){
this.x = x; this.y = y;
}
public ArrowCatA<z,this> factArrows
(ObjA z, ArrowCatA<z,x> f, ArrowCatA<z,y> g){
return /* the unique arrow that satisfies
the property in the last slide */
}
}
32
Ex.11. Category Circ
.0*
:
and
,1*
:
namely , from functions twoare There
sets. esebetween th functions all :Arrows
}|),,,{(
,{*}, where,,,, :Objects
}.1,0{Let
10
10
10
21
10210
BBfalse
BBtrue
BB
BxxxxB
BBBBBB
B
inn
33
Negation, And, Or
1(1,1)
1(1,0)
1(0,1)
0(0,0)
: ,
1(1,1)
0(1,0)
0(0,1)
0(0,0)
:
01
10 :
1212
11
BBorBBand
BB
34
Claim. Category Circ has products.
products. ofproperty check themust We
),,(),,(),,(
follows. as and ofproduct thedefine We
111
21
nmmnmm
npnmnmpm
nm
xxxxxx
BBBBB
BB
35
.nBmB nmB 2p1p
f g
X
property. ith thisfunction w oneonly theis
thatand , and check thateasily can We
)).(),(),(,),(()(Then
)).(),(()( and ))(,),(()(Let
21
11
11
gpfp
xgxgxfxfx
xgxgxgxfxfxf
nm
nm
36
not
BB :
37
&
BB2 :&
38
BB2 :or
or
39
wires.up splits : 2BB
40
side.by side components twoputs : 22 BB gf
f
g
41
series.in components twoputs : BB fg
f g
42
wires. theof twos twist:twist 2 2BB
43
Boolean Gates f(x,y,z)
&
or
not
not
not
not
&
&
&
x
y
z
),,( zyxf
44
),,()&&,&&(
)&&,&&(),&,,&(
),&,,&(),,,,,(
),,,,,(),,,,,(
),,,,,(),,(
or
2&&
41&1&6
6116
6333 3
zyxfzyxzyx
zyxzyxzyxzyx
zyxzyxzyxzyx
zyxzyxzyxzyx
zyxzyxzyx
BB
BB
BB
BB
BBBB
2
4
BB
BB
B
45
3)11()1&1(&&)(&or
follows. ascircuit aby dimplemente becan
BBBBB f
46
Summary
• Using wires, we can implement products.
• Every function BmBn can be implemented using not, &, or, true, false, using products and composition.
47
commute. diagram
following themakesthat
arrow unique a is there
),( :
arrows offamily a and object any Given
property. following thehaswhich
),( :
sprojection offamily a with togetherobject an isfamily theof
product The . of objects offamily finite a be )(Let
KlXZf
Z
KlXXp
X
X
ll
lKk
kl
Kkk
Kkk
ADef.
.lXKk
kXlp
lf
Z
48
Note. The product of the empty family
The product is a terminal object. Since the family is empty, the only requirement is that, given Z, there is a unique arrow from Z to the product.
49
. and such that :
arrowan is e that thermeans ofproperty defining The
. toisomorphic is that
show Weproduct.another is Suppose
llllKl
l
Kll
Kll
lq
qpqpXQ
X
XQ
XQ l
Proof.
Prop. The product of a family of objects in a category is unique up to isomorphism.
lX Kl
lXlp
lq
Q
50
. such that :
arrowan is e that thermeans ofproperty defining The
llKl
l pqQX
Q
)(continued
X Kl
lXlp
lq
Q
51
lX
Q
lq
lq
Q1
Q
.1 have we
property, uniqueness By the
Q
52
lX
lp
lp
Kl
lX1
Kl
lX
.1 have we
property, uniqueness By the
Kl
lX
Kl
lX
53
Prop. 4.2. If products of all pairs of objects exist in A and a terminal object exists then products of finite families exit.
. then and unique have wediagram, in the as ,,,Given
.,,Let
.)(family theofproduct theis )( that show will We
3212211 321
}3,2,1{321
hgfZ
pppppppp
XXXX
XXXXXXX
kk
Proof.
321 XXX 21 XXp
1Xp
2Xp
f
gh
3Xp21 XX
2X
Z
.3X
1X
54
.)(product the
ofproperty uniqueness by the Hence
. and onto projectionwith
composites same thehave and Hence,
.product theofproperty uniqueness by the Hence
. and onto sprojection with composites same thehave and Then,
.
and ,
,
equations. threefollowing thesatisfying arrowanother is
Suppose unique. is such that show We
321
321
21
21
33
22
11
2121
2121
3
2212
1211
XXX
XXX
XXpp
XXpp
hppp
gppppp
fppppp
XXXX
XXXX
X
XXXX
XXXX
inued).Proof(cont
321 XXX 21 XXp
1Xp
2Xp
f
2121
XXXX pp
gh
3Xp
21 XX
2X
Z
.3X
1X
55
e)associativ(Strictly
indentity. theis misomorphis thecategory In
. toisomorphic areBoth
.isomorphic are )( and )(
321
321321
Circ14. Ex.
Proof.
Cor.
XXX
XXXXXX