owl:inverseOf
is often used to define inverse relations between properties. An axiom of the form P1 owl:inverseOf P2
asserts that for every pair (x,y) in the property extension of P1, there is a pair (y,x) in the property extension of P2, and vice versa for example hasChild
and hasParent
.
How can I define such inverse relationships between object properties with multiple domains and ranges, such as:
hasOwner owl:inverseOf hasDog
hasOwner owl:inverseOf hasCat
Classes: Person, Dog, Cat
ObjectProperties: hasOwner, hasDog, hasCat
hasOwner:
Domains: Dog or Cat
Ranges: Person
hasDog:
Domains: Person
Ranges: Dog
hasCat:
Domains: Person
Ranges: Cat
If I known Mammy hasDog Spike
and Mammy hasCat Tom
, how can I model the ontology so that the reasoner can infer Spike hasOwner Mammy
and Tom hasOwner Mammy
?
Forgetting about the incomprehensible restriction that anything that has an owner is either a cat or a dog, you can get closer to a reasonable model with (in Turtle syntax):
hasDog rdfs:subPropertyOf [ owl:inverseOf hasOwner ] .
hasCat rdfs:subPropertyOf [ owl:inverseOf hasOwner ] .
This has the non-advantage of not creating a new class name or a new property name.
PS: I do know things that have an owner and are neither cats nor dogs.