CS 641 Lecture -*- Outline -*- * Introduction to higher-order types reference: Barendregt & Hemerik: "Types in Lambda Calculi and Programming Languages", ESOP '90 (LNCS vol. 432). explicit vs. implicit systems (Church vs. Curry) ** Types as propositions type describes a set of terms M : s, means M in set described by s. M is subject, s is predicate terms with more than one type are polymorphic. ** Properties (2.1.5) *** Properties of terms and beta reduction only consider beta reduction (-->) conversion (=) smallest equivalence relation containing -->*. M is a nf iff for no N, M --> N. M is strongly normalizing, SN(M) iff for no infinite sequence M --> M1 --> ... **** Church-Rosser (CR) (i) if M -->* M1 and M -->* M2, then there is a M3 s.t. M1 -->* M3 and M2 -->* M3. (ii) if M1 = M2, then there is an M3, such that M1 -->* M3 and M2 -->* M3. **** Subject-Reduction (SR) if H |- M : s, and M -->* M', then H |- M' : s **** Strong Normalization (SN) if H |- M : s, then SN(M) a system with SN cannot define all computable functions *** Properties of the types **** Unicity of types (UT) if H |- M:s and H |- M:s', then s == s'. **** H |- M:s? is decideable **** H |- M:? is computable ** Simply typed lambda calculus *** Implicit version, \->-Curry (like ML) has all properties except UT e.g., \x.x has several types *** Explicit version, \->-Church what Gunter called the simply typed lambda calculus has all properties (including UT) *** Relationship let erase: \->-Church terms to \->-Curry terms (i) H |- M:s implies H |- erase(M):s (ii) H |- M:s implies there is some M' such that erase(M')==M and H |- M':s why not H |- erase(M):s implies H |- M:s?