Let's have an OWL-DL ontology considering only the TBox (no individuals) and Let's consider
Chinesefamily hasChilren max 1
SterileChinesefamily subClassOf Chinesefamily
SterileChinesefamily hasChilren exactly 0
The expression
hasChilren max 1
will return Chinesefamily
and SterileChinesefamily
as sub classes
Well, how to specify classes that may have 0 or 1 children (Chinesefamily
) but must not have exactly 0 children (SterileChinesefamily
)
I tried
hasChilren max 1 and not hasChilren exactly 0
It returns Nothing!
============= UPDATE =============
Please note
hasChilren exactly 1
is not what I intend. Instead, what I mean is classes that are subclasses of:
- The classes that their individuals are allowed to have either 1 or 0 children (
Chinesefamily
). AND
NOT
The classes that their individuals must have exactly zero children (SterileChinesefamily
).
(Actually, I consider only the TBox (no individuals), but this update is just for clarification).
You are right that hasChildren exactly 0 is a subclass of hasChildren max 1, because a family with 0 children certainly has at most one child. If you're asking for families with exactly one child, simply ask for the individuals of type
hasChildren exactly 1
A class expression like hasChildren max 1 doesn't have anything to do with permission, or being "allowed" to have values. It is simply the class of individuals that have either 0 or 1 values for the hasChildren property. What you're asking for is classes that are subclasses of both:
The complement of hasChildren max 0 is the class of individuals that have at least one child. That is, it's the class hasChildren min 1. So you're asking for classes that are subclasses of both:
That means you're asking for subclasses of
Now, that intersection is equivalent to
This makes sense. The things that can have 0 or 1 children, but don't have 0 children, are the things that have 1 child.