2

I tried to create the perhaps simplest ontology, consisting of two classes (A, B) and a relation (R) between the two classes. I also want to state that every individual of A must have a relation R with some other individual.

:R rdf:type owl:ObjectProperty ;
   rdfs:domain :A ;
   rdfs:range :B .

:A rdf:type owl:Class ;
   rdfs:subClassOf owl:Thing ,
                   [ rdf:type owl:Restriction ;
                     owl:onProperty :R ;
                     owl:someValuesFrom :B
                   ] ;
   owl:disjointWith :B .

:B rdf:type owl:Class ;
   rdfs:subClassOf owl:Thing .

Now some individuals:

:a1 rdf:type :A , owl:NamedIndividual ; :R :b1 .
:a2 rdf:type :A , owl:NamedIndividual .
:b1 rdf:type :B , owl:NamedIndividual .

enter image description here

But the reasoner does not complain about a2 not having a relation R. Why?

(Note: I created ontology in Protégé; I tried FacT++ and HermiT reasoners)

fferri
  • 18,285
  • 5
  • 46
  • 95

2 Answers2

2

I also want to state that every individual of A must have a relation R with some other individual.

You have done this correctly. When you go on to assert that

:a1 rdf:type :A , owl:NamedIndividual ; :R :b1 .
:a2 rdf:type :A , owl:NamedIndividual .
:b1 rdf:type :B , owl:NamedIndividual .

the reasoner will correctly infer there is some value, let's call it X, such that :a2 :R X and that X rdf:type :B. OWL reasoning uses the open world assumption. This means that if something is not explicitly stated to be true or false, it is not assumed to be false or true, but rather unknown. E.g., you could correctly assert that

        Human ⊑ ∃ hasMother.Human

that is, that every Human has some Human as a mother. If I say that

        DanielWebster ∈ Human

and that's all that I say; I haven't made an inconsistency. There are just things that are true that we don't know yet. We know that DanielWebster has a mother, but we don't know who she is.

If you want to close the world, you could do a few things, but the results may not be what you want. First, you could make B an enumerated class. That is, you could explicitly list the individuals of B:

        B ≡ {b1}

That actually won't lead to an inconsistency, though. In fact, the reasoner will infer that since a2 must be related to some B, and the only B is b1, that a2 is related by R to b1.

Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
1

You can use an equivalent also.

:A owl:equivalentClass [ rdf:type owl:Restriction ; owl:onProperty :R ; owl:someValuesFrom owl:Thing ] ;

You don't need to write domain constraint for R. The equivalent will take care of it. You still have to write range constraint.

But the reasoner does not complain about a2 not having a relation R. Why?

To answer this question. You need to understand Open world assumption. Semantic web is open world assumption. There are some research paper, which I have said in the comments below, makes some concepts or roles as Closed world assumption. For example, in your example, if you make R as a closed predicate. you will get the error you asked. This is entirely a theoretical idea.

  • 1
    I don't see how this answers the question "But the reasoner does not complain about a2 not having a relation R. Why?" Making the classes equivalent will just mean that everything that has an R value is an A. Even if you make the classes equivalent, the reasoner wont "complain about a2 not having a relation R"; it will just (consistently) infer that a2 has some R, just one that we don't happen to know what it is. – Joshua Taylor Apr 24 '15 at 20:38
  • Well, semantic web is open world reasoning. To create such errors, we have to go for the concept called locally closed world. [closed prdicates](http://ijcai.org/papers13/Papers/IJCAI13-156.pdf ) Example 2.2 in the paper forces role not to infer. To answer his question precisely, you have to assume R is a closed predicate. It will enforce to enter R(a2,__). –  Apr 24 '15 at 21:14
  • I completely understand why the reasoner doesn't call a2 not having an asserted R value an inconsistency. What I **don't** understand is how this answer (the suggestion to use an equivalent class axiom) is supposed to help. – Joshua Taylor Apr 24 '15 at 21:20
  • 1
    My bad! I dint see the question at the bottom at first. I added my answer. I hope the added might help some one. –  Apr 24 '15 at 21:28