0

In the following Ontology I'm trying to make Boy the complement of Girl by using OneOf however using Fact++ or Hermit I'm unable to get any instances by querying for Boy (Protege 5.2 DL query), any suggestions?

:Bob rdf:type owl:NamedIndividual ,
              :Person .


:Mike rdf:type owl:NamedIndividual ,
               owl:Thing .


:Sarah rdf:type owl:NamedIndividual ,
                :Girl.

:Person rdf:type owl:Class ;
        owl:equivalentClass [ rdf:type owl:Class ;
                              owl:oneOf ( :Bob
                                          :Mike
                                          :Sarah
                                        )
                            ] .

:Girl rdf:type owl:Class ;
      owl:equivalentClass [ rdf:type owl:Class ;
                            owl:oneOf ( :Sarah
                                      )
                          ] ;
      rdfs:subClassOf :Person .

:Boy rdf:type owl:Class ;
     owl:equivalentClass [ owl:intersectionOf ( :Person
                                                [ rdf:type owl:Class ;
                                                  owl:complementOf :Girl
                                                ]
                                              ) ;
                           rdf:type owl:Class
                         ] ;
     rdfs:subClassOf :Person ;
     owl:disjointWith :Girl .
Koenig Lear
  • 2,366
  • 1
  • 14
  • 29
  • 1
    In Protégé, *Edit > Make all individuals different.* Possible duplicate of e.g. [Inferring knowledge in OWL by counting properties](https://stackoverflow.com/q/46656880/7879193). – Stanislav Kralin May 18 '18 at 18:37
  • @StanislavKralin great thanks. You should post it as an answer. While the concept and answer maybe the same the question is different. – Koenig Lear May 18 '18 at 20:19
  • OK, then please post an answer yourself and accept it, this will help other people. – Stanislav Kralin May 19 '18 at 08:58

1 Answers1

1

Adding an axiom to make all individuals as different solves the problem as suggested by Stanislav:

[ rdf:type owl:AllDifferent ;
  owl:distinctMembers ( :Bob
                        :Mike
                        :Sarah
                      )
] .

See https://en.wikipedia.org/wiki/Unique_name_assumption

Koenig Lear
  • 2,366
  • 1
  • 14
  • 29