Scarlet Serenade

Types and Programming Languages | Subtyping

Definition: We say that is a subtype of , written , to mean that any term of type can safely be used in a context where a term of type is expected.

  • This view of subtyping is often called the principle of safe substitution.

This leads to a new typing rule - the so-called rule of subsumption

The Subtype Relation

The subtype relation is reflexive and transitive.