FunctionalObjectProperty
- class FunctionalObjectProperty(object_property_expression, *, annotations=None)[source]
Bases:
_UnaryObjectPropertyAn object property axiom defined in 9.2.7 “Functional Object Properties”.
Consider the ontology consisting of the following axioms.
>>> FunctionalObjectProperty("a:hasFather") # Each object can have at most one father. >>> ObjectPropertyAssertion("a:hasFather", "a:Stewie", "a:Peter") # Peter is Stewie's father. >>> ObjectPropertyAssertion( ... "a:hasFather", "a:Stewie", "a:Peter_Griffin" ... ) # Peter Griffin is Stewie's father.
By the first axiom,
a:hasFathercan point from a:Stewie to at most one distinct individual, soa:Peteranda:Peter_Griffinmust be equal; that is, this ontology entails the following assertion:>>> SameIndividual(["a:Peter", "a:Peter_Griffin"])
One might expect the previous ontology to be inconsistent, since the a:hasFather property points to two different values for
a:Stewie. OWL 2, however, does not make the unique name assumption, soa:Peteranda:Peter_Griffinare not necessarily distinct individuals. If the ontology were extended with the following assertion, then it would indeed become inconsistent:>>> DifferentIndividuals(["a:Peter", "a:Peter_Griffin"])
Initialize a unary object property axiom.
Attributes Summary
Attributes Documentation
- Parameters:
object_property_expression (ObjectPropertyExpression)
annotations (list[Annotation])