0

I am studying the inference in OWL, currently the downcast of an individual type from its property domain. I've constructed the following example ontology:

@prefix : <http://www.test.org/2015/4/ontology#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@base <http://www.test.org/2015/4/ontology> .

<http://www.test.org/2015/4/ontology> rdf:type owl:Ontology .

:Class1 rdf:type owl:Class .

:Sub1 rdf:type owl:Class ;
      rdfs:subClassOf :Class1 .

:Prop1 rdf:type owl:DatatypeProperty ;
       rdfs:domain :Sub1 .

:Ind1 rdf:type :Class1 , owl:NamedIndividual ;
      :Prop1 "p" .

As expected the reasoner (Pellet in my case) inferred the statement that the :Ind1 is of type :Sub1:

:Ind1 :Prop1 "p" 
:Prop1 rdfs:domain :Sub1
=> :Ind1 a :Sub1

Then I added the following definitions:

:Class2 rdf:type owl:Class .

:Sub2 rdf:type owl:Class ;
      rdfs:subClassOf :Class2 .

:Prop2 rdf:type owl:DatatypeProperty ;
       rdfs:domain [ rdf:type owl:Class ;
                     owl:unionOf ( :Sub1
                                   :Sub2
                                 )
                   ] .

:Ind2 rdf:type :Class2 , owl:NamedIndividual ;
      :Prop2 "p" .

The domain of the property :Prop2 is now either the :Sub1 or the :Sub2.

I expected also in this case that the class :Sub2 is inferred by reasoner as the type of the :Ind2. But it does not occur.

Why can't it be inferred? Where am I wrong?

igor.br
  • 29
  • 7

1 Answers1

0

I expected also in this case that the class :Sub2 is inferred by reasoner as the type of the :Ind2. But it does not occur.

Why do you expect this? The class A or B is the class of elements which are either A's or B's (or both). If you say that the domain of a property is A or B, then from a property assertion, you can infer that the subject is member of the union class A or B, but that alone isn't enough to infer that the subject is a member of A or of B.

This may be especially clear when the union class is made up of disjoint classes. For instance, imagine a property hasWings with the domain Plane or Bird. If I assert that x hasWings 2, then you know that x is either a Plane or a Bird, and thus that it is a Plane or Bird, but you don't know yet whether x is a Plane or a Bird.

You are right, belonging to domains Plane or Bird is alone not enough to infer that the X is a Plane or a Bird if it has only one feature - the property hasWings. But in my example the individual has also a second feature - the type, that is the super class of one of the classes building the union. Imagine that the Plane is subClassOf Machine and the Bird is subClassOf Animal. If we define that the X is a Machine and hasWings 2 then the type of X should be inferred to be Plane.

Just because an individual belongs to some class doesn't mean that it must belong to any particular subclasses of that class. Right now, you know that

(a)        Ind2 &in; Class2
(b)        Ind2 &in; (Sub1 &sqcup; Sub2)
(c)        Sub2 &sqsubseteq; Class2;

You're claiming that we should be able to infer that

        Ind2 &in; Sub2

but that's not the case. Suppose the actual interpretation of the classes is this:

        Class2 ≡ {Ind2}
        Sub1 ≡ {Ind2}
        Sub2 ≡ {}

That's perfectly consistent with the axioms and the inferences; it makes them all true:

  • (a) is true because Ind2 is an element of Class2.
  • (b) is true because Ind2 is an element of Sub1 &sqcup; Sub2 (≡ {Ind2} &sqcup; {} ≡ {Ind2}).
  • (c) is true because Sub2 is a subclass of Class2 ({} &sqsubseteq; {Ind2}).
Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
  • You are right, belonging to domains Plane or Bird is alone not enough to infer that the X is a Plane or a Bird if it has only one feature - the property hasWings. But in my example the individual has also a second feature - the type, that is the super class of one of the classes building the union. Imagine that the Plane is subClassOf Machine and the Bird is subClassOf Animal. If we define that the X is a Machine and hasWings 2 then the type of X should be inferred to be Plane. – igor.br Apr 03 '15 at 20:15
  • @igor.br You haven't said anything that would allow you to infer that Ind2 is an instance of Sub2. You said that it's an instance of Class2, and you can infer that it's an instance of (Sub1 or Sub2). What would let you infer that it is an instance of Sub2? – Joshua Taylor Apr 03 '15 at 20:21
  • @igor.br I updated my answer with some more explanation. Just because something is an element of class doesn't mean that it has to be an element of some particular subclass of that class. Classes are not necessarily disjoint. – Joshua Taylor Apr 03 '15 at 20:34
  • The _something_ in my example is not only an element of some class but also has a property of its subclass. The reasoner is able to infer that the _something_ is also an element of the subclass. But this conclusion does not work if the property is of several classes including this subclass. – igor.br Apr 03 '15 at 21:13
  • After I defined the super classes :Class1 and :Class2 as disjoined I got the expected inference that the :Ind2 is of type :Sub2. Could you please help me to understand this result? – igor.br Apr 03 '15 at 21:15
  • Properties don't "belong" to classes. Saying that the domain of a property P is a class D just means that when you have "x P y", you can infer that "x rdf:type D". In your case, you said that the domain of Prop2 is "Sub1 or Sub2", and you said that "Ind1 Prop2 something". That means that you can infer that "Ind2 rdf:type (Sub1 or Sub2)". You don't have enough information to say which of Sub1 and Sub2 that Ind2 a member of. You *do* know that Ind2 is a Class2, though. And you know that *if* Ind2 is a Sub1, then it will also be a Class1. So, when you make Class1 and Class2 disjoint, you – Joshua Taylor Apr 03 '15 at 21:21
  • eliminate the possibility that Ind2 could be a Sub1, because if it were a Sub1, then it would be a Class1, but then it would be a Class1 and a Class2, which it cannot be, because they are disjoint. – Joshua Taylor Apr 03 '15 at 21:22