I have the following made up example class hierarchy for clearing my doubt.
The class of Dog
and Human
are subclasses of Animal
. Also present is the class Leash
.
I have modelled the Dog class as a Defined Class with a property restriction on an object property wearsLeash
as shown.
I have modelled the Human class as the complement of the Dog class as shown
I have three individuals for these classes as below. Leo
is supposed to be the Dog
and David
the Human
I have asserted that Leo wearsLeash RedLeash
as shown.
On running the built-in reasoner, Leo
gets classified
as a Dog
but David
doesn't get classified as a Human
. My questions is why is it that David
not inferred as an individual of Human
as the class of animals that are not dogs? Is it due to the Open world assumption ? What other ways do I have to automatically infer David
as Human
using this logic?
Thanks!
EDIT: OWL file
@prefix : <http://www.semanticweb.org/university/untitled-ontology-107#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@base <http://www.semanticweb.org/university/untitled-ontology-107> .
<http://www.semanticweb.org/university/untitled-ontology-107> rdf:type owl:Ontology .
#################################################################
# Object Properties
#################################################################
### http://www.semanticweb.org/university/untitled-ontology-107#wearsLeash
:wearsLeash rdf:type owl:ObjectProperty .
#################################################################
# Classes
#################################################################
### http://www.semanticweb.org/university/untitled-ontology-107#Animal
:Animal rdf:type owl:Class .
### http://www.semanticweb.org/university/untitled-ontology-107#Dog
:Dog rdf:type owl:Class ;
owl:equivalentClass [ owl:intersectionOf ( :Animal
[ rdf:type owl:Restriction ;
owl:onProperty :wearsLeash ;
owl:someValuesFrom :Leash
]
) ;
rdf:type owl:Class
] ;
rdfs:subClassOf :Animal ;
owl:disjointWith :Human .
### http://www.semanticweb.org/university/untitled-ontology-107#Human
:Human rdf:type owl:Class ;
owl:equivalentClass [ owl:intersectionOf ( :Animal
[ rdf:type owl:Class ;
owl:complementOf :Dog
]
) ;
rdf:type owl:Class
] .
### http://www.semanticweb.org/university/untitled-ontology-107#Leash
:Leash rdf:type owl:Class .
#################################################################
# Individuals
#################################################################
### http://www.semanticweb.org/university/untitled-ontology-107#David
:David rdf:type owl:NamedIndividual ,
:Animal .
### http://www.semanticweb.org/university/untitled-ontology-107#Leo
:Leo rdf:type owl:NamedIndividual ,
:Animal ;
:wearsLeash :RedLeash .
### http://www.semanticweb.org/university/untitled-ontology-107#RedLeash
:RedLeash rdf:type owl:NamedIndividual ,
:Leash .
#################################################################
# General axioms
#################################################################
[ rdf:type owl:AllDifferent ;
owl:distinctMembers ( :David
:Leo
)
] .
### Generated by the OWL API (version 4.5.9.2019-02-01T07:24:44Z) https://github.com/owlcs/owlapi
In the ontology
Human
is defined as the intersection ofAnimal
and the complement ofDog
, which, for the purpose of classifyingHuman
instances, is equivalent to definingAnimal
as the disjoint union ofDog
andHuman
.This means that anything that is defined as being an
Animal
will be either aDog
or aHuman
; an instance can be classified as aDog
if it is known to wear a leash.The problem here is that
David
is not known to wear a leash and is not known not to wear a leash; Open World Assumption means that the reasoner cannot choose either possibility and cannot, therefore decide whetherDavid
is aDog
or aHuman
. To obtain what you want it's necessary to add more information to the ontology, such as thatDavid
belongs to a class that is outside the domain ofwearsLeash
.