a theory of rdf:Bags

From: Dan Connolly <connolly@w3.org>
Date: 17 Feb 2002 09:38:21 -0600

Message-Id: <1013960302.19851.65.camel@dirk>
```The traditional meaning of 'bag' is:

If
Bag(?x) and Bag(?y)
and
forall ?z, count(?x, ?z) = count(?y, ?z)
then
?x = ?y.

We can't apply this directly to memebers
of class rdf:Bag, because we would end up with
the corrollary:

rdf:_1(?x) = rdf:_1(?y)
rdf:_2(?x) = rdf:_2(?y)
rdf:_3(?x) = rdf:_3(?y)

and so on; this doesn't work out; for example,
consider
?x = <Fred, Fred, Bob>
?y = <Bob, Fred, Fred>

we'd end up with Fred = Bob, which isn't
what we want.

But consider an asRealBag property that relates
axiom that says there's exactly one for every
rdf:Bag:

for all ?b, if type(?b, rdf:Bag)
then there exists ?b' where
asRealBag(?b, ?b') and type(?b', RealBag) and
forall ?x, if asRealBag(?b, ?x) then ?x = ?b'.

in DAML+OIL terms, asRealBag has cardinality
1 on class rdf:Bag.

Then we define the membership of the real bag
straightforwardly:

if bagMember(?b, ?b') then
forall ?x,
bagMember(?b', ?x) iff
exists ?cmp with
type(?cmp, rdfs:ContainterMembershipProperty)
and ?cmp(?b, ?x)

Hmm... this is of limited utility, due
to the "and that's all!" problem with
rdf container syntax (i.e.
rdfms-seq-representation). There's no
way to tell that something is *not*
in a bag. But maybe we'll fix that someday.

Anyway... then we'd say that for RealBags,

If
RealBag(?x) and RealBag(?y)
and
forall ?z, count(?x, ?z) = count(?y, ?z)
then
?x = ?y.

Now the RealBags can be in the universe
of discourse (my preference), or they can
just be artifacts
in the model theory (replace
the asRealBag property with
a BagEXT ala IEXT and CEXT).

Anyway... that's my idea. I meant to write
it down in RDF/n3, but I haven't gotten
around to it. Maybe Jos will beat me to it. ;-)

Is there code out there that behaves this
way, does anybody know? would it be useful
to specify it sorta like this? Or should
we leave rdf:Bag as just a hint,
ala rdf:Alt?

--
Dan Connolly, W3C http://www.w3.org/People/Connolly/
```
Received on Sunday, 17 February 2002 10:37:51 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:53:55 UTC