These examples relate to the ontology of friends introduced earlier.
Note that Protege doesn't currently offer the ability to query for instances of arbitrary classes. In order to check whether an instance I is an instance of some complex class description D, we can introduce a new class which is equivalent to D, and then classify to see if I is an instance of D.
Individual(a:Patricia value(a:hasFriend a:Arthur))
Arthur is a Student and he's Happy. However, we find that Patricia is not an instance of
restriction(all friends intersectionOf(Student Happy))
Why not?
This is due to the open world assumption (OWA). We cannot assume that if we dont know something then it is false. In this example, there may be other friends that Patricia has that are not Students. Reasoning in DLs is monotonic — if we know that x is an instance of A, then adding more information to the model cannot cause this to become false.
Some of the individuals in the ontology have additional cardinality constraints which close the relation, allowing us to make further inferences about all the friends they have.
Individual(a:Xanthe type(restriction(a:hasFriend cardinality(1))) value(a:hasFriend a:Arthur))
Thus Xanthe is an instance of:
restriction(all friends intersectionOf(Student Happy))
as we know all the friends that she has (and they all match the description).
Making inferences about universal quantification requires us to know about all the fillers that an individual has for a particular property.
Individual(a:William type(restriction(a:hasFriend cardinality(0))))
So William has no friends. However, William is an instance of:
restriction(all friends intersectionOf(Student Happy))
Why?
A common source of confusion in OWL semantics is when we have universal quantification over an empty set.
In this case, we know that William has no friends. So William is an instance of:
restriction(all friends intersectionOf(Student Happy))
and
restriction(all friends unionOf(Student Happy))
In fact he's an instance of
restriction(all friends X)
for any class description X (even Nothing).
Universal quantification over an empty collection is trivially true.