combinatory logic and cartesian closed …digitool.library.mcgill.ca/thesisfile47727.pdfcombinatory...

50
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

Upload: doanthuan

Post on 09-Mar-2018

225 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

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

Page 2: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

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.

Page 3: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

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

Page 4: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

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.

Page 5: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-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.

Page 6: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

'-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 ,

Page 7: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

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":

Page 8: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-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 .•

Define B S(KS)K. We then have

Bfgx = S(KS)Kfgx = (KSf)(Kf)gx S(Kf)gx = Kfx(gx) f(gx),

which gives us the rule

(B) Bfgx f(gx)

l [CLg. p.5]

2 See Appendix B

3 cf. [CLg, p.158] or [EHL,pp. 112-1 13]

1 ~

1

1

1

1 !,

!

f !. r t ! f

1 1

f t f f i

f

1 ~ l

1 t

Page 9: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

{

-3-

Thus if f and gare functions of x, Bfg represents their composition.

Define W = SS(KI). Then Wfx = SS(KI)fx = Sf(Klf)x=fx(Klfx) =

= fx(Ix) = fxx yieldingrule

(W) Wfx = fxx

If f is a function of two variables, Wf is a function of one variable

whose value at x is fxx~ i.e. the diagonal function composed with f.

Define C = 8(BB8)(KK). Then Cfxy = BB8f(KKf)xy = B(8f) (KKf)xy =

= Sf(KKfx)y = fy(KKfxy) = fy(Kxy) = fyx. Thus

(C) Cfxy = fyX

so that Chas the effect of comnruting the tvlO arguments of f. There is

a related combinator C* defined by C* = CI and obeying C*xy = yx .

There are two more basic combinators, ~ and W, whose defini-

tions in terms of I,S and K are too long to warrent reproduction. He

merely note the rules to which they conform:

(~) ~ fabx = f(ax) (bx)

~ faxy - f(ax) (ay)

Likewise there are two sequences of combinators (S ) and (~ ) n n

obeying

(8 ) n

(f x) n

(~ ) n =

Page 10: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

(

:"4-

To illustrate the way in which combinators with a desired

.effect may be constructed, we shall build a combinator which will

prove useful in the future. We need R such that R abfx = f(ax)(bx).

We note f(ax) (bx) = ~ fabx = C ~ afbx = C(C~a)bfx = BC(C~) abfx

so that lve may define R ~ BC (C~). Rab may be looked at as a function

of f, taking a function of two variables to a function of one variable.

It is possible to choose primitive combinators other than I,K

1 and S. Curry originally used B,C,W and I but soon dropped I in

favour of K. The reason is clear, for if K is to exist at aIl it must

be primitive, as no combination'of the other combinators can reduce the

number of obs. Likewise, without K no last step could result in a

single ob, so that I would have to be primitive.

Church rejects the use of K entirely.2 Perhaps his most telling

argument is that when we wish to restrict.the system to certain abs

considered meaningful, KXY = X would be meaningful even though y may

not be.3

Church's apprehensions are rejected by Curry on theoretical

4 grounds and will be rejected by us on purely utilitarian grounds- we

need K for the development in chapter 9.

1 cf [CLg, p.184] lCLC , p.59]

3 The significance of obs will be discussed below.

4 [CLg, pp.I06,22l-2] .

Page 11: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

CHAPTER II

Lambda "Conversion

He turn now to another for"mulation of what will result in

essential.ly the sam.e system. Given a function f, we w·ould like to

have an ob M, such that Ma = f(a). ·To facilitate this work we in-

troduce the symbol [y/x] M for the result of substituting y in

the p lace of x in M. He now postulate an operator ":\x" having the

property

(À.) (:\x.M)a = [a!x]M

Of course here we could get muddled with our vague definition of [x!y]M,

but space does not permit a full treatment, and the problem ~vill be

rectified later.

À.X.M then represents the function M "in abstraction". For

example having defined 2 . 2

a ,À.X.x represents the function whose value

2 at a is a Likewise we could define l ; À.X.x since (:\x.x)a = a.

For the sake of brevity we define :\xy.M = :\x. (À.y.M)

À.Xyz.M = :\X. (À.y; (À.z~M)), etc. He may now define K = À.XY.x and

derive the rule (K) since (À.Xy.x)ab = a. Similarly defining

S = :\xyz.xz(yz) yields the rule(S).

Su ch a system, based on the symbol À. and the operation

application is called "À.-applicative". It is on this basis that Church

has developed a system L, which he calls "The Calculus of Lambda-

conversion", [CLC] •

-5-

Page 12: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

\ ... -

l

-6-

The notation of ~ enables us to define the obs ~ and W

-quite easily: ~-= Xabcd.a(bd) (cd) and W s Xabcd.a(bc) (bd).

In tœ developmant of Chut" ch on ob U is said to

have a normal form if it may be converted by repeated use of the

rule (X) to an ob V such that V contains no instance of the form

(Xx."M)N. It is precisely those obs with a normal form that Church

considers significant. Thus (Xx.xx)(ÀX.xx), which only converts to

itself, is rejected by Church even though it may be written as WI(WI)

in 'J/ no A similar combinator is WWW.

We now describe an algorithm by which each of the Church's

system may be convarted into a combinator of 11 : o

If U does not contain x then ÀX·U KU

If U = x then ÀX·U = l

If U = XY then ÀX.U = S(ÀX.X) (ÀX.Y)

This allows us to add the symbol "X" to 71 . Unfortunately equality o

in 110 ;s much stronger than equality in ;: ie. we may be able to

der ive U = V from (X) without being able to do so from (I),(K),and (S).

What is lacking in 11. are the rules o

If x is not free in H then ( ÀX.l-Ûx= M

If x is not free in M or N then Hx = Nx -> M = N.

(~) follows from (~) and (~) by letting U = }~ and V = Nx

in (E) and applying (~), but it is (~) in which we are interested,

Page 13: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

! !

-7-

for it gives us equa1ity in extension, ie. we may show two combinators

are equa1 by domonstrating that they have the same affect on an arbit-

rary ob. It is sufficient to have the fo11owing princip1es:

(1)

(2)

(3)

(4)

where

(KI)

(81

)

(8K)

(Il)

x does not

À-x.KXY À-x.X

À-z.8XYZ = À-x.~2(YZ)

À-x.M KM

(À,x.M)x = M

occur in M. 1-4 are ensured respective1y by the

<1>2 K BK(8B(KI))

<1> 8 = ",(<1>28 )8 3

"'8K BK

SB(KI) = 1.

axioms

To demonstrate how (Si) entails (2) we need two princip1es

which are easi1y proved by induction: 1

8 X'Y' y' nI· • • n

y' n

where a is a primitive constant and x does not appear in any of

=

Thus =

8(SX'Z)(SY'Z' ) = <1> 8(8X')(8Y')Z' 2

implies (2).

1 [CLg, p.196] •

whi1e

=

Page 14: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

"-8-

The system obtained by adjoining the above four axioms toÎV o

will he called 11 and will form the basis for the work in the next

chapters.

'JI 'f' C l. C) The equivalence ofn and~ is the subject of [~,6E].

This allows us to carry over the major theorems of Church' s work to 7-1. In particular we are assured that 11 is combinatorially complete

1

1 cf [CLC, j'.11]

, , " . • i ! "

~ ~ 1 : : "

! i ~ : l'

l' ! •

Page 15: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

CHAPTER III

FUnctionality

We. have been studying "pure" combinatory logic ie. we have

not concerned ourselves with any formaI interpretation of the combinators,

obs, or application. We should now like to explicitly study the inter-

pretation of combinators as functions between sets of obs. We thus intro-

duce a collection of primitive entities called types, denoted by small

Greek letters. Each type may be regarded as a set of obs. Given two

types Ct and 13 w·e should like· to disucss "the type of obs which by appli-

cation carry the obs of a to obs in 13". For this purpose we introduce a

primitive ob F and interpret Faf3 as above. He also wish to distinguish

a type ~ containing only the combinator 1.

We shall look at two formaI developments of this notion. In

the first of these l we introduce the predicate "~" for assertion and inter­

pret the statement "r <XX " as meaning "the ob x is contained in the type a,,2

If 1- Faf?M we say that M has the "functional character" Faf3, and we may

write a M ~ 13. To ensure that ~, f- , and Faf3 have the des ired proper-

ties we adopt the rules

(Eq') 1- E x x y

1- ~ y

l [CLg ,9] or [RA]

2 Using t- we may eliminate "=" as a primitive predicate by introducing an

ob Q and sufficient rules to ensure QXY ~ X=Y. See [CLg,7C] .

-9-

Page 16: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-10-

(F)

r f3(Mx)

(cp) l- cp x

x = l

and the axiom

. (Axp) l- CPI

Observing the action of l on any ob it is seen that

(5) \- FaaI

shou1d be obtainab1e in our system. This will immediate1y fo11ow by

(~), (F), (1), and (Eq') if we adopt the axiom scheme

(FI) l- F cp (Fao:) l

where a is an arbitrary type.

If x is in a, Kx takes obs from an arbitrary type into a.

Therefore, we adopt the axiom scheme

(FI<) l- Fa (Ft=a)K

where a and f3 are arbitrary types

Simi1ar1y let l- Fa(Ff3y)H, ~ Faf3N, and t-ax. Then SMNx = Nx(Nx)

and as t Ff3y(Mx) and t NNx) , by (F>" we have \- Y (SNNx) . As x was arbitrary

we want t Fay(SNN), and since N was arbitrary t F(Faf3) (Fay) (SH) . Fina1ly

we hit upon the acceptable axiom scheme

X-·d . 1

1

1

J .. j

1 t ! 1

1 1 1 !

1

i 1 1 j ! ! 1 1 1

l i i

Page 17: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-11-

(Fst l- F(Fa (F~y))(F(Fa~)(Fay))S

a,~ and y being arbitrary types.

The system obtained from 1/ by adjoining (Eq'),(F),(~,

(Axcp), (FI), (FK) and (FS) will be denoted 1-!(F). As an example

of the proofs in Î/(F) we show that t F(F~y)(F(Fa~)(Fay))B. (see

following page)

Functional characters for the other simple combinators may

be obtained in a similar fashion or by methods developed in ICLg,9] with

regards to a similar system.

11 (~ admits quite a different interpretation if vle look

at the types as propos itions and interpret ~ Fa~x as a::;)~. Then (5)

becomes a:::;J a, (FK) becomes a::;l (~?a) , (FS) becomes

a":) (~::> y) .? (a::>~):::> (a ?y) " and (F) becomes "if a and a :::> ~ then ~".

We then have a very strong relationship between1,KF) and the theory of

pure implication in the intuitionist propositional algebra. l

We now abandon the systemÎV(F) in favour of a related system,

1V(L) , having a decision procedure.2

The ~elationship between ?teL) and

JV(F) will be much the same as between Gentzen's system L and the proposi­

tional algebra.3

The statements of ?reL) will be of the forro

l For an exact statement see [CLg, p.313]. Aiso [FML, SB] •

2 cf. [CLg, 9F]

3 [TIn., SC] or [TIlH, 77].-

r 1 i i • • 1

l

1 1 • l' l' l' ! • i 1 !

1 t 1 1

i 1

1 ~ , ,

! i. 1 ,

Page 18: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

1- F( Fa (F(3Y) )(F(Fa(3 )(Fay»S 1- F(F(Fa (Ff3y) )(F(Fay» )(F (Ff3y)(F (Fcx (Ff3y) )(Fcx!3 )(FCXY» )K

~ F(F!3Y) (F(Fcx(F!3Y»(F(Fcx!3) (FCXY») (KS)

~ F(F(F!3Y) (F(Fa(F!3Y»(F(Fa!3) (FCXY»»(F(F!3Y) (Fcx(F!3y»)(F( F!3Y) (F(Fcx!3) (FCXY»» S

~ F(F!3y)(Fcx(F!3y»K ~ F(F(F!3Y) (Fa(F!3Y») (F(F!3Y) (F(Fa!3)(Fay»)(S(KS»

B S(KS)K ~ F(F!3y)(F(Fcx!3)(FCXy»(S(KS)K)

~ F(F!3y)(F(Fa!3)(Eay»B

(F)

(F)

(F)

(Eq')

1 t-" N ,

Page 19: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

:---

-13-

(6)

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 !

Page 20: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-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

Page 21: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-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»)

proof:

ê z , Fêê'y f+- ê' (yz) FI

axtro:x FI Faêz , ax, FBê'y \\-ê' (y(zx» a'wH-afw a'w, Fo:êz, Fo:'ax. Fê(3'yH-B' (y(z(xw»)

FI

lU

Fr

Fr

Fr

FI

Fo: fax, Ff3f3 'y I\-F(FO:f3) (Fo: 1 f3') (ÀZW. y(z(xw»)

(R7) II- F(Fcp a) Cl (~I)

Fr Fr

1

! 00'

! 1 1 , ! i )

j i 1

Page 22: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-16-

proof: cpI If- cpI axK-ax

~~~~------------~.. FI __ ~F_~~~.a-~a~(~x~I~)~ ____ Fr

lr- F(Fcpa) a (}..x.xI)

(R8) H- F(Fj3y) (F(Fa:!3) (Fay»B 1

proof: az If- az êyll- êY FI az, Faêyl\- ê<Yz) yx Il-yx FI az, FaêY, Fêyxlf-y(x(yz» Fr FaêY, Fêyx~Fay (Àz.x(yz» Fr FêyxD-F(Faê)(Fay) (ÀYz.x(yz» Fr

~F (F!3y)(F(Fa:!3)(Fay» (ÀXyz.x(yz»

(R9) If H- cp x then x l

Proof by deductive induction on the 1ength of the proof

of I\-cp x. II-cpx must come from (cp 1) 50 ~-le have a proof of

(1) cp l 11- cpx

If (1) comes from Fp we are done. If (1) is a resu1t of (KI) the

previous s tep was' Ir. cp x and we have a shorter proof of 1/-: cp x. If

(1) is the resu1t of n applications of (CPI) or (Hl) the statement

preceeding those applications was

(2) ~I, cpI, ... ,cpI,j IrCP x 'V" n+1

If (2) is a resu1t of (KI) the previous step was

(3)

1 [CLg, 9]

~ 1, cp l , • •• ,CP I/ IrÇp x 'V' -n

or [RA]

Page 23: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-17-

and n applications of (cp1) will yie1d a shorter proof of 1\- CPx.

If (2) is a result-of (C 1) we may eliminate that step, as each

e1ement on the 1eft of 1\- is identical. In any case by the inductive

hypothesis x = 1.

(R2), (R3), (R4) , (R5) and (R9) -being (FI), (FK), (FS), (AxCP) ,

and (CP) respective1y-demonstrate the strong re1ationship between ?!(L)

and '}I(F).

1 1

Page 24: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

CHAPTER IV

CLOSED CATEGORY

We are now in a position t~ construct a category ~ whose

objects shall be the types of ?!(L) while Home(a; ,13) shall be the set of

obs in Fa;13. Composition of two morphisms is achieved by application of

B, while l makes a fine identity morphism. Notice that we are using

"category" in a general sense i.e. given objects a,a',13 and 13' in C such that Cl: 1= a;' or 13 1= 13' we are not assuming that Hom

C(a,13)

HomC(a' .13!.) are disjoint.

We wish to show ~ may be given the structure of a closed

category in the sense of [C Cl. We need the following entities:

a functor V: C ~ b '. the category of sets

and

a functor hom : C*xC ~ C' hom (ct,13) being denoted by [0:,13]·

an object l

a natural isomorphism i i :a 0:

a natural transformation L LO: t3Y

[13,Y] -+ [[a,13]. [a,y] ]

a natural transformation j jo: l -+ [a ,0:]

There are six axioms to be satisfied: 1

CC 0 V 0 hom Hom

CC 1 L 0 j j

CC 2 [j ,1] o L i

CC 3 (La ,1] o L b',t'] o LO: [I,LCt] o L13

CC 4 [i,I] l

[I,i] o L-

CC 5 V i [a ,a] l ja

2

1,2cf footnote next page -18-

Page 25: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

(

-19-

What is to be done is made clear by the previous chapter;

[a,f3] is to be FC$". "Given two combina tors X and Y such that Fa'a X

and Ff3f3'Y we need a combinator [X,Y] such that F(Faf3)(Fa'f3') [X, y].

But (R6) shows that Àzw.y(xw» is just such an ob. We therefore set

[X,y] = Àzw.y(z(xw» = C(BC (B(BB)B»XY. Now [1,1] = land

B[X' ,Y'][X,Y]ab = [X' ,Y,]([X,Y]a)b y' ([x, Y]a(X,b» Y'(Y(a(X(X'b»»

= 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 refer­ring 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

Page 26: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-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 •

Page 27: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-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:

1

CC2

[a, t3]]

X Let a ---.-.:>:;. t3 and Il- aa .

IIXa IXa = Xa

BBIIXa B(II)Xa

II(Xa) I(Xa) = Xa

1 states that the fo11owing diagram commutes:

Note that (R9) is necessary for this resu1t.

1

1 1

1

! l,

Page 28: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-22-

[a,y] .------~> [[a ,a] , [a,y]]

[j ,1] [1,1]

M Let a--~> y and H-ax

B[I,I]BMlx [1,1] (BM)Ix = I(BM(II))x

BMIx M(Ix) = Mx

KMlx Mx

CC3 states that the following diagram commutes:

[[0: ,y] , [0; ,5] ] fI,L f3] [I,B]

L [a , f>} 1 [[[a,f3] ,[a,y]] ,[[0;,13] ,[a,5]]]--------~> [[f3,y] , [[0;,13] ,[a,5]]]

"

f f

1

f.

Page 29: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-23-

Let M N Y ~ 5, t3 --->~ y,

T ct ---~~~ t3, and

B[B,I] (BBB)MNTx =. {B~I] " (B(BM))NTx

I(B(BM)(BN))Tx = BM(BNT)x

M(BNTx) = M(N(Tx)

B[I,B] BMNTx [I,B] (BM)NTx

= B(BM (IN))Tx BM(IN) (Tx)

M(IN (Tx)) M(N(Tx))

CC4 states that the following diagram commutes:

Let

LI = B [t3,y]---.....;....._....::-.._-~> [{I,f3] , n,y]]

[I,K]=[I,i] [ i,Il [K,I]

M t3----)a:olo Y and R- t3x •

[I,K1HxI

B[K,I]BHxI

I(BM (Kx))I

K(M(Ix))I = M(Ix) Mx

[K,I] (BM) xl

BH(Kx) l = M(KxI) Mx

1/- ctX

Page 30: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-24-

cco states that the following functor diagram commutes:

* hom C X C-----~;;. C

v

Since the arrows above r~present functors we must check commutivity

for both objects and morphisms. Let 0: and ~ be arbitrary types.

Hom (0:,13) (Mlo:_M_'7) 13 in e )

If a and b are morphisms of we have

Hom(a,b) 0:, 13, -y, ô )-

;;. y, y,_b=--:>~ ô, in C}

«x,hom(a,b)x) 1 3 11'~ r H- T\x and H- FT\~ hom(a,b)}

V hom (a,b)

CC.:; me~as thl'}t V(K): V[a,o:]~V[I, [a,a]] sends I in V[a,cd

to I in V[I, [0:,0:]] Letting l-ax this amounts to KIIx IIx

which follows from KII = I.

Page 31: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-25-

CHAPTER V

Cartesian Closed Category

In order to construct a "cartesian" closed ca tegory e r which shall contain (; as a subcategory, we extend the deductive

syste~ 1,{(L). Given two types, a and ~, we postulate a new type,

a x ~, and adjoin the following two rules of inference :

(xr) 111 If- ax 1111- f3y

(xl) 111, ax, f3y li- . tZ

1 represent "the" pair operator . and the first and

second projections respectively. We need not take these as new pri-

o ° f 1°f d fO 2 m1t1ves, or we e 1ne Dl = ÀXyz. zxy

(6 ) x

(7) Dlxy(CK) CKxy Kyx y

The system obtained from (L) by adjoining the types a x ~

and the rules ( xr) and ( xl) shall be called 1I(L) " while C, shall

denote the ca tegory obtained from lI(L) 1 as C was . from 11 (L).

1 There are alternates. See [Clg, p.174]

2 cf [CLC,p.30].

Page 32: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-26-

We assign special names to the following two proof schemes:

o:x H- o:x Kl o:x, A. y )1- o:x

--~~~~~--~------ xl . (0: N (3) x /1- 0: (n: x)

o

The following proof shows

[ ~,o: ] X [ ~, 13] > [~,o:xf3], while the paucityof

rules resulting in (0:)(·13) on the right ensures that tœ above map has

Fl

Kl

xl

xr

wl

Fr

wl

Fr

o:x' \1- o:x' ~y' a- ~y' o:x ij- o:x ~y 1\- ~y Fl

F~ o:x', çy' If- o:(x' y') __ ~F~90:~X~, __ ~~~y~~ __ o:_(~x~y~)______ Kl

F~ o:x' , FSJ3w', ~y' 1\- o:(x' y' ) x.l

(F~ o:xFçt3)x', (Fç o:x~.(3)x, ~y, çy'}I- (0:)(13) (Dl(rrox'y,)(n:lxy»

( F ~ 0: X F ~ (3) x', ( F ç 0: X F ç (3) x , ç y U- (0: )C ~) (D 1 ( 1! 0 X 1 y)( n: 1 xy) )

i

t ,.

Page 33: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-27-

Set B~ ( ~DI~o~l) = A. Then the commutivity of the following

diagram shows that A'is natural. Let ~I x y -----.;>~ ~, a -----~> a' ,

Z and 13 -----'">~ 13 1

, and If- ç,' k •

A

[x, y] )C [X, Z] l l

[X, Y Je Z]

1

e'

[~ 1 ,a' ] x [ç , ,13 1 ] A

A(DI (lx, Y]M))( [x, Z] N) k= Dl ([X, Y]mk)( [x, Z]Nk)

DI(Y(M(Xk») (Z(N(Xk»)

(y Je Z) (Dl (M(Xk» (N(Xk») Dl (Y(M(Xk») (Z(N(Xk»)

is called a "cartesian" closed category if we have:

i) ~ functor x :C~C'-....... ----,,) C', where X(a,l3) is written aJe 13

and is the categorical product.

ii) a natural isomorphism r = r :a Je l ~ a a

iii) a natural isomorphism .t ta : l Je a ~ a

iv) a natural isomorphism a = aa!3y: (arf3) x y - ;>.a 1C'(f3xy)

on maps defined below as DI(XM)(YN).

Page 34: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-28-

v) a natural isomorphism p

vi) a natural isomorphism c =

aIl satisfying the following eight axioms l

MC3 aOa -1 .

(1 x a ) 0 a 0 (a )C 1)

MC2 (1 x t) a = r x.. 1

MC6 l

MC7 (lxc)oao(cxl) aocoa

MCC2 i

MCC3 [l,plo p = po po [a.l]

MCC3' [1. p]oL = [p,1] oL OL

MCC4 p 0 [r .1] [l, i]

The first order of business is to construct the functor x •

. C/ We know how x is to act on the objects of • Given combinators X and Y

such that H-Foa'X and If-FI'3f3'Y we need a combinators X xY such that

Ir F (0; x (3)(o;' x f3' )(X x Y) • "Na tura lly" we would like to have

Dl (Xa) (Yb) •

Dl(Xa) (Yb)

1 Strange enumeration complies with [CC]

1

·1 ; 1

1 l 1 i 1 , f f j

i ! { , !

Page 35: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-29-

so tha t having gives 1C the desired

effect on maps. In fact we have

~ x'\l-px' ~'YJr~'Y a'X Il-a'X )(r

ax il- ax (ax ~)x'lf- ~(rrlx') ~ 'Y, a'X \\-(a'x~') (DIXY) FI

F~~' Y,a' X, (a li ~ )x' li- (a'x~') (DIX(Y(1C1 x' ») FI

F~p'Y, F<ll::X'X, F(ax~) ,xli- (O:'X"~')(D](X (1Cg

x»(Y(1C1x»)

F~~ 'Y, F<ll::X'X li- F(a x ~ )(a' )( ~')(Àx • Dl (X(1Co X) )(Y(1Cl x»»

WI

WI

Thus we define x on maps to he À YXx. DI

(X(1Cox»(Y(1C1x»

The naturalness of this definition

ensures that ~ is a functor.

Let Then the following yields a __ D_l .... I __ ~~ l x a , -,

cp l i- cp l ay H- cxY --~----------------------xr

__ CP_I_,_cxY_,*"_<_I_IC_a_)_<_D...a.1_Iy_)_ \,qlI

cxY Il- (I xa)(DJ Iy) Fr

The naturality of ~ follaws from the commutivity of the follawing diagram:

Page 36: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-30-

1Cl t

!xa >a Ba 1Cl (Dl Ix) = a(:rrl(DlIx)

1 ~ ax

l "

al -a

B1Cl (I a)(DlIx) = 1Cl «I a)(DlIx))

1Cl t "1 (Dl (II) (ax)) ax

!x!5 ;. f3

Similarly, since set and

For iv we would li~e a combinator r with the property

having an inverse

The naturality of a follows from the commutivity of the fol1~wing diagram:

(a 1( (3) x y B = a --,.... ________ ~>~ a Je (13 x y)

(M Je N) x T H Je (N Je T) /

__________ ~> a' x (13' x y') r = a

M Letting a -~~-.. 0:' N , f3 ___ >~ 13' , T Y _____ -:>~ y' , If-o:a, I-~b, li-Yc,

Page 37: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-31-

For p: F(a le (3)y--~) Fa(Ff3a) we construct a combinator A ·"such

that if a lt !3 x ;) y then 1\ x has the property AXxy= X(D1 xy)

where l\-ax and It!3Y. Notice

B(BX)D1

xy

BBBXD1xy C(BBB)D

1Xxy

sa that Â; C(BBB)D1

gives us the desired effect while the

following shows F(a"!3)y 1'1 ~Fa(F!3y).

!3z a-!3z ay H- ay xr

yx 11- yx !3z, ay \\- (a x(3) (D1yz)

!3z, ay, F(ax!3)yx/ry(x(D1yz» FI

Fr

Fr

Fr lI-F(F(a )C !3 )y)(Fa(F/3y) )(Àxyz. x(D

1YZ»

Defining p = 1\ the naturality of p follows from the

commutivity of the following diagram:

Page 38: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-32-

F(a K t3)y ------!:..!.----~';ltr Fa(Ft3y)

[XJCY,Z] [X,[Y,Z]]

F(a 1)( !3 1 ) Y 1 ___ ---=:-=--___ ~~ Fa 1 (F!3 1 yI)

x Z where a 1--_31 a,

Y, !31_-~ .. 13 and y :;;. yI •

H-a l x,IH~ 1 y and H-F (0: ,,'13 )yM we have

B!\[XIlY,Z]Mxy =A([x 1( Y,Z]M)xy

[x le Y,Z]M(D1 xy) = Z(M«X It Y)(D

1 xy»)

Z(M(D1(Xx) (Yy»)

B[X, [Y,Z] ]t\Mxy [X,[Y,zJJ (L\M)xy

[Y,Z] (/\ M(Xx»y Z( l\ M(Xx) (Yy»

Z(M(D1(Xx) (Yy»)

For an inverse to p we have the eombinator

Letting

sinee Y

IT(D1 xy) = Yxy where a --_. Fpy, ,and the following shows

Fa(Fpy)--Z~-+.F(a le p)y:

1 ! ~ 1: Ir H Il jt

Il l' Il ,: '1

il !! j! f;

H 11 r

Page 39: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

'-33-

By If- BY

o:X l\- a x ay' \4- ay' F I ------- n:o

Ff3yxQ-y(-x( 1fl Y) ) (a x f3)y 'li- a( n:oY' )

----------------------~---------------------~---FI (a x f3)y' , (a Je (3)y, ,Fa(Ff3y)xH- y(x( 1f y') (n: y»

o 0 ln

(a)( (3)y, Fa(F!3y)x\f-y(x(1foY) (1fl Y»

--------------------------------------~--~~------- Fr Fa (Ff3y)xH-F(axf3)y O"y.x(1fo y)(:rr l y»

Fr

Final1y for c we take the combinator (l = cl>D1

1f1

n:o

having

the property cl> Dl n:1

n:o

(Dl xy) = D'lYx. Clearly c is its own inverse, thus

satisfying MC6, and is natural by the commutivity of the following

diagram:

where

xx y

X a~a'

c = (l

a x ~ ------------------~~ f3 Je a

0:'" f3' -----------------~~ ~-r le a'

Lettingl- o;x,rf3y

B e(X Je Y) (Dl xy) e(D.1(Xx) (Yy») D1<Yy) (Xx)

B(Y Je X) (l(DI

xy)

lt remains only to show toot the above definitiQns comply with the

axioms. HC2 states that the following diagram commutes:

1 --l" ,

,

t lj

1 1. r j ~ 1

!­~:

j: f

t

~ !'

j' f ! ;

l 1 1. t

1 f

1

Page 40: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

:rr JeI =rXI o

'-34-

a =.r (0: xl) le 13 -----------l;.".. 0: x 0; x 13)

Page 41: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-35-

MC3 states that the following diagram commutes:

a = r a = r «ci 1< 13) )( y)X' Ô -----'?o;;.. (ax 13) x (ylC ô) -------';r~ a x (13 JI (y x ô) )

a " l

(a x (13 x y)) x ô _______ a~=_r ____ ---.~~ a. x «13 x y) )f. ô)

MC7 states that the following diagram commutes:

a = r c = e (a x 13) li: Y --------'~~ a x (13· x y) ---------~> (13)( y) x a

c x l a = r

a =r IXc (13 J[ a) )( y------~~ 13 ,,(a)C y) ---------.....;~~ 13 x (y x ex)

, ;. 1 i-

l ~ -!

1 t

i 1 f

1 i

1 !

Page 42: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-36-

r(e (r(Dl(Dlxy)z») = r(e(D1x(D1YZ»)

r(D1(DIYz)x) = D1Y(D1zx)

(I K e:)(r«e: ~ I)(Dl (D1XY)Z») = (1 Je e)(I'(D1(D1yx)z»

(1 x e)(Dly)(Dl xz'» = D1Y (Dl zx)

MCC2 states that the following diagram commutes:

[1 x ~, 13] _____ !::...p_=--=..:f")=--_____ ~>

[~, 13]

M Let a----~., 13 and If- ax •

Bt\ [nl,I] Mlx

[nl,I] M(DIlx)

KMlx Mx

Il ( [ nl

' 1] M) Ix

M(nl(DIlx» = Hx

MCC3 states that the following diagram commutes:

[I~ [ a,f3]]

Page 43: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-37-

_-..:...P __ ~> [a Je ~., [y, ô]] ___ P __ ,>, [a, [~, [y,ô]]]

[r,l]=[a,l]

[a x(~)C y),ô] p=/\

Let a Je (~)( y) -----~~) ô , Il- ax, \\-~y, ~ yz

B [I,p] pMxyz = [1,1\] U~M)xyz

A (l\ M(lx) )yz = ~ Mx(DIyz)

M(DIX (DIYz»

B {\ (BMr, 1] )Mxyz = t\ (B L\ [r, I]M)xyz

([r,I]M)(DIXY)z

M(rCD1CDIxy)z»

[r,I]M(DI(DIxy)z)

M(DIx(DIyz»

MCC3' states that the foilowing diagram commutes:

[l, p]

'> [a, [~x y,ô]]

Page 44: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-38-

. [y,ô]

LO:":f3 = B ) [[a~~,y],[ax~,Ô]]

L~ l ,

[[13,y] , [~,ô]] [I,p]=[I,/\ ]

La l [[a, [~,y]], [a, [~,ô]]] ~ [[ax~,y],[a,[~,ô]]]

[p,I]

M N Let y. ----7) ô, axl3 ____ ~) y , 1\- ax, and II-~y

B[~, I] (BBB)MNxy = [1\, I] (BBBM)Nxy

BBBM( [\ N)xy = B(BM)( {\ N)xy = BM( 1\ Nx)y

M( I\Nxy) = M(N(D1 xy))

B [ l , 1\ ] BMNxy = [ l, 1\] (BM) Nxy

I\(BM (IN))xy = BMN(D1xy) = M(N(D

1xy))

MCC4 states that the following diagram commutes:

Page 45: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-39-

p=/\ [axI,f3] --------------7;> [a, [I, 13]]

[1f ,r]=[r,r] o

[a,f3]

M Le t a ----~::. 13 and 1\- ax

B l\ [1f , rJMxI = h([ 1f ,I]M)xI o o·

[l, KJ MxI K(M( Ix»I = Mx f ! . ~

Page 46: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-40-

APPENDIX l

Reducibility

Much of the work in [CLg] involves a monotone relation, >

which satisfies all the requirements of a congruence with respect to

application except symmetry. Instead of assuming the axioms (1), (K)

and (S) in 11 (F) we may .assume

IX > X

(K) >

KXY ~ X

(S) >

SXYZ ~ XZ(YZ)

and question when we rrtay assert X.2 y for combinators X and Y. If it

is true that X ~ Y we say "X is reducible to Y". Notice that reduci-

bility is a stronger relation than equality, that is X ~ Y implies X

and Y have the same affect on·all obs, but X could equal Y without

X ~ y .or Y > X being true. For example SKSX > X implies l = SKS,

but it is not true that l ~ SKS or SKS ~ l may be deduced from (1) >

(K) and (S) > :>

Similarly Church studied his À-applicative system using the

postulate

(ÀX.M)a red [a/x] M

in the place of (À). While we have managed to develop a correspondence

between X arrl 71lvhich preserves equality, we now find that reduction is

Page 47: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-41-

not preserved, i.e. we have neither X red Y ==> X ~ Y nor

X ~ y ~ X red Y. For a counter example to the former let

x = Àyt(Àz.y)xy) and Y Ày.yy i.e. X = S(S(S(KK)I) (Kx))I

and 1

Y = SIl. Then X red y in ~, but both X aIIi Y are irre-

ducible in 71. A counter example for X ~ Y ~X red Y is

X = ÀX.ux (vx) and Y = ÀX~(ÀY.uy ( vy))x.

In order to partially rectify the situation we replace ">"

with a relation ">.' satisfying the additional property

Xx >- y =;> X >- À.x.y

1 We may then prove

i) X >-Y

ii) X>Y

iii) ÀX.X

=:;> X = Y

~ X >-Y

>- Ày. [y/x] X

(ÀX.M)N = [N/x]M

(ÀX.M)x = 1-1

iv) X red Y ==> X >-Y

These properties make it possible to study 1V through~. However,

-since the converse of iv is not true, we do not have a reduction pre­

serving corre.spondence between 11 and';: •

Our ~eason for not defining l = SKK becomes apparent.

SKxy >y implies SK >- KI so that if we define l = SKK we find2

1 cf [CLg, p.2l8]

2 fCLg, p.22l]

1

1

\: 1

1: !

1 r i !

i

1:

1 , 1 l'

1 ~ f

1

Page 48: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-42-

l :> KIK >- K(KIK)K >- K(K(KIK)K)K

a property which would make tœ study of normal forros in 11 nearly

impossible.

î

t i ~

1

1

1

Page 49: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

[CLC]

[FTS]

[FML]

[RA]

[CLg]

[cc]

[IMM]

[DCI]

[OCII]

[AdF]

-48-

REFERENCES

Church, A10nzo, The Ca1cu1us of Lambda-Conversion, Princeton

University Press, (1941).

Cogan, Edward, J., " A formulation of the theory of sets from

the point of view of combinatory logic." Zeitschrift fur

Mathematische Logik und Grundlagen der Mathematik

1: 198-440 (1955).

Curry, Haske11 B., Foundations of Mathematical Logic, McGra\o1-Hill,

N.Y. (1963).

"Recent advances in combinatory 10gic", Address to the Sociét~

Mathématique de Belgique, at the Fondation Universitaire,

Brussels, on March 16, 1968.

Curry, Haskêl1, B. and Feyes, Robert, Combinatory Logic, North­

Holland Publ. Co., Amsterdam (1968).

Eilenberg, S. and Ke~ly, G.M., "C10sed Categories", proceedings of

the Conference on Categorical A1gebra, (La Jol1a 1965),

Springer-Verlag; N.Y. (1966).

K1eene, S.C., Introduction to Metamathematics, Van Nostrand, N.Y.

(1952).

Lambek, J. "Deductive Systems and Categories 1", Mathema tical Systems

Theory, V.2, No. 4 (1968).

"Deductive Systems and Categories II'' Lecture Notes in Mathematics,

No. 86, Springer-Ver1ag, N.Y. (1969).

Lawvere, F.\J. "Adjointness in Foundations", Diatetica, to appear.

Page 50: COMBINATORY LOGIC AND CARTESIAN CLOSED …digitool.library.mcgill.ca/thesisfile47727.pdfCOMBINATORY LOGIC AND CARTESIAN CLOSED CATEGORIES by ... COMBINATORY LOGIC AND CARTESIAN CLOSED

-"44-

[DA] "Diagonal Arguments and Cartiesian Closed Categories ll

Lecture" Notes in Mathematics, No.92, Springer-

Verlag, N.Y. (1969).

[EML] Rosenbloom, P. The Elements of Mathematical Logic,

Dover Publications, N.Y. (1950). 1

l'

/