I am new to Protégé so I have a very basic question.
I have the classes Child
and Parent
. Child
has the subclass Girl
.
child1
has the type Girl
, child2
has the type Child
and anna
and peter
have both the type Parent
. In addition, there are the relations anna isParentOf child1
and peter isParentOf child2
with no further characteristics.
Now I want to define the class ParentOfGirl
so that it is equivalent to Parent and isParentOf only Girl
. I would expect that the reasoner infers that anna
has this new type, but it does not.
I added the Inverse functional
property to isParentOf
because a parent can have more than one child. If I then add also Symmetric
to the relation I get that anna
has the type ParentOfGirl
, but I do not want to have isParentOf
to be symmetric.
If I look at the semantics of the above without symmetry, I see this:
ParentOfGirl ≡ {anna, peter} ⋂ { x ∊ owl:Thing | if ∀y (x, y) ∊ isParentOf then y ∊ Girl}
child1 ∊ Child and child1 ∊ Girl
isParentOf ≡ {(anna, child1), (peter, child2)}
Then child1
is the only individual of type Child
in relation with anna
and it has also the type Girl
. It seems to me that the reasoner can look at the relations only from right to left in this case because if isParentOf
is symmetric, it deduces anna
. Furthermore, I would expect that peter
would also be in ParentOfGirl
if it was not in the relation with child2. But this also does not happen.
Why does the reasoner (Pellet or HermiT) does not see that anna
is a ParentOfGirl
?
@AKSW is correct in the comment. The reasoner cannot tell if a parent has only female children. You need to assert this feature, for example by adding a type to the individual.
In this case, this assertion would be equivalent to the inference you seek, though - so it's not a really good workaround.
If you change the forall to some, you will be able to find parents of at least one girl. This is a superclass of your target class, and might help your application along.