ontodev / robot

ROBOT is an OBO Tool
http://robot.obolibrary.org
BSD 3-Clause "New" or "Revised" License
259 stars 73 forks source link

reduce not removing axioms where one relationship is a subproperty of another between the same two classes #1208

Open Clare72 opened 3 months ago

Clare72 commented 3 months ago

For example: A part_of some B A overlaps some B part_of SubObjectPropertyOf overlaps

I would expect the A overlaps some B axiom to be removed by reduce, but it is not.

running robot reduce -r ELK -i test.ofn -o result.ofn using ROBOT version 1.9.6 test file (test.ofn):

Prefix(:=<http://www.semanticweb.org/test/ontologies/2024/5/untitled-ontology-1023/>)
Prefix(owl:=<http://www.w3.org/2002/07/owl#>)
Prefix(rdf:=<http://www.w3.org/1999/02/22-rdf-syntax-ns#>)
Prefix(xml:=<http://www.w3.org/XML/1998/namespace>)
Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)
Prefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)

Ontology(<http://www.semanticweb.org/test/ontologies/2024/5/untitled-ontology-1023>

Declaration(Class(<http://purl.obolibrary.org/obo/TEST_A>))
Declaration(Class(<http://purl.obolibrary.org/obo/TEST_B>))
Declaration(ObjectProperty(<http://purl.obolibrary.org/obo/overlaps>))
Declaration(ObjectProperty(<http://purl.obolibrary.org/obo/part_of>))

############################
#   Object Properties
############################

# Object Property: <http://purl.obolibrary.org/obo/overlaps> (overlaps)

AnnotationAssertion(rdfs:label <http://purl.obolibrary.org/obo/overlaps> "overlaps"@en)

# Object Property: <http://purl.obolibrary.org/obo/part_of> (part_of)

AnnotationAssertion(rdfs:label <http://purl.obolibrary.org/obo/part_of> "part_of"@en)
SubObjectPropertyOf(<http://purl.obolibrary.org/obo/part_of> <http://purl.obolibrary.org/obo/overlaps>)

############################
#   Classes
############################

# Class: <http://purl.obolibrary.org/obo/TEST_A> (A)

AnnotationAssertion(rdfs:label <http://purl.obolibrary.org/obo/TEST_A> "A"@en)
SubClassOf(<http://purl.obolibrary.org/obo/TEST_A> ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/overlaps> <http://purl.obolibrary.org/obo/TEST_B>))
SubClassOf(<http://purl.obolibrary.org/obo/TEST_A> ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/part_of> <http://purl.obolibrary.org/obo/TEST_B>))

# Class: <http://purl.obolibrary.org/obo/TEST_B> (B)

AnnotationAssertion(rdfs:label <http://purl.obolibrary.org/obo/TEST_B> "B"@en)

)

Might be related to #1014