# Re: Same Results with Empty Group Pattern

From: Andrew Newman <andrewfnewman@gmail.com>
Date: Tue, 18 Mar 2008 06:37:16 +1000
Message-ID: <2db5a5c40803171337r3a4d7f43nbba545f7a11f4001@mail.gmail.com>

```On 15/03/2008, Seaborne, Andy <andy.seaborne@hp.com> wrote:
> Could it be that there is some confusion in use of {} (SPARQL syntax) is not
>  the same as {} (set notation).
>
>  Section 12.3[1] tries to get his straight.
>
>  """
>  Write ì0 for the mapping such that dom(ì0) is the empty set.
>
>  Write Ù0 for the multiset consisting of exactly the empty mapping ì0, with
>  cardinality 1. This is the join identity.
>  """
>

Sure - that's part of my feedback - the syntax, name and description
in 5.2.1 suggests the empty set but the semantics is the universal
set.

I think something like {{}} or putting something inside the brackets
like T/1/Omega or something would've made it more in line with an
understanding of the syntax to the algebra.

>  (This email is UTF-8 - that's ì/mu and Ù/Omega)
>
>
>   > And defines identities as:
>   > A + 0 = A * U = A
>   > A + U = U
>   > A * 0 = 0
>
>
> Sticking to set-notation
>
>  0 = {}
>  1 = {{}}
>
>  {{}} is the set of one solution, a solution is a set of pairs, in this case
>  the empty set.
>
>  A UNION 0 = A
>  A JOIN 1 = A
>
>  In SPARQL syntax {} are not set markers.  The empty group is defined to have
>  one solution and that solution has no bindings.  So it's {{}} in set terms -
>  that's what is meant by "one solution that does not bind any variables" and is
>  more formally written in 12.3.  It is not the empty set - the set of no
>  solutions which would be the empty relation.
>
>  c.f. 0 = {}, succ(0) = {{}} = 1
>
>  Andrew - if this is not the case, could we work on a concrete example, maybe
>  the one Lee used or was that your understanding.
>

I'm quite happy with Lee's example and what I am saying is it is wrong
with respect to set or bag algebra.  It is also clear that the algebra
is incomplete (and it would help in understanding if it was complete
or at least documented where it's not).

So I'm suggesting:

* Make the empty group pattern act like empty set (as it's the closest
conceptually) and add a new universal group pattern.  Or maybe just
change the syntax, rename it and make the description more clear.

* Define a union identity and maybe make it expressible.

* Complete specifying identities in the SPARQL document.  What does 1
do in respect to UNION?  And possibly 0 in respect to JOIN.  The way I
was able to determine what 1 does with respect to UNION was run ARQ
and the answer (A + 1) wasn't correct at least with respect to set and
relational algebra.  Maybe it's defined in the set of tests (I haven't
checked) but it should be in the document too.  Anyway, it's not clear
why it's different to existing algebras (maybe add that too?).
```
Received on Monday, 17 March 2008 20:37:57 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:52:09 UTC