0

I have the axiom: individual A does not like what individual B likes. Then, there are the properties, like and dislike. I want to be inferred that when someone does not like something then he dislikes it.

I have added that like and dislike are disjoint but I don't know how to go further using Protege.

LostIT
  • 247
  • 2
  • 10
  • _"I have the axiom: individual A does not like what individual B likes. "_ When this holds for all individuals, it says that every thing is liked by at most one individual. Is that really what you want to express ? – shful Jan 03 '18 at 11:19
  • This holds true for certain individuals only; not for every pair of distinct individuals. – LostIT Jan 03 '18 at 19:05
  • 1
    That's not possible in OWL because it doesn't have the concept of variables. You'll have to use a rule language like SWRL. – UninformedUser Jan 04 '18 at 06:59

1 Answers1

1

If you do not insist on inferring object properties, there is a workaround using the covering axiom which sort of closes the world.

Let's say we have a :Person_A and if he/she doesn't like something, then he/she dislikes it. The focus needs to be changed to the things that :Person_A likes or dislikes. They would belong to the class :ThingsThatAHasAttitudeTo.

Properties

First, it is important to declare a property for both liking and disliking.

:dislikes rdf:type owl:ObjectProperty ;
          rdfs:subPropertyOf :hasAttitude ;
          owl:inverseOf :isDislikedBy .

:hasAttitude rdf:type owl:ObjectProperty .

:isDislikedBy rdf:type owl:ObjectProperty ;
              rdfs:subPropertyOf :isLikedOrDislikedBy .

:isLikedBy rdf:type owl:ObjectProperty ;
           rdfs:subPropertyOf :isLikedOrDislikedBy ;
           owl:inverseOf :likes .

:isLikedOrDislikedBy rdf:type owl:ObjectProperty .

:likes rdf:type owl:ObjectProperty ;
       rdfs:subPropertyOf :hasAttitude .

Classes

Then, if you have an enumerated class containing only the individual Person_A,

:PersonClass_A rdf:type owl:Class ;
               owl:equivalentClass [ rdf:type owl:Class ;
                                     owl:oneOf ( :PersonClass_A
                                               )
                                   ] .

the following restrictions would be needed, for things liked:

:ThingsThatALikes rdf:type owl:Class ;
                  owl:equivalentClass [ owl:intersectionOf ( :ThingsThatAHasAttitudeTo
                                                             [ rdf:type owl:Restriction ;
                                                               owl:onProperty :isLikedBy ;
                                                               owl:someValuesFrom :PersonClass_A
                                                             ]
                                                           ) ;
                                        rdf:type owl:Class
                                      ] .

... and for things disliked:

:ThingsThatADislikes rdf:type owl:Class ;
                     owl:equivalentClass [ rdf:type owl:Class ;
                                           owl:unionOf ( [ owl:intersectionOf ( :ThingsThatAHasAttitudeTo
                                                                                [ rdf:type owl:Restriction ;
                                                                                  owl:onProperty :isDislikedBy ;
                                                                                  owl:someValuesFrom :PersonClass_A
                                                                                ]
                                                                              ) ;
                                                           rdf:type owl:Class
                                                         ]
                                                         [ owl:intersectionOf ( :ThingsThatAHasAttitudeTo
                                                                                [ rdf:type owl:Restriction ;
                                                                                  owl:onProperty :isLikedOrDislikedBy ;
                                                                                  owl:someValuesFrom :PersonClass_A
                                                                                ]
                                                                              ) ;
                                                           rdf:type owl:Class
                                                         ]
                                                       )
                                         ] .

And last, it is important to cover the class :ThingsThatAHasAttitudeTo

:ThingsThatAHasAttitudeTo rdf:type owl:Class ;
                          rdfs:subClassOf [ rdf:type owl:Class ;
                                            owl:unionOf ( :ThingsThatADislikes
                                                          :ThingsThatALikes
                                                        )
                                          ] .

The classes needs to be disjoint and the individuals different.

With these definitions, if there are individuals that are members of the class :ThingsThatAHasAttitudeTo, for those of them that is not asserted that :Person_A likes, they will be inferred as members of the class :ThingsThatADislikes.

Ivo Velitchkov
  • 2,361
  • 11
  • 21