W3C home > Mailing lists > Public > public-cwm-talk@w3.org > July to September 2004

Re: Notation for sets in n3

From: Jos De_Roo <jos.deroo@agfa.com>
Date: Tue, 3 Aug 2004 21:32:00 +0200
To: "Sandro Hawke <sandro" <sandro@w3.org>
Cc: public-cwm-talk@w3.org, Yosi Scharf <syosi@mit.edu>, Tim Berners-Lee <timbl@w3.org>
Message-ID: <OFC28476E5.998C9721-ONC1256EE5.006992A9-C1256EE5.006B46EB@agfa.com>

Hi, Sandro

Dunno about the actual semantics of { <a>, <b> }
and we actually parse
  { :a, :b, :c } a math:Set.
wrongly in our running code as
  {:a , :b. :a , :c} a math:Set.
but that could be fixed :)


Would the semantics of the N3 set with elements :a :b and :c
sanction the entailment of

  math:Set rdfs:subClassOf rdf:Bag.
  [ a math:Set; rdfs:member :a, :b, :c ].

you think??


-- 
Jos De Roo, AGFA http://www.agfa.com/w3c/jdroo/




Sandro Hawke <sandro@w3.org>
Sent by: public-cwm-talk-request@w3.org
03/08/2004 04:56

 
        To:     Tim Berners-Lee <timbl@w3.org>
        cc:     Yosi Scharf <syosi@mit.edu>, public-cwm-talk@w3.org
        Subject:        Re: Notation for sets in n3



>
> How about adding at least one comma to a list syntax to give set
> syntax, so that the same punctuation is used for lists.  The comma
> could be thought of as adding unorderedness.  (The other use of a comma
> occurs in RDF statements with multiple objects - and the objects are of
> course nor ordered)
>
>   (,)  The null set
> (  :a  ,)  The set with  only :a in it
> ( :a, :b, :c)  The set with :a , :b and :c in it

That's rather elegant.  I'd suggest a semicolon intead of a comma,
though, since so many list syntaxes (everything I can think of other
than LISP and n3) use commas.   Another option is "|".    The mnemonic
for me comes mostly from semi-colon being Prolog's "or", and a set is
kind of vaguely a little like an alternation.  :-)

What's the current n3 meaning of { <a>, <b> }?  Is that something
really useful?  I like { } for sets (since that's what I learn in my
math classes) and formulas are very similar to sets of triples.

-- sandro
Received on Tuesday, 3 August 2004 15:32:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:11:01 GMT