Re: infered subject for a certain property value
Posted by Jiba on
URL: http://owlready.306.s1.nabble.com/infered-subject-for-a-certain-property-value-tp925p927.html
Hello,
For individuals, you can use inverse properties. If the inverse property does not exist, you can create it in a separated temporary ontology, to avoid polluting the main one.
For classes (as your example suggests), it is more complicated. For a formal and logical point of view, one cannot infer restriction on inverse properties from restrictions on a property. For example, "nucleus is part of some cell" does not imply that "cell has part some nucleus": in fact, all cells do not have a nucleus, while all nucleus belong to a cell.
However, it is still interesting in some situations, I agree. Owlready has the Class.inverse_restriction(property) class method that follows restriction in reverse direction. But it does not support indirect relations. Maybe what you would need is a "indirect_inverse_restriction()" method ?
Best regards,
Jiba