Search code examples
logicowlsemantic-webrdfsreasoning

When using rdfs:subClassOf or owl:equivalentClass in case of existential quantification (owl:SomeValuesFrom) for a OWL class restriction constructor?


We define a class A as owl:equivalentClass and a class A2 as rdfs:subClassOf based on the intersection (AND) of instances having a relation a_to_b and a_to_c with an instance of B or C respectively. Please see the example:

:A rdf:type owl:Class ;
   owl:equivalentClass [ owl:intersectionOf ( [ rdf:type owl:Restriction ;
                                                owl:onProperty :a_to_b ;
                                                owl:someValuesFrom :B
                                              ]
                                              [ rdf:type owl:Restriction ;
                                                owl:onProperty :a_to_c ;
                                                owl:someValuesFrom :C
                                              ]
                                            ) ;
                         rdf:type owl:Class
                       ] .

Here as a subclass:

:A2 rdf:type owl:Class ;
   rdfs:subClassOf [ owl:intersectionOf ( [ rdf:type owl:Restriction ;
                                            owl:onProperty :a_to_b ;
                                            owl:someValuesFrom :B
                                          ]
                                          [ rdf:type owl:Restriction ;
                                            owl:onProperty :a_to_c ;
                                            owl:someValuesFrom :C
                                          ]
                                        ) ;
                     rdf:type owl:Class
                   ] .

What is the reason to use owl:equivalentClass and when would I use rdfs:subClassOf? The distinction and what is really expressed at the end is not fully clear to me.

My further observation / questions:

a) When I create an instance x with triples: (x, a_to_b, b1) and (x, a_to_c, c1), x is automatically reasoned as a type of A but not of A2. (Using Protege with Hermit Reasoner) (c1 is type of C and b1 is type of B).

b) When I create an instance y and assign y the type A and A2 manually, would this be an issue if y has no relation to an instance of B via a_to_b and no relation to an instance of C via a_to_c? The Hermit Reasoner does not show any signs of an issue but is that not a necessary (must be fulfilled) condition for class A?

c) Are these statements true for A:

c1) If I know that z is from type A, it must have a relation a_to_b with an instance of B and it must have a relation a_to_C with an instance of C.

c2) If I know that z have a relation a_to_b with an instance of B and it have a relation a_to_C with an instance of C, z must be of type A.

c3) A is the class of all things that have a relation a_to_b with an instance of B and have a relation a_to_C with an instance of C.

Can I say c1 and c3 also about A2 or how to the statements change?

The meaning is not clear to me. I hope someone can clarify things. Thanks in advance


Solution

  • I think the first thing to be aware of is that equivalence, say D equivalentClass E, is an abbreviation for D subClassOf E and E subClassOf D. The semantics of subClassOf is subset. This means that the set D is a subset of set E and set E is a subset of D, which means set D and set E are exactly the same set. We say they are equivalent.

    Note now the semantics of subClassOf. If I know F subClassOf E and G subClassOf E, what can I say about how F and G relates to each other? Absolutely nothing. It is a bit like knowing a bicycle and a truck are both vehicles. That does not make a bicycle a truck or a truck a bicycle, though both are vehicles.

    Thus, in your example, A can be expanded to the 2 axioms

    A subClassOf (a_to_b some B) and (a_to_c some C)

    (a_to_b some B) and (a_to_c some C) subClassOf A

    Answers to your questions:

    (a) With the assertions for x as you have it, we can see that x is indeed an instance of A. However, there is no information wrt x that makes it possible for us to say x is of type A2. All we know is that both x and A2 are subclasses of (a_to_b some B) and (a_to_c some C).

    (b) This is due to the Open World Assumption, which means the reasoner does not make any assumptions based on the absence of information. If you have not stated explicitly that y has no a_to_b relation to B, it will assume that an a_to_b relation exists but is merely not known. This is as opposed to the closed world assumption made by databases usually. I.e., if no employer information exists for a client the assumption is often made that the client is not employed.

    You can state that y has no a_to_b relation by stating that a_to_b max 0 B. The reasoner will then give an inconsistency.

    (c1) yes, but these may not be known currently due to the open world assumption.

    (c2) yes, based on the semantics of equivalence

    (c3) yes.

    This is not true for A2 because it is merely a subclass rather than all things that have a relation a_to_b with an instance of B and have a relation a_to_C with an instance of C.

    When to use equivalent vs subClassOf

    Equivalence is used for definitions. That is when you want to state the necessary and sufficient conditions for something to be called an A (from your example).

    SubClassOf is used when you want to define a hierarchy from most general to most specific. I.e., it is typically what you see in taxonomies and in programming you will see it as object oriented class hierarchies.