Jordan
Jordan

Reputation: 57

Is an rdfs:Literal "x" an rdfs:Resource of rdf:value "x"?

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

Answers (2)

Jordan
Jordan

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.

  1. RDF 1.1 Concepts and Abstract Syntax states that "Any IRI or literal denotes something in the world (the 'universe of discourse'). These things are called resources."
  2. RDF 1.1 Concepts and Abstract Syntax states that "A literal in an RDF graph consists of two or three elements: a lexical form (...), a datatype IRI (...), a non-empty language tag (...)".
  3. RDF 1.1 Concepts and Abstract Syntax states: "The resource denoted by an IRI is also called its referent."
  4. It similarly states about Literals the difference between the literal and its value.
  5. It also states: "Unlike IRIs and literals, blank nodes do not identify specific resources. Statements involving blank nodes say that something with the given relationships exists, without explicitly naming it." More precisely, RDF 1.1 Semantics states that "Blank nodes are treated as simply indicating the existence of a thing, without using an IRI to identify any particular thing."
  6. RDF 1.1 Concepts and Abstract Syntax also states that Blank Nodes are disjoint from IRIs and Literals.

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:

  1. 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.)
  2. 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

Jordan
Jordan

Reputation: 57

This is the most definite answer I was able to come up with:

  1. The Formal Model for RDF states that "1. There is a set called Resources." and "2. There is a set called Literals." but states nothing regarding the relationship between those two sets. In particular Literals could well be a subset a Resources.
  2. The Formal Model for RDF states that "4. There is a set called Statements, each element of which is a triple of the form {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)."
  3. The RDF Schema 1.1 states that "All things described by RDF are called resources, and are instances of the class rdfs:Resource". Therefore the set called Resources in the formal model and rdfs:Resource are the same thing.
  4. The RDF Schema 1.1 states that rdf:object "is used to state the object of a statement" and that its range is rdfs:Resource.
  5. It was stated in the second point that every 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.)
  6. Consistently with everything stated above, the RDF Schema 1.1 states that the range of rdf:value is also rdfs:Resource.
  7. As mentioned in OP, the RDF 1.1 Semantics states that "if S contains 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.
  8. The RDF Schema 1.1 states that "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

Related Questions