Reputation: 57
The W3C Recommendation RDF 1.1 Semantics states that if an RDF graph S contains
ex:xxx ex:aaa "sss"^^ex:ddd .
for ex:ddd in D, then S entails, recognizing D,
ex:xxx ex:aaa _:nnn .
_:nnn rdf:type ex:ddd .
Given RDFS entailment patterns.
Can we also say that it entails
ex:xxx ex:aaa _:nnn .
_:nnn rdf:value "sss" ;
rdf:type ex:ddd .
?
[Edit to reflect on the comment.]
If not, why? How could "sss"^^ex:ddd
imply _:a rdf:type ex:ddd .
and not _:a rdf:value "sss"; rdf:type ex:ddd .
? Does it really need to be an entailment pattern? Isn't it enough that rdf:value
denotes the value of the resource? Isn't it implied that if "sss"^^ex:ddd
allows us to say "Oh, there's a resource of type ex:ddd!" then we can also state its value?
[End of edit]
And if it is, does this
ex:a ex:p [ rdf:value "1" ; rdf:type xsd:integer ] .
Entails this
ex:a ex:p "1"^^xsd:integer .
?
I cannot find any rule backing this up, but it makes intuitive sense to me that somehow "sss"^^ex:ddd
is logically equivalent to _:a rdf:value "sss"; rdf:type ex:ddd .
I think my question is equivalent to this one: is an rdfs:Literal "x" a rdfs:Resource of rdf:value "x"?
Upvotes: 3
Views: 555
Reputation: 57
This is an even more definite answer I was able to come up with. It clarifies some misconceptions I had when I came up with the previous answer.
In other words: a resource can be named (with an IRI), can be shown (with a literal representing it), or its existence can be stated without naming it nor showing it (thanks to blank nodes).
In standard RDF, Statements' subjects can only be IRIs or Blank Nodes. Therefore the only possible way to to talk about a resource that is not named (no IRI) is to use a blank node (existential variable). RDF gives us an idiomatic construction to do so: _:nnn rdf:value "sss"
(see RDF Schema 1.1 section 5.4.3). This reads: "there exists a resource, the value of which is the value denoted by 'sss'."
Therefore, ex:xxx ex:aaa "sss"^^ex:ddd .
can be rewritten ex:xxx ex:aaa _:nnn . _:nnn rdf:value "sss"^^ex:ddd .
without needing any entailment pattern, because it is not so much a logical conclusion than a grammatical equivalence. (For such a simple case it is obviously of no use and more confusing than clarifying.)
Therefore it makes sense that ex:xxx ex:aaa "sss"^^ex:ddd .
entails ex:xxx ex:aaa _:nnn . _:nnn rdf:type ex:ddd .
, because here it is the same _:nnn
as before. If it wasn't the case, the entailement would only be _:nnn rdf:type ex:ddd .
and not ex:xxx ex:aaa _:nnn . _:nnn rdf:type ex:ddd .
.
In generalized RDF we can use a literal as a subject. Aptly, it defines a generalized entailment pattern stating that ex:xxx ex:aaa "sss"^^ex:ddd .
entails "sss"^^ex:ddd rdf:type ex:ddd .
, which is consistent with the explanation given.
But the confusing thing is the difference between the resource and the "handle" we use to talk about it (IRI versus its referent, literal (2 or 3 components) versus literal value, existential variable). One could argue that the thing the type of which is ex:ddd
is the literal, and not the literal value itself. (See RDF 1.1 Concepts and Abstract Syntax for the difference between the literal and its value.) But then again, if _:nnn
stated the existence of the literal in this exemple, it wouldn't be the object of the triple ex:xxx ex:aaa _:nnn .
. (Note: if we want to talk about the lexical form itself (which is a thing we may want to talk about, and therefore is a resource), we have no other choice than using a blank node (existential value), even in generalized RDF or giving it an IRI. Plus: the datatype is not the rdf:type
of the lexical form, but only a component of the literal (composed of the lexical form and the datatype and maybe a language tag).)
Thankfully, RDF 1.1 Semantics states: "the semantic conditions on RDF interpretations, together with the RDFS conditions on ICEXT, mean that every recognized datatype can be treated as a class whose extension is the value space of the datatype, and every literal with that datatype either fails to refer, or refers to a value in that class." In other words, while it is true to say that ex:ddd
is the datatype of the literal "sss"^^ex:ddd
, it is also true to say that ex:ddd
is the class of the literal value denoted by "sss"^^ex:ddd
.
So to answer the OP:
ex:xxx ex:aaa "sss"^^ex:ddd .
and ex:xxx ex:aaa [ rdf:value "sss"^^ex:ddd ; rdf:type ex:ddd ] .
are equivalent by a mix of entailment pattern and grammatical equivalence. (Beware of the datatype "^^ex:ddd
" that has been ommitted in the OP.)ex:a ex:p [ rdf:value "1" ; rdf:type xsd:integer ] .
doesn't entail ex:a ex:p "1"^^xsd:integer .
but ex:a ex:p [ rdf:value "1"^^xsd:integer ; rdf:type xsd:integer ] .
should (the datatype was ommitted).Upvotes: 0
Reputation: 57
This is the most definite answer I was able to come up with:
{pred, sub, obj}
Where pred is a property (member of Properties), sub is a resource (member of Resources), and obj is either a resource or a literal (member of Literals)."rdfs:Resource
". Therefore the set called Resources in the formal model and rdfs:Resource
are the same thing.rdf:object
"is used to state the object of a statement" and that its range is rdfs:Resource
.rdf:object
of an rdf:Statement
may be an RDF Literal. Therefore the fourth point above implies that the set of RDF Literals is indeed a subset of RDF Resources, that is by the third point: rdfs:Resource
. (And this is consistent with this answer.)rdf:value
is also rdfs:Resource
.xxx aaa "sss"^^ddd .
for ddd in D then S RDF entails, recognizing D, xxx aaa _:nnn . _:nnn rdf:type ddd .
" Which means: "if the rdfs:Resource
xxx is linked to the RDF Literal "sss"^^ex:ddd, then we can say that xxx is linked to an rdfs:Resource
the rdf:type
of which is ex:ddd". This makes sense to say that there is an rdfs:Resource
of this rdf:type
because we known now as a fact that "sss"^^ddd (a RDF Literal) is indeed an rdfs:Resource
.rdf:value
[...] may be used in describing structured values", which is exactly what we do when we apply this entailment regime.Therefore, while it is written nowhere explicitly that "sss"^^ex:ddd
is logically equivalent to _:a rdf:value "sss"^^ex:ddd; rdf:type ex:ddd .
, I think that we can confidently say that it is. This is entirely consistent with every source I cited. RDF Schema 1.1 states that "rdf:value
has no meaning on its own" and is "provided as a piece of vocabulary that may be used in idioms such as illustrated". In other words, it's only another way of saying the same thing.
My conclusion is that we can say "sss"^^ex:ddd
implies _:a rdf:value "sss"^^ex:ddd; rdf:type ex:ddd .
and conversely _:a
is precisely "sss"^^ex:ddd
.
Upvotes: 0