Broken inverse of subproperty of symmetric object property

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Broken inverse of subproperty of symmetric object property

Matthias
Hi,

I noticed that the inverse is broken for any subproperty of a symmetric object property.

Let's say I have a symetric object property "PARENT".
"PROPERTY" and "INVERSE" are subproperties of it and "INVERSE" is the inverse of "PROPERTY".
See the ontology below.
If I use owlready2 to get the inverse of "PROPERTY" it doesn't seem to work as expected.
It seems that "INVERSE" and "PROPERTY" became symmetric as well.

I don't think that should be the case:
The basic form is SubObjectPropertyOf( OPE1 OPE2 ). This axiom states that the object property expression OPE1 is a subproperty of the object property expression OPE2 — that is, if an individual x is connected by OPE1 to an individual y, then x is also connected by OPE2 to y.
(https://www.w3.org/TR/owl2-syntax/#Object_Subproperties)

I use Owlready2==0.20 and Python 3.7.4.

Cheers,

Matthias

>>> import owlready2
>>> o = owlready2.get_ontology("test.owl")
>>> o.load()
get_ontology("http://test.info/test-properties#")
>>> for p in o.object_properties():
...         print(p, p.inverse_property)
...
test.PARENT test.PARENT
test.PROPERTY test.PROPERTY
test.INVERSE test.INVERSE

<?xml version="1.0"?>
<Ontology xmlns="http://www.w3.org/2002/07/owl#"
     xml:base="http://test.info/test-properties#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:xml="http://www.w3.org/XML/1998/namespace"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     ontologyIRI="http://test.info/test-properties#">
    <Prefix name="owl" IRI="http://www.w3.org/2002/07/owl#"/>
    <Prefix name="rdf" IRI="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>
    <Prefix name="xml" IRI="http://www.w3.org/XML/1998/namespace"/>
    <Prefix name="xsd" IRI="http://www.w3.org/2001/XMLSchema#"/>
    <Prefix name="rdfs" IRI="http://www.w3.org/2000/01/rdf-schema#"/>

    <Declaration>
        <ObjectProperty IRI="http://test.info/test-properties#PARENT"/>
    </Declaration>
    <Declaration>
        <ObjectProperty IRI="http://test.info/test-properties#PROPERTY"/>
    </Declaration>
    <Declaration>
        <ObjectProperty IRI="http://test.info/test-properties#INVERSE"/>
    </Declaration>

    <SymmetricObjectProperty>
        <ObjectProperty IRI="http://test.info/test-properties#PARENT"/>
    </SymmetricObjectProperty>

    <SubObjectPropertyOf>
        <ObjectProperty IRI="http://test.info/test-properties#PROPERTY"/>
        <ObjectProperty IRI="http://test.info/test-properties#PARENT"/>
    </SubObjectPropertyOf>
    <SubObjectPropertyOf>
        <ObjectProperty IRI="http://test.info/test-properties#INVERSE"/>
        <ObjectProperty IRI="http://test.info/test-properties#PARENT"/>
    </SubObjectPropertyOf>

    <InverseObjectProperties>
        <ObjectProperty IRI="http://test.info/test-properties#PROPERTY"/>
        <ObjectProperty IRI="http://test.info/test-properties#INVERSE"/>
    </InverseObjectProperties>
   

</Ontology>
Reply | Threaded
Open this post in threaded view
|

Re: Broken inverse of subproperty of symmetric object property

Jiba
Administrator
Hi,

I think you are right: the subproperty of a symmetric property should not be considered as symmetric. Owlready2 was wrongly considering it.

I've fixed this in the development version; I'll make a new release in a few hours.

Jiba
Reply | Threaded
Open this post in threaded view
|

Re: Broken inverse of subproperty of symmetric object property

Matthias
Thanks a lot. It works fine after the update.