Reputation: 119
I have two properties
The range of both is Competition and the domain is not restricted to any class. I want to restrict the model as follows:
Appreciate any suggestions.
Upvotes: 0
Views: 216
Reputation: 85813
To win (hasWon) a competition one must qualify to (hasQualifiedTo) a competition. How to do it in Protege and how to express it in DL syntax?
There are at least two ways of interpreting this. Do you mean (a) that to win a competition, one must qualify to a competition, but not necessarily the same one; or (b) that to win a competition, one must qualify to that same competition. (b) is actually a bit easier; (a) is more complex.
If the competitions must be the same, then you're saying that
hasWon(x,y) → hasQualifiedTo(x,y)
That's a subproperty axiom, typically written as
hasWon ⊑ hasQualifiedTo
You can do this easily in Protege:
Since the range of both is already Competition, you can be sure that if someone has won something, then that something was a competition. Now you also want to say that whatever won the competition must also have qualified for some competition. That's a domain axiom. You can simply add the class (hasQualifiedTo some Competition) as a domain of hasWon. Then you can infer that if something won a competition, then it also qualified to some competition. I don't know that there's a perfectly standard way of expressing domains and ranges in DL syntax, but you could say that the domain of a property P is D with an axiom like:
⊤ ⊑ ∀ P-1.D
This says that every X (i.e., every element of ⊤) is such that if P-1(X,Y) (which means that P(Y,X)), then Y ∈ D. That means that every subject in a P(subject,object) assertion must be an element of D. So, in the present case, we'd have:
⊤ ⊑ ∀ hasWon-1.(∃ hasQualifiedTo)
In plain English, if someone won something, then they also qualified to something (but not necessarily the same something). Here's what it looks like in Protege, and in the resulting ontology (which you can download and open in Protege).
@prefix : <http://www.semanticweb.org/taylorj/ontologies/2015/4/untitled-ontology-39#> .
@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#> .
:Competition a owl:Class .
:qualified a owl:ObjectProperty ;
rdfs:range :Competition .
:won a owl:ObjectProperty ;
rdfs:domain [ a owl:Restriction ;
owl:onProperty :qualified ;
owl:someValuesFrom :Competition
] ;
rdfs:range :Competition .
Upvotes: 1