6.2 Subtype relation
To explain what the subtype relation means, let us offer this definition:
If A ≤ B (read as "A is a subtype of B"), then either:
For example, the type "Bird" is a subtype of the type "Animal". This is because "Bird" is a specialization of "Animal".
A specialization A ("Bird") of another type B ("Animal") includes all of the properties of the original type B ("Animal"), but adds some more restrictions. For example, a Bird not only has all of the characteristics of "Animal", it also has specialized characteristics such as
Thus, "Bird" is a specialization of "Animal", since it has all of the properties of "Animal", but adds further restrictions.
But A can also be identical to B. For example,
Animal ≤ Animal
If A is not B, but A ≤ B, then we are entitled to write
A < B
, which means "A is a proper subtype of B". This is a way of saying that while A is not B; instead, A is a specialization of B.
The converse of the '≤' relation is the '≥' relation, called the "supertype relation". The two formulas
A ≤ B and B ≥ A
If A is a supertype of B, i.e., A ≥ B, and A is not B, then we are entitled to write
A > B
, which means "A is a proper supertype of B". The two formulas
A < B and B > A
It is also true that since
SeaGull ≤ Bird and Bird ≤ Animal
, then it follows that
SeaGull ≤ Animal
An immediate subtype A of another type B is a subtype that has no other types in between A and B.
Because of the transitivity of the subtype relation, if A ≤ B, it does not follow that A is an immediate subtype of B: There may be other subtypes in between. It is useful to be able to speak about immediate subtypes, however, even if we have no notation to use for it.
Next, we discuss two special types, the universal type and the absurd type.
Prev: 6.1 Type hierarchies
Up: 6 Core ontological ideas
Next: 6.3 Entity and Absurdity