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
9 - Technical details
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
To avoid interrupting the main lines of thought in the earlier chapters some concepts were defined there only in outline and their main properties were stated without proof. This chapter gives the full definitions and proofs. It should be read only as required to follow the arguments in the other chapters. Its sections are largely independent of each other.
The structure of a term
From the viewpoint of logical order this section is best read between 1A3 and 1A4.
As remarked in 1A4, a subterm of a term may have more than one occurrence. The present section introduces a precise notation to distinguish such different occurrences; it is rather clumsy and the reader should avoid using it whenever possible, but in some proofs its precision will be vital. The first step is to define a set of expressions called positions that can be assigned to different occurrences of a subterm to show where they occur.
Definition (Positions) A positionp = i1 … im is any finite (perhaps empty) string of symbols such that i1, …, im are integers and im is either an integer or an asterisk, *. Its length is m, and if m = 0 we say p = Ø.
If m ≥ 1 and im = 1 we call p a function position;
If m ≥ 1 and im = 2 we call p an argument position;
if m ≥ 1 and im = 0 we call p a body position; and
if m ≥ 1 and im = * we call p an abstractor position.
- Type
- Chapter
- Information
- Basic Simple Type Theory , pp. 140 - 160Publisher: Cambridge University PressPrint publication year: 1997