COMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by Thomas Fox A thesis submitted to the Faculty of Graduate Studies and Research of McGill University in partial ful- fillment of the requirements for the degree of Master of Science in Mathematics. Dept. of Mathematics November 27, 1970 CS) Thomas Fox 1.971
50
Embed
COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
COMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES
by
Thomas Fox
A thesis submitted to the Faculty of Graduate
Studies and Research of McGill University in partial ful
fillment of the requirements for the degree of Master
of Science in Mathematics.
Dept. of Mathematics November 27, 1970
CS) Thomas Fox 1.971
COMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES
by
Thomas Fox
ABSTRACT
A cartesian closed category is constructed from the
objects of a system of combinatory logic as described in the
first three chapters.
A unit and cartesian product are introduced to the
deductive system.
TABLE OF CONTENTS
INTRODUCTION i
CHAPTER l ................... . -.- .................. . 1
CHAPTER II 5
CHAPTER III 9
CHAPTER IV 18
CHAPTER V 25
APPENDIX l 40
APPENDIX II 43
REFERENCES 48
ACKNOWLEDGENENT
I would like to thank Professor J. Lambek for
suggesting the topie of this thesis and for his patient eriticism
of the early drafts.
-i-
INTRODUCTION
Given a category one may define a deductive system
by considering morphisms as implications. Conversely, one may regard
a deduction as a morphism provided there is an acceptable definition.
of composition. This very simple idea has been put to use by Lambek,
[D CI] and [D CIl], to construct certain "free" categories, but the
deductive systems considered are constructed specifically for this use.
It is our purpose to show that a familiar deductive system, that of
combinatory logic, can be used to decribe a cartesian closed category,
the importance of which has been pointed out by Lawvere, [DA].
Combinatory logic has been studied since the 1920's,a unified
treatment being given by Curry and Feys, [CLg]. In.Chapters land II
we describe the basic system, while chapter III develops the theories
of functionality and type, with the new wrinkle of a singleton type.
In Chapter IV we show that this leads to a very natural construction of a
closed category, defined as in [CC].
With respect to a specialized system, Cogan, [FTS], describes a
class of ordered pairs, but no structure corresponding to the cartesian
product of t",o types is produced. This is done in Chapter V, and it is
shown that this yields a cartesian closed category.
'-ii-
In the first appendix we describe a monotone relation of
great importance in the study of combinatory logic, though of no use
to us in our work. A.~fle!'ldix II gi'J~s ôiilS BR aH:errtative te tHe èevelsfI
Our notation with regards to logic conforms with [CLg] or
[FML]. Except that we write [a,~l instead of [~] for hom (a,~), our
categorical notation is that of [e,cl.
1
1
··1 1 i 1 1 i l ,
CHAPTER I
Basic Concepts
Combinatory Logic arose in an attempt to remove the logical
difficulties connected with the use ·of variables in the foundations
of mathematics. For example the statement "for aIl integers x,
x+l = l+x" does not really concern x at aIl, but is a statement about
the constants l, +, =, and the set of integers~. The situation is
further complicated by the use of free and bound variables and the
question of substitution for va~iables. Thus a system in which variables
may be avoided is theoretically·desireable.
We begin by constructing a basic formaI system,·1V , upon o
wh:ïc h we may build our finished product. The terms of 110 are
called .obs and are denoted by "A,B,C, ..• ,a,b,c ... " . 2
We postulate one binary operation, called application, and
denoted by juxtaposition. Thus if a and b are obs , ab is an ob .
It is assumed there are no other obs. For notational purposes we
assume associativity to the left, so that fabc denotes «(fa)b)c).
It is convenient to think of the obs as functions and their arguments,
so that fa may be looked at as the function f applied to the arEument a.
There will be one binary predicate "=" written between its
arguments am having aIl the usual properties of equality and being a con-
gruence with respect to application.
l cf [mIL, p.IIO]
2 Occasiona11y ~e sha11 use capital Greek 1etters for specifie obs.
-1":
-2-
We distinguish three obs - denoted I,K and S-possesing
the rules
(1) IX X
(K) KXY X
(S) SXYZ = XZ(YZ)
l represents the identity function, KX is the function with
the constant value X, while S represents a generalized evaluat~on map.
We calI those obs which are constructed from I,K" and S through appli-
cation, " combinators". It will be seen later that with the addition
of certain axioms, these combinators suffice for the de fi nit ion of
aIl functions required· for the development of recursive number theory.
1 This property is referred to as " combinatorial completeness".
l could be defined in terms of Sand K. Notice that
SKKx = Kx(Kx) = x so that "SKK = I" would give as an adequate de-
finition of 1. However, this entails both notational and theoretical
difficulties2
•
There are certain useful combinators for which we shall have
special names. Our notation conforms with [CLg]3 .•
where T is of the f orm ax and 1Tl is a sequence of terms
alxl , a 2x 2 ... a nx
n for types a,al , ..• ,an and obs x,xl '··· ,x n.
If m is the. sequence al xl •.. a if n and 11. is the sequence
an+lxn+l .•. amxm , then 1n,n is the sequence alxl ... anrm. The
obs xl ... x n are called the subjects of m, and if m is the empty
sequence we say T is "assertable" in 1!(L).
We adopt one axiom and six rules of inference as follQws:
(Fp) If x is a variable or a constant, and E is a type
(Cl) If ?n' is a pernrutation of 1Tl, then
mil- T
(WI) If x and y are both variables or instances of the same
constant, then
11'/, Ex, Ey If- T
111, Ex 1- T'
where T' is obtained from T by substituting x for y.
(KI) If x is a constant, or a variable which is not a subject ofm, then
(Fr)
mi- T
111, Ex~T
m, EX&-T} x m U- F ~ T}()..x.X)
i ,. 1 !
-14-
(FI) If m and ri have no variables in common and neither contains y,
then
'In, n ,F~l1Y II- s([yx/y] z)
"11 and m Reading "'YI ,1ft' as "9i "r' and "~' as "~plies", the
meanings of the first four are clear, while (FI) is just a restatement
of the rule (F). (Fr) essentially states that if x in ~ ensures that
Xx is in 11~ then X is in nl1i while ( cpI) is just (~) froID 'N(F).
The follo"t.1ing useful results will serve to illustratc the techniques of !I(L). l
(RI)
proof:
(R2)
proof:
(R3)
a- Fao:I
ax \1- o:x Fr
K- Fao: (ÀX. x)
R- F cp (Fao:) l
\\-Fao:I
CPI· K- Fao: l
M-F cp (R::ra) CU. I)
. R- Fa (Ftn) K 2
KI Fr
1 Ne ignore instance of Cl and freely change froID the notation of~ to that of 11. Alternately, "tve could assume that every second step is an instance of Cl.
2 cf lCLg, p.325 ]
1 < r t 1 }.
~: r t 1 l-
I r
-15-
proof: <XX H- ax KI
ax;f3y H- ax Fr
ax\4-Fr:tx O .. y.x) -------~----~----- Fr "Fo: (Fr:tx) (uy.x)
(R4) ~ F(Fa (Ff3y»(F(Faf3)(Fo:y»S
proof: êy~(3y yXIl-yx FI
F(3yx, êylry(xy) FI
o:z, Fl3yx, Fo:êyH-y(x(yz»
o:w ,o:z, Fo:(Ff3y) x, Faf3y \\- y (xw(yz) )
O:Z, Fo:(Ff3y) x , Faf3Y\+-y(xz(yz»
Fa (Ff3y) x , Faf3y~Fo:y (Àz.xz(yz»
"",F(Fa(Ff3Y» (F(Faf3)(Fay» (uyz.xz (yz»
(RS)
which follows from cp l a- cp l by (CP 1)
(R6) Fa'a x, Ff3f3'y Mi F(Faf3) (Fa'f3') (Àzw.y(xw»)
= By'Y(a(BXX'b» = [BXX',BY'Y]ab show that hom as defined above is a
functor from ê x C to C .
We define V: C~ S by V(a) = { xl \l-o: x where 0: is a type,
and V(M) = (:.:,Mx) 1 0:,f3 are types H- o:x ~nd" If- Fo:f3M } where M is a
morphism of C . Clearly V(l ) = V(l) = {(x,x)lx is an ob }, and the 0:
definition of BMN ensures V(BMN) = V(M)oV(N).
Defining the object ! to be cp, the natural isomorphism i
becomes the combinator K, taking each ob ~ in 0: to the constant function
G-kI x from l to 0:. We have [1,0:]----------..0: by (R7), and this is clear1y
an inverse for i. 1 Likewise l may be used as the morphism j from ! to
B [a,a] by (R2). Finally, since [f3,y]--~) [[0:,f3], [0:, y]] by (RB), we
identify La with B.
The naturality of i,j and L fo1lows from the commutivity of
the fo1lowing three diagrams:
1
2
In speaking of isomorphism and commutative diagrams in we are referring to localized properties of the morphisms, ego we do not claim BK(~I) = l always, but only when restricted to the domain and range
indicated. Likewise i is natural since BKa = B[l,a] a from 0: to [l,el.
Application, not composition.
1
1 i
1 . -1
f
1
1 i
r i f 1 i j
-20-
1
1: il
BKa x l = K(ax)I = ax :!
i =K r ~ {l,a] 1
B{I,a] K x l = {l,a] (Kx)I i 1
1
°a(Kx 1
a (l,a] (II)) 1 r
1 a(Kx 1)
r ax
1 t3 ~ [I,t3] 1
! i =k
j = l Blllx 1(11) x l ~ [a,a]
=IIx Ix = x
B(KI)IIx KI(II)x l oKI
= Ix = x
l j - l ~ [t3,t3]
B [t3,y] ------~~ [[a,f3], [a,Y]]
o [b ,cl [[I,b] ,[I,c]]
. (t3 ' ,y'] ------~> ([a,t3~] ~ [a ,y ']]
B
where b t3 1 ----;>;.t3' and y
c ---.~ y' • Let
a d t3 -----;J)~ y , a ----'>:;. t3' ,
and H-ax •
-21-
BB{b,c] adx B([b,c]a)dx .
= [b,c]a (dx) = c (a(b(dx)))
B[{I,b], [I,c]] Badx [[I,b], [I,c]] (Ba)dx
[I,c] (Ba([I,b]d))x = c«Ba([I,b]d)) (Ix))
c(a([I,b]dx)) c(a(bÇd(Ix))))
c(a(b(dx))).
We proceed to var if y the axioms with V, hom, l, i,L, and j
defined as ab ove. CCI states that the fo11owing diagram commutes: