Simple Types for Lambda Calculus
There are several type systems for lambda calculus
We consider here the simplest one
- types are disjoint
- only primitive and function types
- every lambda binding specifies its type
Type Rules for Simply Typed Lambda Calculus
Environment maps variable names to types
Variable
Application
Abstraction
Example Primitive Operations
Among the primitive operations we consider
plus : int -> int -> int ite : bool -> int -> int
Example: Type check the lambda expression
in environment