OWL restrictions value vs only vs exactly on dataProperty - owl

Suppose we have a class named A, and a DataProperty called hasRestriction. What is the difference between these statements:
A SubClassOf (hasRestriction value 2)
A SubClassOf (hasRestriction exactly 2)
A SubClassOf (hasRestriction only 2)

TL;DR: read AKSW's comments, they are good and concise.
Long version:
Your question is asking how to interpret class expressions in Protégé. Protégé uses the OWL 2 Manchester syntax to describe classes, and Protégé assumes that ontologies are interpreted according to the OWL 2 Direct Semantics. If the property hasRestriction is a DataProperty in Protégé, then it means that hasRestriction denotes a set of pairs (x,y) where x is an individual (an element of the universe of discourse) and y is a data value (like a number, a string, a date). In Protégé, class expressions are used to denote sets of individuals.
In the statements you provide there are three class expressions:
hasRestriction value 2
hasRestriction exactly 2
hasRestriction only 2
The first one, hasRestriction value 2, identifies the set of things that have the property hasRestriction with the value 2. So if x belongs to this class, then (x, 2) belongs to what hasRestriction denotes. If A is a subClass of this class, then a triple x rdf:type A entails the triple x hasRestriction 2.
The second one, hasRestriction exactly 2, identifies the set of things that have exactly 2 values for the property hasRestriction. So if x belongs to this class, then there are two distinct values v and w such that (x, v) and (x,w) belong to what hasRestriction denotes. If A is a subClass of this class, then a triple x rdf:type A entails the triples x hasRestriction _:v and x hasRestriction _:w and _:v owl:differentFrom _:w (I use a quasi-Turtle syntax here).
The third one, hasRestriction only 2 is a syntax error because if hasRestriction is a datatype property, then you must use a datatype expression after the keyword only. For instance, hasRestriction only xsd:integer.
In the second case, a given individual x in class A may have known values for the property hasRestriction. For instance, there could be the triples x rdf:type A, x hasRestriction 1, x hasRestriction 2, in which case, we know that x exactly has 1 and 2 as values for hasRestriction. If, additionally, we know that x hasRestriction 3, then there is a contradiction, because 1, 2 and 3 are three distinct values, while the expression tells us that there must be exactly two.

Related

read OWL 2 Axiom in plain english

I am trying to understand the following axioms of OWL 2 but don't know what kind of axioms they are. here R is role and C is class
∃R ⊑ C
∃R ⊑ ∃R.C
C ⊑ ¬∃R
∃R ⊑ ¬C
As far i think 1 gives information about Range of R,but i am not sure. Thanks
The only way to make sense of these axioms is to understand the semantics of the Description Logic constructors used:
∃R is the short form of ∃R.T (where T refers to the top concept which represents the complete domain). Mathematically
(∃R.T)^I = {x ∈ δ^I | A y exists such that (x, y) ∈ R^I and y ∈ T^I}
This states that ∃R.T represents the set of individuals consisting of x such that x is associated via relation R to at least 1 individual y that is in top (the domain of discourse). If we had ∃R.C rather than T, y will be in C.
C ⊑ D states that all individuals of type C are also of type D. That is C is a subset of D.
∃R ⊑ C means all the individuals linked to at least 1 individual via relation R is a subset of C. That is why ∃R ⊑ C is also known as a domain axiom because it enforces that for all relations (x, y) in R, that x will be of type C.
¬C defines all the individuals that are not of type C in the domain of interpretation.
Going through the rest of these axioms in a similar way will help you to understand their meaning.

How do deal with combined entity types when computing the closure of a set of attributes

I'm revising for coming exams, and I am having trouble understanding an example question regarding the closure of attributes. Here is the problem:
AB→C
BE→I
E→C
CI→D
Find the closure of the set of attributes BE, explaining each step.
I've found many explanations of the method of closure when the given step is a single entity type, say 'C', using Armstrong axioms, but I don't understand how to answer for 'BE'.
First, you are confusing two very different things, attributes and entity types. Briefly, entity types are used to describe the real world entities that are modelled in a database schema. Attributes describe facts about such entities. For instance an entity type Person could have as attributes Family Name, Date of Birth, etc.
So the question is how to compute the closure of a set of attributes. You can apply the Armstrong’s axioms, trying at each step to apply one of them, until possible, but you can also simplify the computation by using the following, very simple, algorithm (and if you google "algorithm closure set attributes" you find a lot of descriptions of it):
We want to find X+, the closure of the set of attributes X.
To find it, first assign X to X+.
Then repeat the following while X+ changes:
If there is a functional dependency W → V such as W ⊆ X+ and V ⊈ X+,
unite V to X+.
So in your case, given:
AB → C
BE → I
E → C
CI → D
to compute BE+ we can procede in this way:
1. BE+ = BE
2. BE+ = BEI (because of BE → I)
3. BE+ = BEIC (because of E → C)
4. BE+ = BEICD (because of CI → D)
No other dependency can be used to modify BE+, so the algorithm terminates and the result is BCDEI. In terms of Armstrong’ axioms, the step 1 is due to Reflexivity, while the steps 2 to 4 are due to a combination of Transitivity and Augmentation.

OWL-DL; determining if an expression is legal

In SHOIN(D) that is equivalent to the DL family used by OWL-DL;
Is this expression legal:
F ⊑ (≤1 r. D) ⊓ (¬ (=0 r. D))
Where F, D are concepts, r is a role. I want to express that each instance of F is related to at most one instance of D through r, and not to zero instances.
In general, how to decide that some expression is legal w. r. t. a specific variation of DL? I thought that using BNF syntax of the variation may be what I'm targeting.
One easy way is to check whether you can write it in Protege. Most of the things that you can write in Protege will be legal OWL-DL. In Protege you can write:
F SubClassOf ((r max 1 D) and not(r exactly 0 D))
Of course, saying that something has at most 1 value, and not exactly one would be exactly the same as saying that it has exactly 1:
F SubClassOf r exactly 1 D
But there are a few things that you'll be able to do in Protege that won't be legal OWL-DL. The more direct way to find out what these are is the standard, specifically §11 Global Restrictions on Axioms in OWL 2 DL. Generally the only problems you might run into is trying to use composite properties where you're not allowed to.
If you don't want to check by hand, then you could try uploading your ontology into the OWL Validator and selecting the OWL2 DL profile.

Meaning of OWL exact cardinality restrictions

I am a newbie coding with the Manchester syntax for OWL. I need to understand the role of exactly. Which of these restrictions is correct:
(hasChild (A or B)) and (hasChild exactly 1 Thing)
(hasChild (A or B)) and (hasChild exactly 2 Thing)
(hasChild (A and B)) and (hasChild exactly 1 Thing)
(hasChild (A and B)) and (hasChild exactly 2 Thing)
Can you explain it when A and B are equivalent, and when they are disjoint?
The meaning of class expressions is defined in section 2.2.3 Class Expressions of the OWL 2 Web Ontology Language Direct Semantics W3C recommendation.
The four class expressions given in the question aren't quite well formed, as I understand the Manchester OWL syntax, as hasChild (A or/and B) really needs to be hasChild some/only (A or/and B). That said, we can still discuss the meaning of the various combinations.
Exact Cardinality Restrictions
The restrictions hasChild exactly 1 Thing and hasChild exactly 2 Thing denote the classes of individuals which are related to exactly one or two other individuals by the hasChild property, respectively. Since the class expression in the restriction is Thing, it is probably more common to see the versions without a class: hasChild exactly 1 and hasChild exactly 2.
Universal or AllValuesFrom Restrictions
The expression hasChild only X denotes the class of individuals which are such that if they are related to any other individual by the hasChild property, then the other individual is an instance of X. It does not impose any constraint that there are such individuals, but only that if there are any, then they must be Xs.
Existential or SomeValuesFrom Restrictions
The expression hasChild some X denotes the class of individuals which are related to at least one other individual that is an X by the hasChild property. It does not impose any constraint that every other individual related by the hasChild is an X, just that at least one is.
The meaning of the expressions
The class expressions in the problem aren't well formed at the moment, and should either be hasChild some (A or/and B) or hasChild only (A or/and B). This means that there are a number of cases to consider, but fortunately some of them condense down.
If A and B are equivalent
If A and B are equivalent, then both (A or B) and (A and B) are equivalent to A and to B. This means that the expressions in the question can be simplified into two cases, depending on whether the restriction on the left hand side should be some or only.
(hasChild some A) and (hasChild exactly 1 Thing)This class expression denotes the class of individuals which are related by the hasChild property to at least one individual of type A, and that are related to exactly one other individual by the hasChild property (and by the left side, that one individual must be that individual of type A).
(hasChild some A) and (hasChild exactly 2 Thing)This class expression denotes the class of individuals which are related by the hasChild property to at least one individual of type A, and that are related to exactly two individuals by the hasChild property (and by the left side, one of these individuals must that individual of type A).
(hasChild only A) and (hasChild exactly 1 Thing)This class expression denotes the class of individuals which are related by the hasChild property only to individuals of type A, and that are related to exactly one other individual by the hasChild property (and by the left side, that one individual must be of type A).
(hasChild only A) and (hasChild exactly 2 Thing)This class expression denotes the class of individuals which are related by the hasChild property to some individual of type A, and that are related to exactly two individuals by the hasChild property (and by the left side, both of these individuals must that individual of type A).
If A and B are disjoint
If A and B are disjoint, then the class expression A and B denotes the empty class, since nothing can be both an A and a B. That means that that four of the cases are unsatisfiable.
The cases that involve hasChild some (A and B) are unsatisfiable, because there are no A and Bs for anything to be related to. There are two such cases:
(hasChild some (A and B)) and (hasChild exactly 1 Thing)
(hasChild some (A and B)) and (hasChild exactly 2 Thing)
The combination of only (A and B) and exactly n is unsatisfiable, since (as long as n is not 0), it says that an individual must be related to exactly n things, and that each of those n things must be an A and B (of which there can be none. There are two such cases:
(hasChild only (A and B)) and (hasChild exactly 1 Thing)
(hasChild only (A and B)) and (hasChild exactly 2 Thing)
The remaining cases are all fairly straightforward, given the meaning of some and only. Though there are four class expressions, there are only two distinct classes.
(hasChild only (A or B)) and (hasChild exactly 1 Thing)
(hasChild some (A or B)) and (hasChild exactly 1 Thing)
This is the class of things that have exactly one child, which must be an A or a B.
(hasChild only (A or B)) and (hasChild exactly 2 Thing)
(hasChild some (A or B)) and (hasChild exactly 2 Thing)
This is the class of things that have exactly two children, each of which must be an A or a B.

Dependency Theory

I have:
U-> PT….. 1
Q-> SU……2
etc...
in using the reflexivity axiom can I then say
Q-> S , Q-> U
Q-> PT
I trying to ask how this axiom works using the example above.
To derive
Q->S
Q->U
from
Q->SU
I'd use the decomposition rule, not the reflexivity axiom. Then I'd apply the transitivity axiom to Q->U, U->PT to derive Q->PT.
If you're asking what the reflexivity axiom means, it means
If Y is a subset of X, then X->Y.
In your example, it looks like you might be trying to say that
SU is a subset of Q, therefore Q->S and Q->U.
But it's not given that SU is a subset of Q. To make sure you get this point, Q->SU doesn't mean SU is a subset of Q.
For example, if you're in the military, your last name and blood type (among other things) are functionally dependent on your service number. Let's let the service number attribute be represented by "S", last name by "L", and blood type by "B". Then
S->LB
But neither "last name" nor "blood type" are subsets of "service number".
On the other hand, let's imagine that you're given this to start with.
U->PT
Q->SU
Q = {SUV} (New information!)
Since Q={SUV}, {S} is a subset of {SUV}, and {U} is a subset of {SUV}, then you can apply the reflexivity axiom to derive
Q->S (or SUV->S)
Q->U (or SUV->U)
But that axiom only applies in this example because you're given Q={SUV}.

Resources