HasType
HasType is a formal relation used in type theory and programming language semantics to express that a term e has a type T within a given typing context Γ. It is commonly written as HasType Γ e T and is the central judgment used by type checkers and proof systems to certify well-typed terms.
In a typical simply typed or dependently typed setting, HasType is defined by a small set of
HasType plays a key role in establishing type safety, since proofs of preservation (types are maintained under
Examples illustrate its use: in a context Γ that assigns a type to a variable x, x has