Editing Subtyping
Appearance
Content that violates any copyrights will be deleted. Encyclopedic content must be verifiable through citations to reliable sources.
Latest revision | Your text | ||
Line 63: | Line 63: | ||
For example: there is a subfamily of cat species called ''Felinae'', which is part of the family ''Felidae''. The genus ''Felis'', to which the domestic cat species ''Felis catus'' belongs, is part of that subfamily. |
For example: there is a subfamily of cat species called ''Felinae'', which is part of the family ''Felidae''. The genus ''Felis'', to which the domestic cat species ''Felis catus'' belongs, is part of that subfamily. |
||
:<math>\ |
:<math>\mathrm{Felinae = \{cat \in Felidae \mid \ ofSubfamily(cat, felinaeSubfamilyName)\}}</math> |
||
:<math>\ |
:<math>\mathrm{Felis =\{cat \in Felinae \mid \ ofGenus(cat, felisGenusName)\}}</math> |
||
The conjunction of predicates has been expressed here through application of the second predicate over the domain of values conforming to the first predicate. Viewed as types, {{nowrap|'''Felis <: Felinae <: Felidae'''}}. |
The conjunction of predicates has been expressed here through application of the second predicate over the domain of values conforming to the first predicate. Viewed as types, {{nowrap|'''Felis <: Felinae <: Felidae'''}}. |