W3C home > Mailing lists > Public > semantic-web@w3.org > February 2010

Re: how to define that a relation is a dataype?

From: Story Henry <henry.story@bblfish.net>
Date: Mon, 22 Feb 2010 22:30:53 +0100
Cc: Dan Connolly <connolly@w3.org>, Jeremy Carroll <jeremy@topquadrant.com>, Semantic Web <semantic-web@w3.org>, foaf-protocols@lists.foaf-project.org
Message-Id: <2997CD55-869B-4652-94D2-275D6EB325E6@bblfish.net>
To: Pat Hayes <phayes@ihmc.us>

On 22 Feb 2010, at 21:56, Pat Hayes wrote:

> Is it really all that complicated? Here is a summary of typed literals. A datatype URI identifies a mapping from strings to values. The value of the typed literal "string"^^dtype is the value of the mapping applied to the string: in normal mathematical notation, it is just  dtype(string).
> 
>> So now I am reading through the rdf-semantics specification. Its interesting, but it does seem somehow overly complicated.
> 
> Its complicated largely because it has to work for *any* datatype or set of datatypes. But the heart of it is what I said just above.

yes, I want to understand how you get out of the problem of xsd:integer being both a relation and a set. I need to understand this clearly, or I won't be satisfied :-) 

>> (Still need to come to a conclusion)
>> 
>> Now literals as relations make a lot of sense. That is why I'd like to understand the relation between literal types and relations. It seems that the following is true
>> 
>> { bgt euro "1.2"^^xsd:float } => { bgt euro "1.2"^[ is xsd:float of] }
>> It would be really great if one could come to some generalised conclusion on this.
> 
> I don't understand your notation here. I guess [is FOO of] means the property of a value which gives the string representation of that value under the FOO convention, so that "1A" is hex of 26 . (??)  

No, sorry to introduce this here.

> If that is right, then your suggested entailment seems wrong, above. But this would be OK:

It's a useful N3 trick to get inverses of properties.

{ ?a ?r ?b } <=> { ?b is ?r of ?a .}

also 

{ ?a ?r ?b^?t } <=> { ?a ?r [ ?t ?b ] }

ie

harry loves jane^mother .
=>
harry loves [ mother jane ].

(not to be confused with 
  harry loves jane.mother 
http://www.w3.org/2000/10/swap/doc/Shortcuts )

so all I meant to say was

bgt euro "1.2"^^xsd:float .

=>

bgt euro [ is xsd:float of "1.2" ] .

=>

bgt euro _:e .
"1.2" xsd:float _:e .

OR I could have defined the inverse of xsd:float

xxx:floatInv owl:inverseOf xsd:float .

then it would be clearer

bgt euro "1.2"^^xsd:float .

=>

bgt euro "1.2"^xxx:floatInv .

=>

bgt euro [ xxx:floatInv "1.2" ] .

which is what you were thinking.


> bgt euro "1.2"^^xsd:float .
> 
> =>
> 
> bgt euro _:x .
> "1.2" is xsd:float of _:x .

the things got inverted somwhere.

> and this pattern generalizes, of course. However, this has a literal subject, so its not legal RDF. Whereas this
> 
> bgt euro _:x .
> _:x  xsd:float "1.2" .
> 

yes, and it's what DanC was thinking was a good way of thinking of xsd:float, but you were thinking was not. I was trying to go in your direction here. :-)

> is legal RDF :-)
> 
> Hope this helps.

Sorry for the quick course into N3 shortcuts. 
I liked them because they do make the relation between literals and properties very clear.

Henry

> 
> Pat
Received on Monday, 22 February 2010 21:31:32 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 21:45:34 GMT