In type theory, a typing environment (or typing context) represents the association between variable names and data types.
More formally, an environment
is a set or ordered list of pairs
, usually written as
, where
is a variable and
its type.
The judgement

is read as "
has type
in context
".
For each function body type checks:

Typing Rules Example:
t_%7B1%7D%7B%5Ctext%7Belse%7D%7Dt_%7B2%7D)%3A%5Ctau%20%5C%5C%5Cend%7Barray%7D%7D%7D%3C%2Ftitle%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22transparent%22%2F%3E%3C%2Fsvg%3E)
In statically typed programming languages, these environments are used and maintained by typing rules to type check a given program or expression.