I am studying the inference in OWL, currently the downcast of an individual type from its property domain. I've constructed the following example ontology:
@prefix : <http://www.test.org/2015/4/ontology#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@base <http://www.test.org/2015/4/ontology> .
<http://www.test.org/2015/4/ontology> rdf:type owl:Ontology .
:Class1 rdf:type owl:Class .
:Sub1 rdf:type owl:Class ;
rdfs:subClassOf :Class1 .
:Prop1 rdf:type owl:DatatypeProperty ;
rdfs:domain :Sub1 .
:Ind1 rdf:type :Class1 , owl:NamedIndividual ;
:Prop1 "p" .
As expected the reasoner (Pellet in my case) inferred the statement that the :Ind1 is of type :Sub1:
:Ind1 :Prop1 "p"
:Prop1 rdfs:domain :Sub1
=> :Ind1 a :Sub1
Then I added the following definitions:
:Class2 rdf:type owl:Class .
:Sub2 rdf:type owl:Class ;
rdfs:subClassOf :Class2 .
:Prop2 rdf:type owl:DatatypeProperty ;
rdfs:domain [ rdf:type owl:Class ;
owl:unionOf ( :Sub1
:Sub2
)
] .
:Ind2 rdf:type :Class2 , owl:NamedIndividual ;
:Prop2 "p" .
The domain of the property :Prop2 is now either the :Sub1 or the :Sub2.
I expected also in this case that the class :Sub2 is inferred by reasoner as the type of the :Ind2. But it does not occur.
Why can't it be inferred? Where am I wrong?