Definition
Subtype Polymorphism
Subtype polymorphism, also known as inclusion polymorphism, is a concept in type theory and programming languages where a value of a subtype can be used wherever a value of its supertype is expected.
If is a subtype of , then any term of type can be substituted for a term of type without disrupting the program’s type safety. This is the principle of substitutability.