See discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/216300104

An Introduction to Generalized Type Systems

Article in Journal of · April 1991 DOI: 10.1017/S0956796800020025

CITATIONS READS 189 637

1 author:

Henk (Hendrik) Pieter Barendregt Radboud University

184 PUBLICATIONS 6,444 CITATIONS

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Logic and Computability View project

Research on Generalized Typed Lambda Calculi 1982--1987 View project

All content following this page was uploaded by Henk (Hendrik) Pieter Barendregt on 10 December 2016.

The user has requested enhancement of the downloaded file. PDF hosted at the Radboud Repository of the Radboud University Nijmegen

The following full text is a publisher's version.

For additional information about this publication click this link. http://hdl.handle.net/2066/17240

Please be advised that this information was generated on 2016-12-10 and may be subject to change. Journal o f Functional Programming 1 (2): 125-154, April 1991

Introduction to generalized type systems

HENK BARENDREGT Catholic University Nijmegen, The Netherlands

Abstract

Programming languages often come with type systems. Some of these are simple, others are sophisticated. As a stylistic representation of types in programming languages several versions of typed are studied. During the last 20 years many of these systems have appeared, so there is some need of classification. Working towards a taxonomy, Barendregt (1991) gives a fine-structure of the theory of constructions (Coquand and Huet 1988) in the form of a canonical cube of eight type systems ordered by inclusion. Berardi (1988) and Terlouw (1988) have independently generalized the method of constructing systems in the A.-cube. Moreover, Berardi (1988, 1990) showed that the generalized type systems are flexible enough to describe many logical systems. In that way the well-known propositions-as-types interpretation obtains a nice canonical form.

Capsule review This paper presents a possible classification for the simplest class of typed systems: only ß-reduction is considered, and the only type constructors are n and First, various Automath-like typed systems are analysed, with a brief presentation of their main properties (subject reduction, unicity of types and strong normalization). This analysis suggests rather naturally the notion of generalized type systems which provide a neat notation for describing the ‘propositions-as-types’ idea. The relevance of this notation is shown by the fact that it allows us to sharply express new problems, as the relative completeness of various interpretations, or to state concisely and precisely type-theoretic results (for instance, the exact formalism in which Girard’s paradox is derived).

1 Introduction

In several programming languages types are assigned to expressions (occurring in a program) in a way that may be compared to dimensions assigned to entities in physics. These dimensions provide a partial correctness check

2 V o lt+ 3 Ampère

is definitely wrong; the equation _ E = me

is consistent at least from the point of view of dimensions, since both sides are expressed in kg.m 2.sec-2. The analogy between types and dimensions is not perfect. A physical entity always has a unique dimension. Expressions in programming may have more than one type.

5 F P R 1 126 Henk Barendregt

This is the case when implicit (or Curry style) typing is allowed : the expression Âx.x denoting the identity obtains all types A for A an arbitrary type. We write ,, . ,. .. (ax.x):(A^ A) which should be pronounced as ‘lambda x dot x in A arrow A ’, and has as its intended meaning that ‘for each (element) a in A the application (Xx.x)a is also in A ’ (which is intuitively true, since (Àx.x) a = a). Examples of programming languages with this style of typing are M L (M ilner 1984) and M iranda (Turner 1985). There is also another paradigm, the explicit or Church style of typing, in which each correct expression has exactly one type. Now there are several versions of the identity function IA = Ax: A .x

and this one has as its unique type A -*■ A. Examples of languages with explicit typing are LCF (Gordon et al. 1979) and TALE (Barendregt and van Leeuwen 1985). During the last 20 years many systems have appeared for typing lambda calculi, both in the style of Curry and that of Church (see Barendregt (1991) for a survey). In this paper we give some flavour of a class of systems à la Church using the following methodology : Only the simplest versions of a system are considered ; that is, only with ß-reduction, but not with, for example r\-reduction \ only with types built up using -> and n, not using, for example, x or I. As will be seen, the systems become complicated anyhow. (For a discussion on types in programming languages see Cardelli and Wegner (1985); Reynolds (1985) and Barendregt and Hemerik (1990).)

2 A finestructure of the theory of constructions

Recently a quite powerful typed lambda calculus has been introduced by Coquand and Huet (1988). The system is called ‘the theory of constructions’, and is denoted here by À.C. By analysing the way in which terms and types are built up, a fine­ structure of this system is given, consisting of eight systems of typed lambda calculi forming under inclusion a natural cube with oriented edges (see fig. 1). Each edge -> represents the inclusion relation £ . This cube is referred to as the X-cube. Most of the systems in the >.-cube are known, albeit in a somewhat different form. The system X ^ is the simply typed lambda calculus (Church, 1940). The system X2 is the polymorphic or second order typed lambda calculus, and is a subsystem of the introduced by Girard (1972). It has been introduced independently by Introduction to generalized type systems 127

Reynolds (1974). The system Xw is essentially the system Fco of Girard (1972). System XP corresponds reasonably to one of the systems in the family of a u t o m a t h languages (see de Bruijn, 1980): System A.P also appears under the name LF in Harper et al. (1987), System XP2 is studied by Longo and Moggi (1988) under the same name. System A.C is one of the versions of the theory of constructions introduced by Coquand and Huet (1988), and system A.co is related to the p o l y r e c system studied by Renardel de Lavalette (1985). System APco seems not to have been studied before. (For À.® and ÄPm read ‘weak tao’ and ‘weak XPco’, respectively.) Before defining the X-cube, it is useful to describe informally some ideas which play a role in the various systems. The first informal idea is the construction of function space types. If A and B are types, then A -> B is the type of functions from A to B. So, if F : (A -> B) and x : A, then (Fx):B. The second idea is that of dependency. Types and terms are mutually dependent; there are

• terms depending on term ; • terms depending on types ; • types depending on terms; • types depending on types.

Some explanation is necessary here. Terms depending on terms are extremely common : , FM is a term that depends on the term M. A term depending on a type is the identity on

^ IA = Xx : A . x.

A type depending on a term is, for example,

An- B (with n a natural number) defined by

A ° ^ B = B; An+1 -> B = A ^(A n^B ).

And a type depending on a type is, for example, A-*A for A a given type. Once there are types depending on terms one may introduce cartesian products. Suppose that for each a ; A a type B., is given, and that there is an element ba : Ba, Then we may want to form the function Xa : A . ba

that should have as type the cartesian product

rTa: A . Ba

of the Bas. Once these product types are allowed, the function space type of A and B can be written as (A ^B ) = ITa:A.B(= BA, informally),

5-2 128 Henk Barendregt where a is a variable not occurring in B. This is similar to the fact that a product of equal factors is a power n n b i becomes bn i-1 provided that bj = b for 1 ^ i ^ n. So by using products, the -> can be eliminated. The next idea has to do with the formation of types. For some simple systems the types are - so to say - given in the metalanguage. For example, if one has informally constructed a type A, then one can formally derive

I— (A.a : A . a) : (A ->• A).

Since in the /.-cube terms and types are mutually dependent, one moves the formation of types from the metalevel to the formal system itself - the idea comes from the a u t o m a t h languages of de Bruijn (1970). To do this a constant * is introduced that is the sort of all types; then ‘A: *’ is a statement expressing ‘A is a type’. A sentence in the meta language like ‘if A is a type, then so is A -> A ’ now becomes a formal type derivation A : * (— (A -> A) : *. Here A stands for a variable, and since it is in *, one can say that A is a type variable. For each of the four dependencies one may want to introduce function abstraction

(X,m : A . Fm) : (A ^ B) ; (Xa : *. I„) : (ITa : *. (a -> a)) ; (A.n:W.An^B ):f\J^*; (tax: *. a -> a) :(*->-*).

Now what is * *? Probably not a type, because then one should have (*-»*):* and this may lead to contradictions. Therefore, one introduces a new ‘sort’ □ , the sort of all kinds, and postulates that *: □ and (*->*):□. The inhabitants of *->*, like our F, are called constructors. Similarly, one postulates (N The expression (na:*.(a->a)) being a cartesian product of types will also be a type, so (Flot : *. (a -> a)) : *. Since it is a product over all possible types a, including the one in statu nascendi (that is, (IToc:*.(oi^oi)) is among the types in *), there is an essential impredictativity here. We now start to define the cube of type lambda calculi.

2.1 Definition (i) The system of the tacube are based on a set of pseudo-terms 3T defined by the following abstract syntax ST — x |cj 3 ~ 2 T |A.x : HT2 T j ü x : 2 T 2 T where x is the category of variables and c that of constants. (ii) On 2 T the notions of ß-conversion and ß-reduction and defined by the following contraction rule (tac : A . B) C B[x : = C] Introduction to generalized type systems 129

(iii) A statement is of the form A :B with A, B e J . A is the subject and B is the predicate of A:B. A declaration is of the form x:A with A e J and x a variable. A pseudo-context T is a finite ordered sequence of declarations, all with distinct subjects. The empty context is denoted by < ). If T = (x^A j, ...,xn:An>, then

r,x:B = .

Usually we do not write the < ). (iv) The rules of type assignment will axiomatize the notion

r H- A: B stating that A : B can be derived from the context T. Pronounce F b- A : B as ' T yields A in B ’. The rules are given in two groups: (1) the general rules, valid for all systems of the À-cube ; and (2) the specific rules, differentiating between the eight systems. Two of the constants in C are selected and given the names * and □ . These two constants are called sorts. Write S = {*, □} and let s, s1? s2 range over S.

(1) General axiom and rules.

Axiom

Start rule Tl—A :s F x At—x'A ’ w^ere x 's f-fresh (x does not occur in T).

Weakening rule

r I— A:B r h C : s , • r e , ------where x is T-Iresh. r,x:CI—A:B ’ Application rule r 1— F : (Fix : A . B) T h -a :A rH (F a ):B [x := a] ' Conversion rule n —A:B Ti—B : s B=ßB/ Tl—A :B '

(2) The specific rules are all introduction rules, and are parametrized by two sorts. Let s15 s, e S. Consider the following pair of rules

(Sj, s2) rules

n-rule D-A^ r,x:Ah-B:s, r I— (Fix : A . B) : s2

À.-rule Th-AiSj r,x:A hb:B r,x:Al—B:s, r h- (Xx : A . b) : (Fix : A . B)

(v) The eight systems of the X-cube are defined by taking the general rules plus a specific subset of the set of rule pairs {(*,*), (*, □), (□,*), (□ , □)} 130 Henk Barendregt

(*, *) 12 (*> *) (0 ,* ) A.ÇÛ (*, *) A.C0 (*» *) (□,*) (□ ,□ ) XP (*, *) (*,□) XP2 (*» *) (□, =1=) (*,□) APco (*> *) (0,0) (*,□) ÀPco = À.C (*, *) (□,*) (*,□)

The À-cube will usually be drawn in the following standard orientation (see fig. 2). The inclusion relations are left implicit.

ÂPcq = XC

XPco

Fig. 2

Notation (i) Derivability for a system ^ is denoted by Tl—X.A:B. If there is no danger of confusion, or if a statement holds for all systems, then we simply write Tt— A:B. (ii) (A^*B) = (Iïx:A.B) with x<£FV(B). This follows the intuition given before. (iii) r t- A : B : C means T H A : B and T I— B : C. The rule pairs have the following meaning, as will become clear after studying the examples in section 2.7

(*,*) allows forming terms depending on terms; ( □ , *) allows forming terms depending on types; (*, □ ) allows forming terms depending on terms; (□, □ ) allows forming terms depending on types.

2.2 Definition Consider derivability in one of the systems of the A.-cube. (i) Let T I— A : B. Then A and B are called (legal) terms and T is called a (legal) context. (ii) Let Tl— A :B :*. Then A is called an object and B a type. (iii) Let T I- A : B : □ . Then A is called a constructor and B a kind. It can be shown that a term is an object, a type, a constructor, a kind or a sort. The only overlap is that all types B are also constructors (indeed B :*:□ ). We state some properties about the systems in the À-cube. Introduction to generalized type systems 131

2.3 Church-Rosser Theorem for ST Let A, B, Then

(i) [A-»B& A-»B'] => 3Ce^'[B-»C&B'-»C]. (ii) A = pB = > 3 C e Jr [A -» C & B -» C ].

Proof Proofs of the Church-Rosser theorem for A generalize to -T (see Barendregt and Dekkers, 1990). ■

The following generalizes a result due to Curry et al. (1958); see de Vrijer (1975) and van Daalen (1980) for the result in type systems.

2.4 Theorem (subject reduction for the X-cube) For any system in the X-cube one has

T 1— A :B & A -»p A' => F I— A' : B.

Proof See Barendregt (1991) or Geuvers and Nederhof (1991). ■

The following result is due to Coquand. A nice modular proof using the edges of the X-cube is due to Geuvers and Nederhof (1991).

2.5 Theorem (strong normalization for the X-cube) For any system in the X-cube one has

T I— A : B => A and B are strongly normalizing, that is all ß-reductions starting with A or B terminate.

Proof See Barendregt (1991) or Geuvers and Nederhof (1991). ■

The following result is folklore.

2.6 Theorem (unicity of types) For any system in the X-cube one has

rJ-A:B&rh-A:B'=>B =p B'.

Proof See Barendregt (1991) or Geuvers and Nederhof (1991). ■

Some derivable type assignments in the X-cube

We end this subsection by giving for each of the systems in the X-cube some examples of type assignment. The reader is invited to carefully study these examples in order to gain some intuition in the systems of the X-cube. Some of the examples are followed by a comment {in brackets}. In order to understand the intended meaning for the systems on the right plane in the X-cube (that is, the rule pair (*, □ ) is present), some 132 Henk Barendregt of the elements of * have to be considered as sets and some as propositions. The examples show that the systems in the X-cube are related to logical systems and form a preview of the propositions-as-type interpretation described in section 4. Names of variables are chosen freely, in order to follow the intended interpretation.

2.7 Examples (i) In X the following can be derived

A : * I— (A A) :* ; A : * (Xa : A . a) : (A -> A) ; A:*,B:*,b:Bb-(Xa:A.b):(A^B); A : *, b : A I— ((Xa : A . a) b) : A ; A : *, B : c : A, b : B h- ((Xa : A . b) c) : B ; A : B : * b- (Xa : AXb : B . a) : (A -> (B ^ A)) : *.

(ii) In X2 the following can be derived

a : * I— (Xa : cc. a) : (ce -> a) ; I— (Xa : *Xa : a . a) : (Fla : *. (a a)) : * ; A : * 1- (Xa : *Xa : a . a) A : (A A) ; A : *, b : A I- (ko. : *Xa : a . a) Ab : A ;

of course the following reduction holds

(Xa : *Xa : a . a) Ab -*■ (Xa : A . a) b ^ b .

The following two examples show a connection with second order proposition logic

b- (Xß : *Xa : (IIoc : *. a ). a((IIa : *. a) -> ß) a) : (Ilß : *. ( l i a : *. a) -* ß).

{For this last example one has to think twice to see that it is correct; a simpler term of the same type in the following ; write 1 = (Fla : *. a), which is the second order definition of falsum.} / H(Xß:*Xa:±.aß):(IIß:*.±-*ß).

{The type considered as proposition says : ‘ ex falso sequitur quodlibet ’ ; the term in this type is its proof.}

(iii) In Xco the following can be derived b- (Xa : *. a -> a) :(*->*): □ {(Xa:* .a^a.) is a constructor mapping types into types};

ß : * I— (Xa. : *. a -> a) ß : * ; ß : x : ß I— (Xy : ß . x) : (Xa : *. a a) ß {note that (Xy \ ß . x) has type ß -*■ ß in the given context}

a : *, f : * -> * I— f(fa) : * ; a : * b- (Xf : * *. f(foc)) :(*->*)-*•*

{in this way higher order constructors are formed}. Introduction to generalized type systems 133

(iv) In XP the following can be derived

A : * (A -> *) : Q

{if A is a type considered as set, then A -> * is the kind of predicates on A}

A : *, P : (A *), a : A t— Pa : *

{if A is a set, a e A and P is a predicate on A, then Pa is a type considered as proposition (true if inhabited ; false otherwise)}

A : *, P : (A -> A *) I— (ITa : A . Paa) : *

{if P is a binary predicate on the set A, then Vae A Paa is a proposition}

A : *, P : (A -> *), Q : (A -* *) I— (lia : A . (Pa -> Qa)) : *

{this proposition states that the predicate P considered as a set is included in the predicate Q) A ;., P :(A ^ .) H (na: A .(Pa^Pa)):.

{this proposition states the reflexivity of inclusion}

A : *, P : (A -»■ *) I— (Xa : AXx : P a . x) : (lia : A . (Pa -> Pa)) : *

{the subject in this assignment provides the ‘proof’ of reflexivity of inclusion}

A:*,P:(A^*), Q:* H((na:A.Pa-*Q)^(na:A.Pa)-Q):* A : *, P : (A -> *), Q : *, a0 : A 1- (Xx : (ITa : A . Pa ->■ Q) X y:(ria: A . P a ). xa0(ya0)) : (IIx : (Lia : A . Pa Q) (Ily : (Fla : A . P a ). Q ) = (IIa:A.Pa^Q)^ (LIa:A.Pa)^Q

{this proposition states that the proposition (Va6A .Pa->Q)->(V a e A .P a )is true in non-empty structures. A; notice that the layout explains the functioning of the /.-rule; in this type assignment the subject is the ‘proof’ of the previous true proposition; note that in the context the assumption a0:A is needed in this proof.}

(v) In Xco the following can be derived. Let a& ß = n y :* .(a ^ ß-*y)-*-Y, then

ct: P : * I— a& ß: *

{this is the ‘second order definition of &’ and is definable already in X2}. Let AN D = Xa : *Xß : *. a & ß and K = Xa : *Xß : *Xx : aXy : ß . x, then

I— AND :(*->•*-**), I— K : (lia : *Ilß : *. a ß ^ a).

{Note that cc&ß and K can be derived already in X2, but the term AND cannot}

a : *, ß : * t— (Xx : AN D a ß . xa(K aß)) : (AND aß -> a) : *

{the subject is a proof that AND aß ^ a is a tautology}. 134 Henk Barendregt

(vi) In XP2 {corresponding to second order predicate logic} the following can be derived . ^ . A: *,P :(A ^ *) h- (Xa: A .Pa^- _L): A-> * A: *,P:(A~> A ^ *) h- [(ITa : AITb : A . Pab ^ Pba_L) -^(ITa: A .Paa-^ _L)] : *

{the proposition states that a binary relation that is asymmetric is irreflexive}.

(vii) In XPra the following can be derived

A : * \— (XP : (A -> A -> *) Xa : A . Paa) : ((A -> A -> *) (A *)) : □

{this constructor assigns to a binary predicate P on A its ‘ diagonalization ’}

l-(XA:*XP:(A^A^*)Xa:A.Paa):(ITA:*nP:(A-^A^*)na:A.*):n

{the same is done uniformly in A}.

(viii) In XPcu = XC the following can be derived

h- (XA : *XP: (A -> *) X a:A . Pa _L) : (ITA : *. (A -> *) ->• (A -> *)) : [J

{this constructor assigns to a type A and to a predicate P on A the negation of P}. Let ALL = (XA : *XP : A — *. ITa : A . Pa) ; then

A : P : (A ->• *) 1- ALL A P : * and (ALL A P) = „(na:A .P a)

{universal quantification done uniformly}.

Exercises 1. Define -i = Xa : *. a -> 1. Construct a term M such that in Xco

a : *, ß : * H M : ((a -> ß) -> (-> ß -> -■ a)).

2. Find an expression M such that in XP2

A: *, P :( A ^ A ^ *) h- M : [(Ila : AITb : A . Pab ^ P b a 1)^ ( lia : A .P a a ^ !)]:* .

3. Find a term M such that in XC

A : P : (A ^ *), a : A I— M : (ALL A P ^ Pa).

3 Generalized type systems

The method of generating the systems in the X-cube has been generalized independently by Berardi (1988) and Terlouw (1988). This resulted in the notion of a generalized (GTS). Many systems of typed lambda calculus à la Church can be seen as GTSs. Subtle differences between systems can be described neatly using the notation of GTSs. One of the successes of the GTS notion is concerned with logic. In section 4 a cube of eight logical systems is introduced. The systems on this ‘logic cube’ are in a one-to-one correspondence with the systems on the X-cube. There is a canonical translation A [A] for sentences A such that for a logic Ls corresponding to a system X, on the X-cube one has Introduction to generalized type systems 135 for some M canonically depending on the proof of A in Lt; here T is some natural context corresponding to the signature of the language in which the logic L4 is formulated. This result is the so called ‘propositions-as-types’ interpretation. As was observed by Berardi (1988), the eight logical systems can each be described as a GTSs in such a way that the propositions-as-types interpretation obtains a canonical simple form. Another reason for introducing GTSs is that several propositions about the systems in the X-cube are needed. The general setting of the GTSs makes it nicer to give the required proofs. The generalized type systems are based on the same set of pseudoterms 2T for the X-cube. We repeat the abstract syntax for 3T

2T = x |c| y .T |Xx : ST2T | fix : 3T2/

Let C be the set of constants in .T.

3.1 Definition A specification of a GTS consists of a triple S = (S, A, R) where

1. S is a subset of C, called the sorts. 2. A is a set of axioms of the form c:s, with ceC and se S. 3. R is a set of rules of the form (s1; s2,s3), with Sj, s2, s3eS.

3.2 Definition The GTS XS determined by the specification (S, A, R), notation XS = X(S, A, R), is defined as follows. Statements and pseudo-contexts are defined as for the X-cube. The notion of type derivation T I—xs A : B (we often just write T I— A : B) is defined by the following axiom and rules

Axiom < > I— c:s, if(c:s)eA. Start rule r t —A :s where x is fresh. F ,x : A h x : A ’ Weakening rule r I— B:C Th-A: s , where x is fresh. r ,x :A H B :C Application rule ri—F:(rix:A.B):s T t- a: A r i —(Fa):(B [x:= a]) Conversion rule r t— A: B rt-B ':s B ^B ' r i —A :B ' ri-rule Fh A:Sj r,x:A!-B:s, , where (sj,s2, s3)eR. T f— (IIx : A . B) : s3 136 Henk Barendregt

A,-rule

D -A .-S j T, x : A I— B : s2 T, x : A I— b : B , where (s1,s,,s3)eR for some s3. T I— (Xx : A . b) : (ITx : A . B)

In the above we use the following conventions

s ranges over S the set of sorts; x ranges over variables ;

‘x is fresh’ means that x does not occur in T, A, B or C. The proviso B = p B' in the conversion rule is not decidable. However, it can be replaced by the decidable condition

B' -^ßß or B ^ p B ' without changing the set of derivable statements.

3.3 Definition (i) The rule (s^s,) is an abbreviation for (s1(s,, s,). In the A.-cube only systems with rules of this simpler form are used. (ii) The GTS X(S, A ,R ) is called fu ll if

R = {(s1,s2)|s1,s,eS}.

(iii) If T I— A : B : s, then we say that A is an element of type B ; if F I— B : s, then B is a type of sort s.

3.4 Examples (i) ÀP2 is the GTS determined by

S = {*,□} A = {*,□} R = {(*,*),(□,*),(*,□)}• Specifications like this will be given more stylistically as follows: ÂP2 = X.(S, A ,R) with XV2

S *, □

A * : □

R (*,*),(□,*),(*,□)

(ii) XC is the full GTS X(S, A, R) with XC s *, □

A *, □

R (*> *), (d, *), (*, □), (□, □) Introduction to generalized type systems 137

(iii) A variant XC' of XC is the full GTS X(S, A, R) with

XC' s *p, □

A : □, *p □

R S2, that is all pairs

(iv) X-* is the GTS determined by

X—> S *, □

A * : □

R (*, *)

(v) A variant of X,-*, called XT in Barendregt (1984—Appendix A) is the GTS determined by X s *

A 0 : *

R (*, *)

The difference with X-> is that in XT no type variables are possible. One only has constant types like 0 ,0 ^ 0 ,0 ^ 0 ^ 0 ,... and variables for elements in these types.

(vi) The system X* in which * is the sort of all types, including itself, is specified by

X* s *

A * ; *

R (*, *)

The system X* is ‘inconsistent’, in the sense that all types are inhabited. This result is known as Girard’s paradox (see for example, Barendregt, 1991). One may think that the inconsistency is caused by the circularity in *:*; however Girard (1972) also showed that the following system is inconsistent in the same sense XU S , A A □ : A

R (*, *), (□, *), (□, □), ( A, □), (A, *)

Also, Coquand (1989) showed that XU minus the rule (A,*) is inconsistent. 138 Henk Barendregt

So far none of the rules was of the form (sx, s3, s3). In section 4 we encounter such rules (in order to represent first order but not higher order functions). Without proof we mention that the subject reduction theorem holds for all GTSs. The unicity of types theorem does not hold for trivial reasons: there may be two axioms c:sx and c:s2. The following examples show the flexibility of the notion of GTS.

3.5 Examples (van Benthem Jutting) Leaving out the definition mechanism, several members of the a u t o m a t h family can be exactly described as GTSs. For a description of the systems, see van Daalen, 1980).

(i) The AUT-68 system is described by the following GTS

XAUT-68

The point is that one may form predicates over a set, but not abstract over them

A :* l-XAUT. A *) ? aa ; * ! A : * H ^ ^ X F : ((A - A) - A ). F(Xx : A . x)) : (((A -> A) -> A) -> A).

Note the correspondence between XAUT-68 and X-*.

(ii) The AUT-QE system is exactly described by the following GTS

XAUT-QE S *, □ , A

A *, □

R (*, *), (*, □), (□, *, A), (□, □, A), (*, A, A), (□, A, A)

A : *, a : A >-xaut-qe(^p : (A — *). Pa) : ((A -> *)->*) ; Note the correspondence between XAUT-QE and XP. (iii) The PAL system, a subsystem of AUT-68, is exactly described as follows Introduction to generalized type systems 139

À.PAL

In this system À-abstraction is possible only in a restricted way at the ‘outside’. However, one may form arbitrary applications

A :* !“ âpal(A-^ A): A; A :*,a:A ,F:(A ^A )t-,PALFa:A; A : *. G : (A — A ^ A), a : A, b : A f-^PAL Gab : A ; A :*,G :(A ^A ^A ) l-XPALÀb: AÀa: A.G ab:(A ^ A ^ A); A :*b\PALÀG:(A->A->A)Àb:AÀa:A.Gab:(A-*A^A)^(A^A^A).

4 Propositions-as-types In this section eight systems of intuitionistic logic are introduced—four systems of proposition logic and four systems of many-sorted predicate logic. The systems are the following PROP proposition logic; PROP2 second order proposition logic; PROPrn weakly higher order proposition logic; PROPco higher order proposition logic; PRED predicate logic; PRED2 second order predicate logic; PREDco weakly higher order predicate logic; PRED® higher order predicate logic. All these systems are minimal logics in the sense that the only operators are and V. However, for the second and higher order systems the operations &, V and 3, as well as Leibniz’s equality, are all definable. Also in these systems one may put in the context a:(ITa:*.-'-'a^ac) in order to obtain classical logics. Weakly higher order logics have variables for higher order propositions or predicates, but no quantification over them ; a higher order proposition has lower order propositions as arguments. The systems form a cube as shown in fig. 3. This cube is referred to as the L-cube. The orientation of the L-cube as drawn is called the standard orientation. Each system L* on the L-cube corresponds to the system on the À-cube on the corresponding vertex (both cubes in standard orientation). The edges of the L-cube represent inclusions of systems in the same way as on the À-cube. A formula A in the logic L, on the L-cube can be interpreted as a type [A] in the 140 Henk Barendregt

PROPco PREDco / PROP2 PRED2

PROPœ PREDco PROP ------PRED Fig. 3 corresponding X4 on the X-cube. The transition Ai—► [A] is called the propositions-as- types interpretation of de Bruijn (1970) and Howard (1980), first formulated for extensions of PRED and XP. The method has been extended by M artin-Löf (1984), who added to XP types Sx : A . B corresponding to (strong) constructive existence and a constructor = a:A — A-^* corresponding to equality on a type A. Since Martin- Löf’s principle objective is to give a constructive foundation of mathematics, he does not consider the impredicative rules (□,*). This interpretation satisfies the following soundness result: if A is provable in PRED, then [AJ is inhabited in XP. In fact, an inhabitant of |A] in XP can be found canonically from a proof of A in PRED; different proofs of A are interpreted as different terms of type [AJ. The propositions-as-types interpretation has been extended to several other systems (for example, see M artin-Löf 1984 and Stenlund 1972). In Geuvers (1988) it is verified that for all systems Li on the L-cube soundness holds with respect to the corresponding system Xj on the X-cube : if A is probable in L4 then [AJ is inhabited in Xj. Barendsen (1989) verifies that a proof D of such A can be canonically translated to [D] being an inhabitant of [AJ. After seeing Geuvers (1988), it was realised by Berardi (1988; 1990) that the systems in the L-cube can be considered as GTSs. Doing this the propositions-as- types interpretation obtains a simple canonical form. We first give a description of PRED in its usual form, and then in its form as a GTS. The soundness result for the propositions-as-type interpretation raises the question whether one also has completeness in the sense that if given a formula A of a logic Lt is such that [A] is inhabited in Xt then A is probable in L4. For the proposition logics this is trivially true, for PRED completeness with respect to XP is proved by M artin-Löf (1970), Barendsen and Geuvers (1989) and Berardi (1990) (see also Swaen 1989). For PREDco completeness with respect to XC fails, as is shown by Geuvers (1989) and Berardi (1990).

Many sorted predicate logic 4.1 Definition The notion of a many sorted structure is defined by an example. The following sequence is a typical many sorted structure

sJ = Introduction to generalized type systems 141 with A, B are non-empty sets, the sorts of sé (we use the standard terminology ; in the context of GTSs it would be better to call A and B 1 types ’) ; f : (A -> (A A)) and g:A ^B are functions; P ç A and Q £ A x B are relations; and ce A is a constant.

4.2 Definition Given the many sorted structure sé of Section 4.1, the language Lv of minimal many sorted predicate logic over sé is defined as follows (i) has the following special symbols

A, IB sort symbols; P, O relation symbols ; f,g function symbols; c constant symbol.

(ii) The set of variables of is

V = {xA I x variable} U {xB | x variable}.

(iii) The set of terms of sort A and of sort B, notation TermA and TermB respectively, are defined inductively as follows

xAeTermA, xBeTermB; ceT erm A; se Term A and teT erm A => f(s, t)eT erm A; s e TermA => §(s) e TermB.

(iv) The set of formulas of L^, notation Form, is defined inductively as follows

seTermA, teTerm B => P(s), Q(s, t)eForm ; cp e Form, y e Form => (cp -> \|/) e Form ;

(VxA. cp) e Form and (VxB. cp) e Form.

4.3 Definition Let sé be a many sorted structure. The minimal many sorted predicate logic over sé, notation PRED = PRED rf, is defined as follows. If A is a set of formulas, then A I— cp denotes that cp is derivable from assumptions A. This notion is defined inductively as follows (C ranges over A and B, and the corresponding C over A , IB)

cpe r => r I— cp rH c p ^ -y , FI— cp =î> F I— \|/ r,cpH vy=> ri— cp^vy Tl— Vxc .cp,teTerm c = > ri— cp[x:= t] r I- cp, xc £ FV(r) => r I- vxc. cp,

where [x:= t] denotes substitution of t for x, and FV is the set of free variables in a term, formula or collection of formulas. For 0 I— cp one writes simply I— cp and one says that cp is a theorem. 142 Henk Barendregt

These rules can be remembered best in the form of the following natural deduction form ______[

tp—»I)/

(D VxC(p , t e TERMC ; . x fre s h . (p [X := t] Vxc cp

Some examples of terms, formulas and theorems are the following. The expressions xA, c,fl(xA,c) and f(c, c) are all in TermA; g(xA) is in TermB. Moreover

VxAP(fl(xA,x A)), (1)

VxA[P (xA) ^ P ( f ( x A,c)], (2)

VxA[P(xA) -> P (f(xA, c)] VxAP(xA) P(f(c, c) (3) are formulas. The formula (3) is even a theorem. A derivation of (3) is as follows

[VxA[lP(xffl) -> P(f(xA, c))]]2 [VxAP(xA)] 1 P(c)-»P(f(c, c)) P(c) ______P(ff(c, c)______VxAP(xA) -» P (f(c, c)) ______VxA[P(xA) -> P(f (xA, c))] VxAP(xa) P(f (c, c)) the numbers 1, 2 indicating when a cancellation of an assumption is being made. A simpler derivation of the same formula is

[VxAP(xA)] 1 P (f(c, c) [VxA(P(xA)->P(f(xA,c)]2 VxAP(xA) P(f(c, c)) ^ VxA(P(xA) - P(f(xA, €)) VxA(P(xA) -> P(f(c, €)) 2

Now we explain, first somewhat informally, the propositions-as-types interpretation form PRED into XP. First one needs a context corresponding to the structure s$l. This is r rf defined as follows (later T d is defined as little differently)

Tjy = A: *, B : *, P:A^*,Q:A^B^*, f : A A -s- A, g : A ^ B, c: A. Introduction to generalized type systems 143

For this context one has r,hc:A (O') r rfH(fcc):A 1— [Fix : A . P(fxx)] : * (1') r^K[nx:A.(Px^P(fxc))]:* (2') Ty h- [[Tlx : A . (Px -» P(fxc))] - [(Fix : A . Px) P(fcc)]] : *. (3')

We see how the formulas (1) to (3) are translated as types. The inhabitants of * have a somewhat ‘ambivalent’ behaviour, they serve both as sets (for example, A:*), and as propositions (for example, Px: * for x: A). The fact that formulas are translated as types is called the propositions-as-types (or also formulas-as-types) interpretation. The provability of formula (3) corresponds to the fact that the type in (3') is inhabited. In fact r^ f-X p : [Fix : A . (Px P(fxc))] Xq : (ITx : A . Px). pc(qc) : lip : [Fix : A . (Px — P(fxc))] ITq : (IIx : A . Px). P(fcc).

A somewhat simpler inhabitant of the type in (3'), corresponding to the second proof of the formula (3), is

XP : [Fix : A . (Px P(fxc))] Xq : (Fix : A . Px). q(fcc).

In fact, one has the following result, which at the moment we state informally (and which in fact, is not completely correct; therefore, no number is given to the item).

Theorem (soundness of the propositions-as-types interpretation) Let sd be a many sorted structure and let cp be a formula of L^. Suppose

l-pRED

Now we show that PRED can be viewed as a GTS, and then it follows that the map cp [cp] can be factorized as a composition of an isomorphism PRED -> XPRED and a canonical forgetful homomorphism XPRED ^X P/

4.4 Definition (Berardi 1988) PRED considered as a GTS, notation XPRED, is determined by the following specification XPRED s *s, *p, *f, Ds, Dp A *s : Ds, *p : mp

R (*P; *P), (*s, *P), (*s, d p), *S5 (*S, *f) 144 Henk Barendregt

Some explanations are necessary here. The sort *s is for sets (the ‘sorts’ of the many sorted logic). The sort *p is for propositions (the formulas of the logic will become elements of *p). The sort *r is for first order functions between the sets in *s. The sort □ s contains *s, and the sort [I]p contains *p. (There is no otherwise it would be allowed to have free variables for function spaces.) The rule (*p, *p) allows the formation of implication of two formulas

cp : *p, i|/ : *p I— (cp -*■ y) = (TJx : cp. <|/) : *p.

The rule (*s,*p) allows quantification over sets:

A : *s, cp : *p (— ‘ (VxA. cp) ’ = (IIx : A . cp) : *p.

The rule (*s, D p) allows the formation of first order predicates:

A:*sl—(A ^ * p) = (Fix: A. *p): D p; hence A : *s, x : A, P : (A -> *p) t— Px : *p, that is, P is a predicate over the set A. The rule (*s, *s, *f) allows the formation of a function space between the basic sets in *s A : *s, B : *s I— (A -> B) : *r ;

the rule (*s, *f, *') allows the formation of curried functions of several arguments in the basic sets A : *s H (A -> (A -> A)) : *f

This makes is possible to have, for example, g:A->B and f : (A->■ (AA)) in a context. Now it is shown that A.PRED is able to simulate the logic PRED. Terms, formulas and derivations of PRED are translated into terms of À.PRED. Terms become elements, formulas become types and a derivation of a formula cp becomes an element of the type corresponding to cp.

4.5 Definition Let s i be as in Section 4.1. the canonical context corresponding to si, notation r y, is defined by = A:*S,B:*S, P:B->*p,Q :A ^B ^*p, f:A-+(A-*B),g:A^B, c.B. Given a term t e r v, the canonical translation of t, notation [tj, and the canonical context for t, notation Tt, are inductively defined as follows

t It] r t x^ X X : C

s c ( ) f (s, s') f Is] [s'] r s u r s-

g (s) g Is] r s Introduction to generalized type systems 145

Given a formula cp in Lv, the canonical translation of

Cpi —> CP2 I > nx:C . ]\|/j Fy- {x:C}

4.6 Lemma (i) teT E R M A => r^ , Tt H->PRED |tj : A; similarly for B. (ii)

r rJ, b->PRED ([cp! : *p.

Proof By an easy induction. ■ In order to define the canonical translation of derivations, it is useful to introduce some notation. The following definition is a reformulation of definition 4.3, now giving formal notations for derivations. 4.7 Definition In PRED the notation ‘D is a derivation showing AI— tp’, notation D:Ab-cp, is defined as follows P,:AI-cp; D jiA l— i|/, D ,: A I— cp => (Dj D 2):A I— y; D : A, cp I— y => (Icp). D : A I- cp -> \\i ; D : A I— Vxc . cp, t e TERM C => (Dt) : AI— cp[x : = t] ; D : A I— cp, xc FV(A) => (GxcA) : D h- Vxc . cp. Here C is A or IB, P stands for ‘projection’, Icp stands for introduction and has a binding effect on cp, and Gxc stands for ‘generalization’ (over C) and has a binding effect on xc.

4.8 Definition (i) Let A = {cpj, ...,cpn} £ FORM. Then the canonical translation of A, notation r 4, is the context defined by r i = r 9 iU ... u r , n.x ,i :[cp1l,...,x (Pn:[cpnl. (ii) For D:AHcp in PRED the canonical translation of D, notation [D], and the canonical context for D, notation TD, are inductively defined as follows

D ID] r D P

Dj Dj ]Di] :d 2. I 'd , ^ r D2

Icp • D t kxcp:*

Dt ]D] it] I'd u r t Gxc . D Xx:C.]D] r D-{x:C } 146 Henk Barendregt

4.9 Lemma D : A 1 pRED *P ^ Fj,!, r 4 UFf U cpD I- iPRED [D] : [(pj.

Proof By induction on the derivation in PRED. ■ The following lemma is a kind of converse lemma 4.9.

4.10 Lemma (K. Fujita 1989) Suppose T I—, (>RED A : B : *p. Then there is a many sorted structure -sé, a set of formulas A £ L^, a formula cp e and a derivation D such that

r = r^, r 4ur,u r D, A = [D], B EE [cp] D:AI—PREDcp. I

The following result gives the soundness of the interpretation [ 1. Note, however, that, for example, a sentence cp, that is, FV(cp) = 0 , one has in general

PRED 9 ^ I- XPRED A : [Cp]. The reason is that logic is such that it assumes that the intended domains are non­ empty. For example (VxA. (Px -> Q)) ((VxA. Px) -> Q) is provable in PRED, but only valid in structures with A + 0 .

4.11 Definition The extended context rt/ is defined by = F v, a : A, b : B.

So, explicitly states that the domains in question are not empty. Now one does have completeness.

4.12 Corollary (i) Let cp be a formula and A be a set of formulas of L^. Then

d : a h~pred cp -<=> r* . r Au r^ u r D h ^pred P-)] • [

(ii) Let A U {cp} be a set of sentences of La. Then

AI pRED cp <=> r ^ , Ta I xpRED M ■ II^Pl some M. (iii) Let cp be a sentence of L^. Then

PRED^ F ^ \ 'xpRED M • H^pl•

Proof (i) By definition 4.9 and 4.10, and the fact that [] is injective on derivation and formulas. (ii) If the members of A and cp are without free variables, then

D : A I prEd

A statement in r D is of the form x:C. Since T^l— a: A ,b :B one has

AI prEd 9 ^ D : A t~PRED cp 3D r s/, r Au r D i xPrED P i : i 3M r ^ , F a I— XPRED M : [cp].

(For the last => take M = [D ][x,y:= a,b]; for <= use lemma 4.10).

(iii) By (ii), taking A = 0 . ■

The system XPRED is also flexible enough to cover so-called free logic with empty domains as developed by Peremans (1949) and Mostowski (1951); simply work in context instead of Now that it has been established that PRED and XPRED are isomorphic, the propositions-as-types interpretation from PRED to XP can be factorized in two simple steps : from PRED to XPRED via the isomorphism and from XPRED to XP via a canonical forgetful map.

4.13 Definition (propositions-as-types interpretation) (i) Define the forgetful map 11 : term (XPRED) -» term (XP) be deleting all superscripts in * and □ *s I—► * *p h-> * □ S^ D □ pi-* for example, |Xx:*‘\x | = Xx:*.x. Write |T| = {xx:|Ax|, ...} for T = {Xji A ls...}. (ii) Let s / be a signature and let t, cp, A and D be, respectively, a term, a formula, a set of formulas and a derivation in PRED formulated in L^. Write

[t] = I [tj I ; [

4.14 Corollary (Soundedness for the propositions-as-tvpes interpretation) (i) T I—xPRED A: B => [r| H-XP|A| : |B|. (ii) For sentences A and cp in LA one has

D : A 1 prEd

[A] f-^p M : [cp], for some M. Proof (i) By a trivial induction on derivations in XPRED. (ii) By corollary 4.12 (ii) and (i). ■

As was remarked before, the converse, completeness for the propositions-as-types interpretation holds for PRED and XP, but not for PREDco and XC. 148 Henk Barendregt

4.15 Theorem (Berardi 1989; Geuvers, 1989) Consider the similarity type of the structure sé = , i.e. there is one set without any relations. Then there is in the signature of sé a sentence cp of PREDco such that

^PREDioV but for some M one has H xcM:[cp], Proof sketch (Bernardi) Define EXT s n p : *np' : *. [(p <-* p') -> n Q : * -> *. (Qp -*■ Qp')] cp s EXT 1A does not have exactly two elements ’

Obviously, (/-PREDu

E X T if A is non-empty, then A is a type-free A-model’.

The reason is that if a: A, then

I— (Xx : (A -> A ). a) : ((A -> A) A) and always (- (Xy : AXz : A . z) : (A (A A)), therefore, ‘ A <-► (A -> A) ’ and since ‘ A = A ’ (that is, there is a bijection from A to A), it follows by EXT that ‘A s (A-+A)’, that is, ‘A is a type-free X-model’.

By the claim A cannot have two elements, since only the trivial X-model is finite. ■ The counterexample of Geuvers is technically simpler, but intuitively somewhat more complicated; it is also related to the statement EXT. The definition of the other systems in the /.-cube is now given. After having seen the equivalent between PRED and ÂPRED, each system is described directly as a GTS and not as a more traditional logical system.

4.16 Definition (i) Systems A.PROP, A.PROP2, XPROPra and XPROPco are the GTSs specified as follows XPROP s *P, DP

A *p : qp

R (*p, *P)

XPROP2 = /UPROP + (np, *p) S *p, Dp A *p : Dp

R (*P; *P)> (q P, *P) Introduction to generalized type systems 149

XPROPço = XPROP + (□p, mp) S *p, Dp

A *p, Dp R (*p, *p), (Dp, Dp)

XPROPco = XPROP + (Dp, *p) + (n p, Dp) S *p, Dp

A *p, Dp R (*p, *p), (Dp. *p), (Dp, Dp)

(ii) Systems XPRED, XPRED2, XPRED® and XPREDco are the GTSs specified as follows XPRED

s *p, *s, *f, Dp, Ds

A *p, Dp, *s, n s

R (*p, *p), (*s, *p), (*s, Dp)

(*s, *s, *f), (*s, *f)

XPRED2 = XPRED + (mp, *p) S *p, *s, *f, Dp, Ds

A *p, Dp, *S,D S

R (*p, *P), (*s, *P), (*s, nP)

(*s; *s) *f); (*s5 **)

(□p, *p)

XPREDco = XPRED + (Dp, QP) S *p, *s, *f, np, d s

A *p, Dp, *s, Ds R (*p, *P) (*s, *P), (*s, n p)

(*s( *s; *f)5 (*s,*f, *f)

(□p, Dp) 150 Henk Barendregt

XPREDco = XPRED + (d p, *p) + (Dp, Dp) S *p, *s, *f, mp, Ds

A *p, g p, *s, ms

R (*P, *P) (*s, *P), (*s, □?) (*s5 *s; (*s; *f)

(□p, *p), (Dp, Dp)

The eight systems form a cube as shown in fig. 4.

XPROPco XPREDco y / XPROP2 XPRED2

XPROPco/ — - XPREDco / XPROP------XPRED Fig. 4

Since the description of these GTSs is more uniform than the original description of the logical systems, this cube will be considered as the L-cube. In particular, fig. 4 displays the standard orientation of the L-cube, and each L, (ranging over XPROP, XPRED, etc.) corresponds to a unique system \ on the similar vertex in the X-cube (in standard orientation).

4.17 Theorem (soundness o f the propositions-as-types interpretation) Let L, be a system on the L-cube, and let X{ be the corresponding system on the X-cube. The forgetful map 11 that erases all superscripts in the *s and D s satisfies the following T I—L A : B : s : ■IHK |A|:|B|:|s|. (4)

Proof By a trivial induction on the derivation in L,. ■ Introduction to generalized type systems 151

As is well-known, logical deductions are subject to reduction (for example, see Prawitz 1965; or Stenlund 1972). For example, in PRED one has

\ D| ¥ (p—>\|/ m ------1------= (Xcp.DO D2 ¥

—>ß D^cp — D2] =

¥ and

¥ = (Gx . D)t Vx . i)/

¥ [ x := t]

— Dj[x — t] =

If the deductions are represented in XPRED, then these reductions become ordinary ß-reductions [(Xcp. D t) D J = (Xx : [cp]. [D J) [D2] [D J [x : = [D J] = [DJx : = D J] ; [(Gxc . D) t] = (Xx : C . [D]) [t] [D] [x : = [t]] = [D[x : = t]] In fact, the best way to define the notion of reduction for a logical system on the L-cube is to consider that system as a GTS subject to ß-reductions.

Now it follows that reductions in all systems of the L-cube are strongly normalizing.

4.18 Corollary Deductions in a system on the L-cube are strongly normalizing. 152 Henk Barendregt

Proof The propositions-as-types map

11 : L-cube X-cube preserves reduction; moreover, the systems on the X-cube are strongly normal­ izing. ■

In Leivant (1989) interesting use has been made of the propositions-as-types interpretation concerning the representation of data types.

The following example again shows the flexibility of the notion of GTS.

4.19 Example (Geuvers 1990) The system of higher order logic in Church (1940) can be described by the following GTS XHOL S *, □, A

A *:□,□: A

R (*,*),(□,*),(□,□)

That is XHOL is Xco plus □ : A. The sound interpretation of XPREDco in XHOL is determined by the map given by *P (—► * *si-» □

□ 8i-+A. Geuvers (1990) proves that completeness holds for this interpretation.

Acknowledgements

The author wishes to thank Philips Research Laboratories at Eindhoven, Netherlands where Dr B. van Benthem Jutting explained to him several typed lambda calculi in

the a u t o m a t h family of languages of de Bruijn (1970). Also, thanks are due to Adriana Compagnoni, Maribel Fernandez and the paper’s referee for pointing out some misprints, and especially to Erik Barendsen for tidying up the layout of the manuscript. This paper is partly sponsored by the EC stimulation project ‘ Lambda calcul typé ’. An earlier version appeared in the Proceedings of the Third Italian Conference on Theoretical Computer Science (Mantova, 1989), World Scientific, Singapore.

References

Barendregt, H. P. 1984. The Lambda Calculus; Its Syntax and Semantics (2nd Edn). North- Holland. Barendregt, H. P. 1991. Lambda calculi with types. In S. Abramsky, D. Gabbai and T. Maibaum (editors), Handbook of Logic in Computer Science. Oxford University Press. Introduction to generalized type systems 153

Barendregt. H. P. and van Leeuwen. M. 1985. Functional programming and the language TALE. In Lecture Notes in Computer Science, 224, pp. 122-208. Springer-Verlag. Barendregt, H. P. and Hemerik, K. 1990. Types in lambda calculi and programming languages. In Proc. European Symposium on Programming, pp. 1-35, Copenhagen, Denmark (May). Barendregt, H. P. and Dekkers, W. 1990. Typed lambda calculi. Barendsen, E. 1989. Representation of Logic, Data Types and Recursive Functions in Typed Lambda Calculi. Masters thesis, University of Nijmegen, Netherlands. Barendsen, E. and Geuvers, H. 1989. Conservativity of ÀP over PRED. Manuscript. University of Nijmegen, Netherlands. Berardi, S. 1988. Personal comm unication. Berardi, S. 1990. Type Dependence and Constructive Mathematics. PhD thesis, Mathematical Institute, Torino, Italy. de Bruijn, N. G. 1970. The mathematical language AUTOMATH, its usage and some of its extensions. In Lecture Notes in Mathematics, 125, pp. 29-61. Springer-Verlag, de Bruijn, N. G. 1980. A survey of the AUTOMATH project. In J. R. Hindley and J. P. Seldin (editors), To H. B. Curry: Essays on Combinatory logic. Lambda Calculus and Formalism, pp. 580-606. Academic Press. Cardelli, L. and Wegner, P. 1985. On understanding types, data abstraction and polymorphism. ACM Comp. Surveys, 17 (4): 471-522. Church, A. 1940. A formulation of the simple theory of types. J. Symbolic Logic, 5: 56-68. Coquand, Th. 1989. An introduction to . To appear in A. R. Meyer (editor), Proc. Ecole de Printemps du LITP, Albi. Coquand, Th. and Huet, G. 1988. The calculus of constructions. Information and Computation, 76: 95-120. C urry, H. B. and Feys, R. 1958. Combinatory logic. North Holland. van Daalen, D. 1980. The Language Theory of AUTOMATH. PhD. thesis, Technical University Eindhoven, Netherlands. van Dalen, D. 1983. Logic and Structure. (2nd edn). Springer-Verlag. Fujita, K. 1989. Relationship between logic and type system. Unpublished manuscript. Research Institute of Electrical Communication, Tohoku University, Japan. Geuvers, H. 1988. The Interpretation of Logics in Type Systems. Master thesis, University of Nijmegen, Netherlands. Geuvers, H. 1989. Theory of constructions is not conservative over higher order logic. Manuscript. University of Nijmegen, Netherlands. Geuvers, H. 1990. Type systems for higher order logic. Manuscript. University of Nijmegen, Netherlands. Geuvers, H. and Nederhof, M.-J. 1991. A modular proof of strong normalization for the theory of constructions. Journal of Functional Programming 1(2): 155-189. G irard, J.-Y. 1972. Interprétation Fonctionelle et Élimination des Coupures dans /’Arithmétique d'Ordre Supérieur. Thèse de Doctorat d’État, Université Paris VII, France. Gordon, M. H., Milner, R. and Wadsworth, C. 1979. Edinburgh LCF : Lecture Notes in Computer Science, 78. Springer-Verlag. Harper, R., Honsell F. and Plotkin, G. 1987. A framework for defining logics. In Proc. 2nd Symp. Logic in Computer Science, pp. 194—204. Ithaca. New York. Howard, W. A. 1980. The formulae-as-types notion of construction. In J. R. Hindley and J. P. Seldin (editors), To H. B. Curry: Essays on Combinatory logic, Lambda Calculus and Formalism, pp. 479^490. Academic Press. Leivant, D. 1989. Contracting proofs to programs. In: Odifreddi. P. (editor), Logic and Computer Science, pp. 279-327, Academic Press. Longo, G. and Moggi, E. 1988. Constructive Natural Deduction and its Modest Interpretation. Report CMU-CS-88-131, Carnegie Mellon University, Pittsburgh, USA. Martin-Löf, P. 1970. A construction of the provable wellorderings of the theory of species. Unpublished Manuscript. Mathematical Institute, University of Stockholm, Sweden. 154 Henk Barendregt

M artin-Löf, P. 1984. Intuitionistic Type Theory. Bibliopolis. Milner, R. 1984. A proposal for standard M L. In Proc. 1984 ACM Symposium on LISP and Functional Programming, pp. 184—197. Austin, Texas. Mostowski, A. 1951. On the rules of proof in the pure functional calculus of first order. J. Symbolic Logic, 16: 107-111. Peremans, W. 1949. Een opmerking over intuitionistische logica. Report ZW-16. Center for Mathematics and Computer Science, Kruislaan 413, 1098 SJ Amsterdam. Prawitz, D. 1965. Natural Deduction. Almqvist and Wiksell. Renardel de Lavalette, G. 1987. Strictness analysis for a language with polymorphic and recursive types (preprint). Department of Philosophy, Utrecht University, Netherlands. Reynolds, J. 1974. Towards a theory of type structure. In Proc. Colloque sur la Programmation. In Lecture Notes in Computer Science, 19, pp. 408^4-25. Springer-Verlag. Reynolds, J. 1985. Three approaches to type theory. In Lecture Notes in Computer Science, 185, pp. 145-146. Springer-Verlag. Stenlund, S. 1972. Com binators, X-terms and p ro o f theory. D. Reidel. Swaen, M. D. G. 1989. Weak and Strong Sum-elimination in Institutionistic Type Theory. PhD. thesis, University of Amsterdam, Netherlands. Terlouw, J. 1988. Personal communication. Turner, D. 1985. Miranda: A non-strict functional language with polymorphic types. In Jean- Pierre Jouannaud (editor). Functional Programming Languages and Computer Architecture. Lecture Notes in Computer Science, 201, pp. 1-16. Springer-Verlag. de Vrijer, R. 1975. Big trees in a Â-calculus with A-expressions as types. In Proc. Symposium on X-calculus and computer science theory, Lecture Notes in Computer Science, 37, pp. 252-271. Springer-Verlag.

Henk Barendregt, Faculty of Mathematics and Computer Science, Catholic University Nijmegen, Toernooiveld 1, 6525 ED Nijmegen, The Netherlands.

View publication stats