# Re: Equality Re: Blank Nodes Re: Toward easier RDF: a proposal

```On 11/29/18 8:19 AM, William Waites wrote:
>> Do joe and monica have the *same* address? If we know that those attributes form
>> a composite key, then the answer is yes.  Otherwise, the answer is no.
>
> I don’t think that blank nodes are actually at issue here. Consider:
>
>      A a ComplexNumber; real 1; imag 4.
>      B a ComplexNumber; real 1; imag 4.
>
> This is much simpler and better defined than street addresses, doesn’t use blank
> nodes, and yet still we would want to conclude that A = B. They are equal in that
> their meanings are the same but they are not the same in that they have different
> names.

Agreed.  It is the same issue, whether A and B are URIs or blank nodes:
if we know that their properties constitute a (composite) key then we
can logically conclude that they identify the same thing; otherwise we
cannot.  This is independent of whether those things are intended to
represent the mathematical notion of complex numbers.

>
>     C a Length; value 10; unit cm.
>     D a Length; value 3.94; unit in.
>
> Those also have the same meaning but now the graph labels are different so you
> can’t say “graph isomorphism” or (possibly better) “bisimulation”.

Given additional information (that 1 inch = 2.54 cm) one could conclude
that those lengths are *almost* the same (because 3.94 in = 10.0076 cm),
but even if the lengths were exactly equal, we still could not logically
conclude that C and D identify the same thing unless: (a) we know that
"value" is an inverse functional (key) property within Length objects;
or (b) we have some additional inference rules that are specific to
Length objects.

>
> This is kind of the complement to Hugh's Colliding Kardashians. Here you can
> synthetically construct alternative URIs for C and D from the properties and get
> something distinct. It still doesn’t help the problem of deciding if they are equal
> or if they are the same.
>
> I was in America recently and had brought some small art prints from Europe. The
> picture was 25cm x 25cm. I stood by helplessly as a slightly eccentric picture framer
> measured them with an inch ruler and muttered to himself about complicated and
> unusual fractions of an inch. He did a good job in the end, but it would have been
> easier using the right units. Being easier is a relevant difference so maybe C and D
> aren’t the same after all, despite being equal.
>
> Maybe sameness depends on the query context at least as much as the data
> context. Things can be the same — relevantly similar — for one purpose and
> different for another. For answering queries, you need to pick which notions of
> equality you want to use. And at query time you have to close the world because
> you can only make answers from the information that you have.
>
> It seems to me that the appropriate notion of equality can be different according
> to the type of the entity. This must simply be defined by the person who defines
> the type. It would be nice to provide a sensible default equality for when we don’t
> have a more specialised one.

I would be wary of trying to go beyond inferring shared identity from
keys (inverse functional properties), because I think it would open up a
can of worms.  OTOH, SPARQL does define some data coercion rules for
FILTER evaluation:
https://www.w3.org/TR/sparql11-query/#evaluation

David Booth
```

Received on Thursday, 29 November 2018 16:52:30 UTC