* Introduction to higher-order types ** Types as propositions ** Properties (2.1.5) *** Properties of terms and beta reduction **** Church-Rosser (CR) **** Subject-Reduction (SR) **** Strong Normalization (SN) *** Properties of the types **** Unicity of types (UT) **** H |- M:s? is decideable **** H |- M:? is computable ** Simply typed lambda calculus *** Implicit version, \->-Curry (like ML) *** Explicit version, \->-Church *** Relationship * Implicit type systems ** \2-Curry (generalization of ML to allow non-shallow types) *** rules *** properties ** \\mu-Curry *** equivalence of types *** rules *** properties *** pragmatics ** \-intersection (conjunctive types) *** induced preorder, subtyping (3.3.2 on page 17) *** rules *** properties *** pragmatics * Explicit type systems ** \2-Church, SOL, Girard-Reynolds calculus, system F (i.e., F2) *** rules *** properties *** pragmatics **** representability ***** some total recursive functions not expressible ***** can express provably total functions in 2nd order peano arithmetic **** type defs **** abstract data types (as in CLU or ML abstypes) ***** booleans --------------------- let bool = all T . T -> T -> T True = poly T . \x:T . \y:T . x false = poly T . \x:T . \y:T . y if = poly T . \b:bool . \e1:T . \e2:T . b T e1 e2 --------------------- ***** products --------------------- let X = poly U . poly V . poly T . (U -> V -> T) -> T pair = poly U . poly V . poly T . \u:U . \v:V . \f:(U->V->T) . f u v fst = poly U . poly V . \p:(X U V) . p U (\f:U . \s:V . f) snd = poly U . poly V . \p:(X U V) . p U (\f:U . \s:V . s) --------------------- ***** sums --------------------- let + = poly U . poly V . poly T . (U -> T) -> (V -> T) -> T inl = poly U . poly V . \u:U . poly T . \l:U->T . \r:V->T . l u inr = poly U . poly V . \u:U . poly T . \l:U->T . \r:V->T . r u cases = poly U . poly V . \x:(+ U V) . x --------------------- ***** etc. ** \omega_ *** Kinds *** Syntax *** rules *** properties *** pragmatics ** \P *** syntax *** rules *** properties *** pragmatics ** Generalized type systems *** Syntax *** rules **** specification = (S,A,R) **** general rules