Professional Documents
Culture Documents
Author(s): R. Hindley
Source: Transactions of the American Mathematical Society, Vol. 146 (Dec., 1969), pp. 29-60
Published by: American Mathematical Society
Stable URL: http://www.jstor.org/stable/1995158
Accessed: 03-11-2015 04:59 UTC
Your use of the JSTOR archive indicates your acceptance of the Terms & Conditions of Use, available at http://www.jstor.org/page/
info/about/policies/terms.jsp
JSTOR is a not-for-profit service that helps scholars, researchers, and students discover, use, and build upon a wide range of content
in a trusted digital archive. We use information technology and tools to increase productivity and facilitate new forms of scholarship.
For more information about JSTOR, please contact support@jstor.org.
American Mathematical Society is collaborating with JSTOR to digitize, preserve and extend access to Transactions of the
American Mathematical Society.
http://www.jstor.org
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
TRANSACTIONS OF THE
AMERICAN MATHEMATICAL SOCIETY
Volume 146, December 1969
29
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
30 R. HINDLEY [December
We shall see later that all the types which the rules assign to I have the form Faa,
so the types of I are just those obtained by substituting a type a for the variables
in the type-scheme Faa. It will not be obvious from the rules that every ob X has
a type-scheme with this property. If X does have a type-scheme from which all
the types of X (and no extra types) can be obtained by substituting types for
variables, it will be called a principal type-scheme of X(l).
In ?3 of this paper it will be proved that every ob X that has a type at all, has in
fact a principal type-scheme which can be effectively determined from the structure
of the ob. This result will apply to the case when X may contain variables, which
are not assigned types by the rules; in this case it will say that if there exists an
assignment of types to the variables from which a type for X can be deduced, then
there is a type-scheme a such that all the types of X, for every assignment of types
to the variables, are instances of a.
?4 will show how the principal type-scheme of [x] . X (defined therein and in [1])
is related to the principal type-scheme of X.
Finally, in ?6 it will be shown that if a is a principal type-scheme of an ob X,
then any substitution-instance f of a is a principal type-scheme of some ob XB6
(which is reducible to X by the reduction-rules for combinators). Besides its
intrinsic interest, this result goes part of the way towards justifying a conjecture of
Curry's that the alternative system of combinatory logic with type-restrictions (in
which an infinity of basic combinators is postulated, each with a unique type) can
be defined in the system described here. This point will be explained in ?5.
Actually, the main result (Theorem I) in ?3 was proved independently, almost
simultaneously, by Curry and myself, using different methods; the present ex-
position owes something to both. Curry's proof (see [2]) does not use the result of
J. A. Robinson [4] which is needed here; in fact I think his proof essentially con-
tains an alternative proof of that result. The main result in ?4 (Theorem 2) was
also proved almost simultaneously by Curry and myself: since Curry's proof
is shorter, it has been used here.
I wish to thank H. Curry for all his help with this paper, both in discussions and
by permission to use his proof of Theorem 2.
(1) In [2] principal type-schemes are called "principal functional characters." In [1] the
term "functional character" is used in approximately the sense of "principal type-scheme"
here, but the assumptions therein allow that extra types could be assigned to the obs, besides
the types given explicitly; if this were done the functional characters stated in [1] (e.g. ?8c,
p. 264) would not be principal.
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
1969] THE PRINCIPAL TYPE-SCHEME OF AN OBJECT 31
intendedto representfunctions or more abstractoperations(like I in the Intro-
duction)(2).
DEFINITION 1. Obs.
(i) There are assumedto be certainsymbolscalled ob-atoms,all of which are
obs; these atoms may includetwo basiccombinators,S and K.
(ii) If X and Y are obs, then the result,(XY), of puttingX and Yin parentheses
with X on the left of Y, is a compoundob.
A combinatoris any ob in which only the atoms S and K occur.
(Notice that this definitionis really a sort of definition-scheme:for each given
set of atoms, it definesby inductiona correspondingset of obs. The exact nature
of the atoms is irrelevanthere (except that S and K will play a special role).
SimilarlyDefinitions2, 4 and 5 are reallydefinition-schemes.)
It is assumedthat no compoundob is also an atom, and that if (XY) (UV),
then X_ Yand U- V.CapitalRomanlettersdenotearbitraryobs, and parentheses
will be omitted in such a way that for instance,"XYZU" denotes (((XY)Z)U).
DEFINITION2. Types and Type-schemes.
(i) Thereare assumedto be certainsymbolscalled basic types(at least one and
at most countablymany);also a countablyinfinitesequenceof type-variables. All
these are type-schemes,called type-atoms.
(ii) If a and ,Bare type-schemes,then (Fag3)is a compoundtype-scheme.
A type is any type-schemewhichcontainsno variables(3).
It is assumedthat no compoundtype-schemeis a type-atomand that if (Fac)
-(FyS) then a -, andy &.Greeklettersdenotearbitrarytype-schemes,and lower
case Romanlettersfromthe startof the alphabetdenotetype-variables.The outer-
most pair of parentheseson a type-schemewill usually be omitted. In denoting
lists of variables,for example"a1,. . ., an", it will be assumedthat the variables
are mutuallydistinct(more precisely,i#j impliesa,0 aj), unless explicitlystated
otherwise.
In the usual interpretations,the ob (XY) representsthe result of applyingthe
function X to the argument Y. Each basic type representsa particularset of
functions,dependingon theinterpretation onemayhavein mind,and Fagrepresents
the set of all functionsfrom a into 3. Thus each type representsa particularset of
functions.
The variablesare intendedto representarbitrarytypes, so that a type-schemea
containingvariablesrepresentsa class of types, each type being obtainedfrom a
by substitutingtypes for the variables.
(2) In Curry (1] the obs are not necessarily linguistic expressions, but it is convenient to
think of them here as such, and this specialization involves no essential loss of generality. But
in Definition 1, notice for example that the symbols "S" and "K" need not themselves be the
basic combinators; they only denote them.
(3) In [1], Curry finds it convenient to regard types as a particular kind of ob, called
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
32 R. HINDLEY [December
Sequences will be denoted by angle brackets, for example "K<a,..., an>", and
sets denoted by brackets "{ }".
DEFINITION 3. Substitution. For any type-schemes PI, . .., PQn a, and distinct
type-variablesa,, . . ., an,
n
La1,..
la,**., anJ
is definedto be the resultof replacingeachoccurrenceof a, in a byP, simultaneously
for i= 1... n. (If a, does not occurin a, no replacementsaremade.)Any type-scheme
with the above form is called an instanceof a. (Hence a is an instanceof itself.)
For any sequence<al,..., ak> of type-schemes,define
-
, an k>
[al, ]<(1, ,
in the axiom-schemes. Throughout this paper "deduction" means this kind of deduction.
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
1969] THE PRINCIPAL TYPE-SCHEME OF AN OBJECT 33
a? F-FgaU, v Yfl
by an applicationof Rule (F). Henceeveryob-atomin X mustoccurin a statement
in Qslor in an axiom; and each statementin ./ which actually occurs in the
deductionmust have its ob.atom occurringin X [1, ?9B, Theorem11.
EXAMPLE
1. - Faa(SKK).
Proof.
F(Fa(F(Fba)a))(F(Fa(Fba))(Faa))S
Fa(F(Fba)a)K
F(Fa(Fba))(Faa)(SK) Fa(Fba)K
Faa((SK)K)
The first two statementsin this deduction,for S and K, are axioms obtainedby
substitutingFbafor b, and a for c, in the appropriateaxiom-schemes.
(5) If S and K are the only ob-atoms, and type-variablesare prohibited from the axioms,
Definition 4 is equivalent to the system in [2], and to the basic theory SF(K, S) in [1, ?9A3]
with restrictedrule F and rule Eq omitted.
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
34 R. HINDLEY [December
a,, .. ., an
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
19691 THE PRINCIPAL TYPE-SCHEME OF AN OBJECT 35
(wherexl,. .., xn are the atoms in X which do not occur in the axioms), then a
must be a p.t.s. of X; becauseany deduction
{alixl, * * -, nn
9.. F X
can be performed by a series of substitutions in which n =1, and any series of such
"single" substitutionscan be performed by one substitution in which n'? 1.
(See notes 7.4 and 7.6, p. 264 of [3].)
COROLLARY. Two or more successive substitutions can be performed by one sub-
stitution; hence an instance of an instance of a type-scheme a is an instance of cc.
LEMMA 2. Any substitutionfor variables a1,..., an in a type-scheme a can be
expressed as a substitutionfor all the variables in a (by substituting themselvesfor
the variables distinctfrom al, ..., an).
9. A trivial variant of a type-schemea is any type-schemewith the
DEFINITION
form
Ebi,...,
.
bn1c
ar
a,al , an.
where bl, . . ., bn are distinct, and a,, ..., an include all the variables in (x.Trivial
variantsof deductions,and of sequencesof type-schemes,are definedsimilarly.
LEMMA 3. (a) The relation of being a trivial variant is reflexive, transitive and
symmetric.
(b) A type-scheme,Bis a trivial variant of a type-scheme caif and only if acand I
are instances of one another.
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
36 R. HINDLEY [December
thus we can look at any common instance of a, ,Bas having been obtained by
performingthe same substitutionon a as on ,B.Now J. A. Robinsonin [4, p. 32]
(UnificationTheorem)has given an algorithmwhich allows us to decidewhether
in the above circumstances,a and 8 have an instancein common,and if they do,
to constructa h.c.i. for them. This proves(a).
To prove (c), notice first that if two sequences <al, ...., a,> and < *,
have an instancein common,then they must have the same numberof terms.Let
6 be a basic type, and define
a Fal(Fa2(. (Fap0)..
- Fp1(Fp2(.. (F ) )
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
1969] THE PRINCIPAL TYPE-SCHEME OF AN OBJECT 37
Then a and f8 have a common instance if and only if the given sequences have a
common instance (since nothing can be substituted for 0), and if the h.c.i. of a
and P is
. . .
Fyl(Fy2( TFYPO) ...*))
substituted for a1, . . ., a. respectively by the substitution "* "; let e1,. . ., er be all
the variables in these type-schemes. Now for some Y1, *.* Yp, 1, .** s3q,
[el , e.]
-el,...,aer 'Ml, .
aa1,..., apj
where for each i, a' is the result of substituting e1, e.. for e1,..., eT respectively
in at. Therefore by the previous expression for <A1,,ul>,
Hence
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
38 R. HINDLEY [December
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
1969] THE PRINCIPAL TYPE-SCHEME OF AN OBJECT 39
Then find an h.c.i. of the two sequences
<013 * * * , Or i>, <X,,..* *rX (FCg)>
which contains none of a1,,. . ., ak, d1, . .., dn (this is possible by Lemma 5(c),
since the two sequenceshave a commoninstance<v1,..., vr,(FaI)> by (2) and (3)
above). Supposethis h.c.i. is
(6) <(01, (Or,(Fa-r)>,=_<0*, . . . 90, 7r*X>, = <X19 .. I X0XT(F; Tr)>
where "*" denotes the substitution of certain type-schemes for b1,.., b1 only,
and " ?' for c1, ..., cm only. Then construct the two deductions 9* and 9'. which
give
(7) {Pful, ** 0*,pUp.
0*wl, . ,**wj} FarU,
0
(8) {0001, .sqvq
40 X01wi , Xr,wr} ;V.
0
Sincea-= and 0* x for each i, these two deductionscan be combinedby Rule
(F) to form one deduction,giving
(9) {0*U1u, * * 0V*Up9
*1 Or*WrgiU C,
+4Vj F |r( ).
(6) Here the relevant deductions will be called "(1)," "(9)," etc., though strictly speaking
(1) and (9) are not deductions but only the hypotheses and conclusions of deductions. Thus
for instance, type-variablesmay occur in the deduction giving (1) but not appear in (1) itself
(if they occurred in axioms used in the deduction); in Example 1, b is such a variable.
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
40 R. HINDLEY [December
<tY74 + + r +>.
X+*(F;g)
Hence <Y,9 Y3> is an instance of <KYI+,Y5+>; since this is the same as <eYi* ,Y5>
the proof is complete.
REMARK.In this proof the p.t.s. XTof U in (4) may be either compoundor a
variable.(It cannotbe a basictypesinceit has an instanceFag3whichis compound.)
The variableg was introducedjust to treat these two cases simultaneously,and
when f is compound,g is not reallynecessary.
COROLLARY 1.1. There is an effective way of decidingfor each X whether or not
X has a type-scheme, and if it has one, for calculating its p.t.s., and its principal
deduction.(Assuming that atoms can be effectively distinguishedfrom each other and
from compoundobs, and that substitutionscan be effectivelyperformed, etc.)
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
19691 THE PRINCIPAL TYPE-SCHEME OF AN OBJECT 41
COROLLARY 1.3. Suppose that all the atoms common to U and V are given types
by the axiom-schemes; if
(4a) {61ull..., OPUP}F-p Fe-q1U
and
and {, , have an h.c.i. e* _? whose new variables (i.e. those not in e) do not occur
in q, then the result 77*,of making exactly the same substitutions in r7 as changed f
to e*, is a p.t.s. of (UV).
Proof. By Lemma4b we mayreplacethe deduction(5a) by one with no variables
in common with (4a). Supposethis deductiongives
(5a)' Qf4v1, .;, fqvq} Hp C'V.
{0*1ui, . . ., 0P*Upq
O?lvi, . . ., O?qVq}Fp, -*(UV)-
WiUlS * * ., O'vq} F V
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
42 R. HINDLEY [December
{Fab x, a y, a z} Fp b(K(xy)(xz)).
Proof. Let a, b, c, d, e, gl, g2 be distinct type-variables. Principal deductions for
x and y are
cx, ay.
To get a principal deduction for (xy) by the construction in Theorem 1, notice
that an h.c.i. of c and (Fag,) is just (Fag,) itself; hence, replacing c by (Fag,) and
combining the two deductions by Rule (F) gives a principal deduction
(10) Faglx a y
gl(xy)
A principal deduction for K is the one step Fgl(Fbg,)K; combining this with (10)
by Corollary 1.5 gives the principal deduction
Fgl(Fbg1)K Faglx ay
(11) g1(xy)
Fbg1(K(xy))
Fedx ez
(12) ~~~~~~~~d(xz)
To obtain the result, combine (11) and (12). No type-variables are common to
both, and the only ob-atom they have in common is x; hence we must find an
h.c.i. of the sequences
All variables in (10) and (11) occur in these sequences, so there is no restriction
on the h.c.i. we can use. A suitable one is
<(Fab), (Fbb)>,
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
1969] THE PRINCIPAL TYPE-SCHEME OF AN OBJECT 43
obtainedby substitutingb for g, in the formersequence,and a, b, b for c, d, g2
in the latter sequence.Makingthe same substitutionsin (11) and (12) and com-
bining by Rule (F) gives the principaldeduction
{Fab x, a y, a z} p b(K(xy)(xz)).
3. If I=SK K, then Fp Faal.
EXAMPLE
Proof. By the axiom-schemes,
Fp F(Fa(Fbc))(F(Fab)(Fac))S, p Fa(Fba)K.
By Corollary1.3, since Fa(Fba)is an h.c.i. of Fa(Fbc)and Fa(Fba),substitutinga
for c in the p.t.s. of S and applyingRule (F) gives
Fp F(Fab)(Faa)(SK).
Now Fa(Fba)is an h.c.i. of Faband Fa(Fba),so by Corollary1.3again(substituting
Fbafor b in the p.t.s. of SK),
F_pFaa(S KK).
But we can say more than this: in the first applicationof Corollary 1.3 above,
there are no al, . . ., ak, di, . . ., dn to worry about in the proof of the corollary,
and similarlyfor the second application(sinceeveryvariablein the deductionfor
SK occurs in its conclusion),so the above proof actually gives us a principal
deductionfor SKK. This deductionis the same as in Example1.
EXAMPLE 4. The ob Sil has no type-schemesat all.
Proof. By Example 3,
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
44 R. HINDLEY [December
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
19691 THE PRINCIPAL TYPE-SCHEME OF AN OBJECT 45
and by the axiom-scheme for S, the p.t.s. of this ob (if it has one) must be an
instanceof (Fac), whichis compound.Hence the p.t.s. of [x]. M is compound,so
the principaldeductionfor [x].M must have the form
(16) {/1Y1, *, %nYnl}p Fy8([x].M).
by distinct new variables not occurring in < a1,.9. , (Fe)>, and then make the
e
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
46 R. HINDLEY [December
then
F-p(F.al, ... a.P)([xj ***, x. *M),
where
(F?l ..*?f3) is Faj(Fa2( ... (Fa )...))
*
or just ,Bwhen n=O, and
[x].(yx) y,
so Theorem2 would say that
Fab y Fp Fab y,
whichis false becausethe one-stepdeduction
Fab y
is not a principalone for y. The proof of Theorem2 breaksdown when (iv) is
used becausethen the p.t.s. of [x].M may not be compound; but this does not
mean that Theorem2 is useless;see the proof of Theorem3 later.
Incidentally,Theorem2 can be proved by inductionon the constructionof M
without using (14) and (15); though this proof is longer than the above one, it
does give an alternativeproof of (15), because(15) followsfromTheorems1 and 2.
5. An alternativeapproachto typed combinators. Now besides the formal
system set up in Definitions 1 to 4, there is another way of introducing type-
restrictionsinto combinatorylogic. In Definition 1, instead of postulatingtwo
basiccombinatorsS and K, we couldpostulatean infiniteset of basiccombinators.
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
19691 THE PRINCIPAL TYPE-SCHEME OF AN OBJECT 47
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
48 R. HINDLEY [December
(ay)T
= Say7 (MN)T = (M TN T).
(Ka6)T=_ K*a
To completethe embeddingof the infinite-basedsystemin the finite-basedone, we
would only need to show that
(20) M > N in the infinite-basedsystemiff MT > NT in the finite-basedsystem.
Half of this equivalencefollows from (19); in fact, to show that M' N implies
MT > NT, it is enoughto show that for all M, N, P,
S* M TN TpT > MTpT(N Tp T) K* MTNT > MT
(7) The main use of the alternative system (with each atom having a unique type) is to
representcertain sets S of functionals (see [5] for example). We representeach 'kin S with type
a by an ob [4,]with the same type, such that [q][(] = [0(0)] if 4, has type F#y and 4 is in S
with type f and 0(0) is in S. One purpose of the above embedding (suggested by Curry) is to
show that every 4 which can be representedas above can also be representedby a finite-based
ob [4,]' such that [4,]'[4]'=[4(O)'. For this result we do not need the converse half of (20);
we simply define [4]' to be [4]T.
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
19691 THE PRINCIPAL TYPE-SCHEME OF AN OBJECT 49
Fp,F(Fbb)(F(Fcc)(F(Fbc)(Fbc)))C.
Proof. Tedious;see the end of the section.
3. If X is an ob whose atoms are all given types by the axioms, and
THEOREM
i- X
for some a containing only variables, then there exists an ob XO,such that
Xe?_ X and FpaXa;
if X is a combinator, then so is X,,.
Proof. First suppose that for each a containingonly variablesthere exists a
combinatorVXE such that
Fp FaaVy.
Then using the ob A from Example5, ?4, define
Xa_ S(AI)VaX.
Then
Xa > AIX(VaX)
> K(IX)(I(VaX))c by (14) and the def. of A
X.
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
50 R. HINDLEY [December
It only remainsto prove the existenceof Vafor all a; this is done by induction
on the numberof occurrencesof F in a (calledthe "length" of a).
Basis. If a is a variable, choose V_ 1.
Inductionstep. Suppose a is Fpy for some ,B,y. We shall construct Va by
inductionon the numberof variablescommonto P and y.
Basis. Supposethere are no such variables.By the hypothesisof the induction
on a we have
F_pFB,BVfi, Fp IjyyVy.
Then using the C from Lemma7, define
Va CVOV,.
By Lemma7, for new variablesb and c,
F-pF(Fbb)(F(Fcc)(F(Fbc)(Fbc)))C.
Hence by Corollary1.3, substituting, for b,
Fp F(Fcc)(F(FPc)(Fgc))(CVO)
Now an h.c.i. of Fccand Fyyis Fyy,so by Corollary1.3 again,substitutingy for c,
F_pF(FPy)(FPy)(CVOV.)
as required.Notice that if a variablewas commonto P andy, Fyywouldnot satisfy
the conditionsfor e* in Corollary1.3.
Inductionstep. Suppose there is a variableh which occurs in both P and y.
Let g be a new variable,and define
9 [g/h]p.
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
1969J THE PRINCIPAL TYPE-SCHEME OF AN OBJECT 51
Fp, F(Fhh)(Fhh)V..
Fp, F(Fe,61)(F(F(Fdc)(Fdc))(Felel))Bl
Define Va,BiVVi.
Substituting8', E',y for d, e, c changesel into F(F8'e')ywhichis Ff'y. Henceby
Corollary1.3,
Fp,F(F(FS'y)(FS'y))(F(Fgy)(Fly))(Bl V).
Now 8 [hfg]8' and g does not occur in y, so F(F8y)(F8y)is an instance of
F(F8'y)(F8'y).Also every variablein the formertype-schemeoccurs in the latter
one (since h occursin y). ThereforeCorollary1.3 can be appliedto B1V and Vl,
with
F(F8y)(F8y),
*7 F(Ffly)(Ffty).
Thus we obtain
FpF(Fgy)(Fgy)(Bl rVJ
as required.
Case 3. Whenftis compound,say f=BF8e,and h occursin Ebut not in 8. Then
f' is F8e'and g occurs in e'. Now FEyis shorterthan a, so by hypothesisof the
inductionon a thereexists V2 such that
Fp F(Fey)(Fey)V2.
Define V,B2VV2.
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
52 R. HINDLEY [December
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
19691 THE PRINCIPAL TYPE-SCHEME OF AN OBJECT 53
Proof. It is enoughto provethe existenceof a VO,for the case when a contains
basic types. Let 01,. . ., 0a be the basic types in a, and let a0 be the result of sub-
stitutinga distinctnew type-variableat for each Oiin a. Thena will be the resultof
substituting 01, . . ., on for a1, . . ., an in a0. By a nonprincipal deduction obtained
by substitutingao for a in Example1, ?1,
F- Faoaol.
F'p oiZi.
F_pFcaa(UZ,.. Zn)g
shows that X does not need to have a type at all, even though Y has types. All
that we can say is that if X? Y and X has types, then by (13), the p.t.s. of X is an
instanceof that of Y.
When X= Y in general,the situationis even less tidy; in fact thereexist such X
and Y whichhave no type-schemesin commonat all. For example,define
ao_ Fc(Fcc), f= F(Fdd)d;
then by Theorem3 thereexist combinatorsA1and 12 such that
I, -I I2
1_ 1
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
54 R. HINDLEY [December
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
19691 THE PRINCIPAL TYPE-SCHEME OF AN OBJECT 55
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
56 R. HINDLEY [December
Thereforeby Corollary1.4,
Fbc x i-, Fcc(Ex).
Also Facu, a z i-, c(uz). Therefore by Corollary 1.5,
(31) Fbc x, Fac u, a z sp c(Ex(uz)).
Now for new variablesa, d, e, we have
-,,Fa(Fda)K,
a z i-, a z.
Thereforeby Corollarylo5,
az i-, Fda(Kz).
Also p-, Fb(Feb)K.Therefore by Corollary 1.4, substituting Fdafor b,
az i-, Fe(Fda)(K(Kz)).
To combinethis with (30) by the proof of Theorem1 we need an h.c.i. of
Fe(Fda), F(Fbb)g.
A suitableh.c.i. is F(Fbb)(Fda),since all its variablesoccur in Fbbor in Fe(Fda);
then substitutingFbbfor e in the above deductionand combiningwith (30) gives
Fbby, Fbcx, a z p-, Fda(K(Kz)(G(SK)yx)).
To combinethis with (31) by the proof of Theorem1 we need an h.c.i. of
<Fbc,a, Fda> and <Fbc,a, Fcg>.
A suitableh.c.i. is obtainedby substitutingc for d and a for g; makingthe same
substitutionin the above deductionand combiningwith (31) gives
Fac u, Fbby, Fbc x, a z p-, a(K(Kz)(G(SK)yx)(Ex(uz))).
The resultfollows by Corollary2.1.
Now supposethat for each i= 1, . . ., 4 there exist two combinatorsLi and Mi
and a type-scheme yi such that
F_pFfjyjLj, FphiyiMi
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
1969] THE PRINCIPAL TYPE-SCHEME OF AN OBJECT 57
Now an h.c.i. of Fbyjand F77jyjis Fqmyj, andthis satisfiesthe conditionsof Corollary
1.3 since everyvariablein -i is in yi, so by that corollary,
Fp, F(F:nj-q)(Fejej(HLjMi).
Thereforeby Corollary1.5,
Fde y, d z -,, Fcc(KI(yz)).
Similarly,by Corollary1.5 again,
Fdc x, Fde y, d z i-, c(KI(yz)(xz)).
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
58 R. HINDLEY [December
Thereforeby Theorem2,
Fdc x, Fdey p- Fdc([z]. KI(yz)(xz)).
Now by (25),
-p F(Fdc)(Fcc)E,
so by Corollary1.5,
Fdc x, Fde y -p Fcc(E([z]. KI(yz)(xz)))
and the result for M1 follows by Corollary 2.1.
When i=2; let Y2 be Fe(Fcc) and define
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
19691 THE PRINCIPAL TYPE-SCHEME OF AN OBJECT 59
Then
-p F(Fb(Fde))(Fb(Fdd))L3
and
-p F(Fbd)(Fb(Fdd))M3.
Proof. For M3, use the resultfor M2.
For L3; by the proof of Example3, ?3,
i-,F(Fde)(Fdd)(SK).
Also
Fbcx, b y -pc(xy).
To combinethesetwo deductionsbytheproofof Theorem1,noticethat F(Fde)(Fdd)
is a suitableh.c.i. of F(Fde)(Fdd)and Fcg, and substituteFdefor c, giving
Fb(Fde)x,b y Fp Fdd(SK(xy)).
The resultfor L3 follows by Corollary2.1.
Wheni=4; let y4 be Fb(Fee)and define
4 [x, y] E(xy, M4 M2.
Then
,-p F(Fb(Fde))(Fb(Fee))L4
and
ii F(Fbe)(Fb(Fee))M4.
Proof. For L4
Fbc x, b y , c(xy)
and by (25),
F-pF(Fde)(Fee)E.
By the proof of Theorem 1, since F(Fde)(Fee)is a suitable h.c.i. of Fcg and
F(Fde)(Fee),we can substituteFdefor c and combinethe above two deductionsto
get
Fb(Fde)x, b y Fp Fee(E(xy)).
The resultfollows by Corollary2.1.
Theconstructionof B1,. . ., B4 is now complete,and only C remainsto befound.
Define
C - [u, x, y, z] . Hxyu(yz).
Then
pF( Fbb)(F(Fcc)(F(Fbc)(Fbc)))C.
Proof.By (29) Corollary1.4 used threetimes,
Facx, Fbcy, FbbuHp Faa(Hryu).
Now
Fdey, d zFp e(yz).
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions
60 R. HINDLEY
REFERENCES
1. H. B. Curry and R. Feys, Combinatorylogic, North-Holland, Amsterdam, 1958.
2. H. B. Curry, Modifiedbasicfunctionality in combinatorylogic, Dialectica (to appear).
3. -, On the definition of substitution, replacementand allied notions in an abstract
formal system, Rev. Philos. de Louvain 50 (1952), 251-269.
4. J. A. Robinson, A machine-orientedlogic based on the resolutionprinciple, J. Assoc.
Comput. Mach. 12 (1965), 23-41.
5. A. Grzegorczyk, Recursiveobjectsin all finite types, Fund. Math. 54 (1964), 73-93.
This content downloaded from 129.97.58.73 on Tue, 03 Nov 2015 04:59:12 UTC
All use subject to JSTOR Terms and Conditions