6.1 Terminology and notation for typed calculi
We introduce some terminology and notation for describing typed calculi. On a first reading, it may be best to skim over this section. The main reason for collecting the material here is to make it easier for the reader to find where certain terminology and notation is introduced, than it would be if it were scattered throughout the text.
Definition 6.1.1 (Type environment) An assignment of a type to a name is of the form a : T, where a is a name, called the name of the assignment, and T is a type, called the type of the assignment.
A type environment (or type assumption, or, briefly, typing) is a finite set of assignments of types to names, where the names in the assignments are all different.
We use Γ, Δ to range over type environments. We ignore the order of the assignments in a type environment. We sometimes regard a type environment Γ as a finite function from names to types. Therefore we write Γ(a) for the type assigned to a by Γ, and say that the names of the assignments in Γ are the names on which Γ is defined. For now, we also call the names of the assignments in Γ the support of Γ, written supp(Γ). When we consider polymorphism, however, a type environment Γ will also include a set of type variables, and supp(Γ) will also include these variables.
To facilitate reading, we sometimes omit curly brackets outside a type environment. For instance we write a : T, b : S for the type environment that assigns T to a, S to b and is undefined on the other names. We write Γ, Δ for the type environment that is the union of Γ and Δ; often Δ consists of a single type assignment, as in Γ, a : T. Whenever we extend a type environment, we implicitly assume that the environment was not defined on the added names.