There are two main type systems for the simply typed Lambda Calculus: The system of Curry (1934) and the system of Church (1940).
The system of Curry is the basis of typed languages like ML, where variables do not require explicit type annotation. The type system of Church is the basis of languages like Pascal and C, where the type of every variable must be declared.
In this system, the syntax of Lambda terms is the same as in the untyped version.
The types are defined by the following grammar:
Type ::= TVar (type variable)
| (Type -> Type) (function)
Convention: In order to eliminate some parentheses, we assume -> to be right associative. So (A1 -> (A2 -> (A3 -> ... (An-1 -> An) ... ))) will be written simply as A1 -> A2 -> A3 -> ... An-1 -> An.
The system allows to derive statements of the following form:
G |- M : Ameaning: under the assumptions G (asociations between lambda variables and types), the lambda term M has type A.
The rules for the Type System are the following:
(var) --------------- if x : A is in G G |- x : A G |- M : A -> B G |- N : A (app) ---------------------------------- G |- M N : B G , x : A |- M : B (abs) ------------------------ G |- \x. M : A -> B
In the following, the statement "M has type A" (or equivalently, "A is a type of M"), notation |- M : A or simply M : A, stands for "the statement {} |- M : A has a proof in the type system of Curry". Note that the set of assumptions must be empty.