When stating that A
is a subclass of B
, this restricts A
to necessarily inherit all characteristics of B
, but not the other way around. In your example, A
= Teenager
, and B
= hasAge [12:19]
(my own notation, but you get the idea).
This means that any instance of Teenager
in the OWL ontology must necessarily also have the property hasAge
with a value in the range [12:19]
, but not the other way around. Specifically, this does not mean that any instance of something with the property hasAge
with a value in the range [12:19]
is also an instance of Teenager
. To make this clear, consider an instance (called c
) of class Car
. We might also say that:
c . hasAge 13
This says that instance c
of Car
is 13 years old. However, with the subclass axiom defining Teenager
above, a reasoner would not infer that c
is also an instance of Teenager
(perhaps as we'd want, if teenagers are people, not cars).
The difference when using equivalence is that the subclass relationship is implied to go in both directions. So, if we were to instead include the second axiom that defined Teenager
to be equivalent to anything with the property hasAge
with a value in the range [12:19]
, then a reasoner would infer that the car c
is also an instance of Teenager
.