Book contents
- Frontmatter
- Contents
- Introduction
- 1 The type-free λ-calculus
- 2 Assigning types to terms
- 3 The principal-type algorithm
- 4 Type assignment with equality
- 5 A version using typed terms
- 6 The correspondence with implication
- 7 The converse principal-type algorithm
- 8 Counting a type's inhabitants
- 9 Technical details
- Answers to starred exercises
- Bibliography
- Table of principal types
- Index
2 - Assigning types to terms
Published online by Cambridge University Press: 02 December 2009
- Frontmatter
- Contents
- Introduction
- 1 The type-free λ-calculus
- 2 Assigning types to terms
- 3 The principal-type algorithm
- 4 Type assignment with equality
- 5 A version using typed terms
- 6 The correspondence with implication
- 7 The converse principal-type algorithm
- 8 Counting a type's inhabitants
- 9 Technical details
- Answers to starred exercises
- Bibliography
- Table of principal types
- Index
Summary
The topic of this book is one of the simplest current type-theories. It was called TA in the Introduction but in fact it comes in two forms, TAc for combinatory logic and TAλ for λ-calculus. Since most readers probably know λ-calculus better than combinatory logic, only TAλ will be described here. (The reader who wishes to see an outline of TAC can find one in HS 86 Ch.14; most of its properties are parallel to those of TAλ.)
The present chapter consists of a definition and description of TAλ. It is close to the treatment in HS 86 Ch. 15 but differs in some technical details.
The system TAλ
Definition (Types) An infinite sequence of type-variables is assumed to be given, distinct from the term-variables. Types are linguistic expressions defined thus:
each type-variable is a type (called an atom);
if σ and τ are types then (σ→τ) is a type (called a composite type).
NotationType-variables are denoted by “a”, “b”, “c”, “d”, “e”, “f”, “g”, with or without number-subscripts, and distinct letters denote distinct variables unless otherwise stated.
Arbitrary types are denoted by lower-case Greek letters except “λ”.
Parentheses will often (but not always) be omitted from types, and the reader should restore omitted ones in such a way that, for example,
ρ→σ→τ ≡ (ρ→(σ→τ)).
This restoration rule is called association to the right.
Informal interpretation To interpret types we think of each type-variable as a set and σ→τ as a set of functions from σ into τ.
- Type
- Chapter
- Information
- Basic Simple Type Theory , pp. 12 - 29Publisher: Cambridge University PressPrint publication year: 1997