W3C home > Mailing lists > Public > semantic-web@w3.org > March 2018

Re: rdfs:subClassOf and XSD derivation by restriction

From: Peter F. Patel-Schneider <pfpschneider@gmail.com>
Date: Sat, 3 Mar 2018 12:20:14 -0800
To: Richard Smith <richard@ex-parrot.com>, semantic-web@w3.org
Message-ID: <aa67284b-07c7-3b3b-afba-ba4f97ebb536@gmail.com>
You are correct that RDFS subclass inferencing wrt instances is one way 
only, i.e., if C rdfs:subClassOf D then instances of C are also 
instances of D but if all instances of C are also instances of D then it 
is not necessarily the case that C rdfs:subClassOf D.

So what subclass relationships can be inferred in RDFS? This is 
specified in https://www.w3.org/TR/rdf11-mt/#rdfs-interpretations where 
you get all classes are subclasses of rdfs:Resource, subclass is 
reflexive on classes and transitive, datatypes are subclasses of 
rdfs:Literal, the container classes are subclasses of rdfs:Container, 
rdfs:ContainerMembershipPropery is a subclass of rdf:Property, and 
rdfs:Datatype is a subclass of rdfs:Class. That's it.

So even with it being the case that all integers are decimals in XML 
Schema Datatypes, RDFS does not require that xsd:integer is a subclass 
of xsd:decimal, even for RDFS processors that recognize both these 
datatypes.

Of course, there is nothing wrong in adding xsd:integer rdfs:subClassOf 
xsd:decimal to any of your RDF graphs. That's not going to infer 
anything false. It's also not wrong to have an RDFS processor that 
implements a semantic extension that augments subclass so that X 
rdfs:subClassOf Y for X and Y recognized datatypes when X is somehow a 
subdatatype of Y. Just be aware that this is an extension to RDFS, and, 
as well, there might be similar but not completely compatible semantic 
extensions implemented in other RDFS processors.

peter



On 3/2/18 12:07 PM, Richard Smith wrote:
>
> Suppose I have two XML Schema simple types that are suitable for use 
> with RDF, one of which is derived by restriction from the other. A 
> simple example might be xsd:integer which is derived from xsd:decimal.
>
> These are both datatypes in RDF, that is, we can say:
>
>  xsd:decimal a rdfs:Datatype .
>  xsd:integer a rdfs:Datatype .
>
> And RDF Schmea tells us that all instances of rdfs:Datatypes are 
> subclasses of rdfs:Literal, so:
>
>  xsd:decimal rdfs:subClassOf rdfs:Literal .
>  xsd:integer rdfs:subClassOf rdfs:Literal .
>
> My question is this: can I use the fact that the xsd:integer simple 
> type derives by restriction from xsd:decimal to say that there is a 
> rdfs:subClassOf relation between them? I.e. is the following true?
>
>  xsd:integer rdfs:subClassOf rdfs:decimal .
>
> Intuitively it seems like it ought to be, but I'm struggling to find 
> chapter and verse saying this is so.
>
> The examples in 7.2.1 of RDF 1.1 Semantics tells us that any valid 
> statement of the form
>
>  ex:a ex:p "sss"^^xsd:decimal .
>
> D-entails
>
>  ex:a ex:p "sss"^^xsd:integer .
>
> And 2 of RDF Schema 1.1 says "If a class C is a subclass of a class 
> C', then all instances of C will also be instances of C'", but it does 
> not say the converse is true. All instances of xsd:integer are also 
> instances of xsd:decimal, but can we say xsd:integer is a subclass of 
> xsd:decimal?
>
> Richard
Received on Sunday, 4 March 2018 14:41:52 UTC

This archive was generated by hypermail 2.3.1 : Sunday, 4 March 2018 14:42:00 UTC