jaco0646
jaco0646

Reputation: 17164

OWL intersection vs union

Given the following triples, are the domain and range a union or intersection or something else?

<http://www.stackoverflow.com/questions/ask> rdfs:domain <http://stackoverflow.com/questions/tagged/rdf> .
<http://www.stackoverflow.com/questions/ask> rdfs:domain <http://stackoverflow.com/questions/tagged/owl> .
<http://www.stackoverflow.com/questions/ask> rdfs:domain <https://www.w3.org/TR/owl-ref/#Boolean> .
<http://www.stackoverflow.com/questions/ask> rdfs:range <http://stackoverflow.com/questions/tagged/rdf> .
<http://www.stackoverflow.com/questions/ask> rdfs:range <http://stackoverflow.com/questions/tagged/owl> .
<http://www.stackoverflow.com/questions/ask> rdfs:range <https://www.w3.org/TR/owl-ref/#Boolean> .


In other words, does the http://www.stackoverflow.com/questions/ask predicate have three domains, three ranges, and any domain-range pairing is valid can be inferred?


Edit: The w3.org documentation for domain and range states:

Where a property P has more than one rdfs:domain property, then the resources denoted by subjects of triples with predicate P are instances of all the classes stated by the rdfs:domain properties.

Where P has more than one rdfs:range property, then the resources denoted by the objects of triples with predicate P are instances of all the classes stated by the rdfs:range properties.

Upvotes: 1

Views: 1476

Answers (1)

Joshua Taylor
Joshua Taylor

Reputation: 85923

You can think of it as intersection, but it's a little bit indirect. When you have a triple

p rdfs:domain C

it means that whenever you have a triple

a p b

you can infer that

a rdf:type C

So, when you have

p rdfs:domain C
p rdfs:domain D
p rdfs:domain E

a p b

you can infer

a rdf:type C
a rdf:type D
a rdf:type E

which is the effect of having declared

p rdfs:domain (C ⊓ D ⊓ E)

Similarly, from p rdfs:range F and a p b we can infer b rdf:type F.

That means that we can answer your final question:

In other words, does the http://www.stackoverflow.com/questions/ask predicate have three domains, three ranges, and any domain-range pairing is valid?

OWL isn't about specifying what's "valid" or not in this regard, it's about specifying what you can infer from other data. If you have:

p rdfs:domain A
p rdfs:domain B
p rdfs:domain C

p rdfs:range D
p rdfs:range E
p rdfs:range F

then from

a p b

you'll be able to infer

a rdf:type A
a rdf:type B
a rdf:type C

b rdf:type D
b rdf:type E
b rdf:type F

Upvotes: 5

Related Questions