Re: CWM Bug: Don't Canonicalise Lists

Sean,

Well,   the situation is analogous with the simpler:

"Morgan" a BrotherName; is name of [ is sibling of John ].

"Morgan" a SisterName; is name of [ is sibling of John ].

An axiom is that "Morgan" === "Morgan" wherever it appears.  Strings  
don't have gender, charm etc.
CWM makes the same assumption about   ( "Morgan" "Kris" ).

Basically, lists of literals are like literals.  Formulas too, work  
like that.
Their identity is their value.  Variables of course make things more  
complicated.

Just as if can say

	7 a Prime.

It applies to any 7, if you say   (7 3) a MutallyPrimePair it applies  
to any (7 3).

I am loth to do it differently.
In practice, you can make a sisternames have a list instead of being  
one, of course.

Tim

> John sibling [
>   name [ a BrotherName;
>           == "Morgan";
>           ]



On 2007-11 -23, at 10:39, Sean B. Palmer wrote:

>
> On Oct 15, 2007 2:07 PM, Yosi Scharf <syosi@mit.edu> wrote:
>
>> This shows what list canonicalization does. I'm not so sure it
>> is an argument to remove it.
>
> I finally worked out an example where it matters: in subclassing
> rdf:List to come up with your own containers to which you might attach
> various semantics. People have asked for this kind of thing on #swig
> before, and it just came up in a JSON project I'm working on which is
> how I figured it out.
>
> Here's an example:
>
> $ cat siblings.n3
> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
> @prefix list: <http://www.w3.org/2000/10/swap/list#> .
> @keywords a .
>
> John siblings [
>   names [ a BrotherNames;
>           rdf:first "Morgan";
>           rdf:rest ("Kris" "Kerry") ]
> ] .
>
> Jane siblings [
>   names [ a SisterNames;
>           rdf:first "Morgan";
>           rdf:rest ("Kris" "Kerry") ]
> ] .
>
> { ?list a BrotherNames } => { ?list a List } .
> { ?list a SisterNames } => { ?list a List } .
> { ?element list:in ?list . ?list a List }
>   => { ?list member ?element } .
>
> { ?person siblings [ names [ a SisterNames; member ?name ] ] }
>   => { ?person sisterName ?name } .
>
> { ?person siblings [ names [ a BrotherNames; member ?name ] ] }
>   => { ?person brotherName ?name } .
>
> $ cwm siblings.n3 --think
>
> Gives in part:
>
>    :John     :brotherName "Kerry",
>                "Kris",
>                "Morgan";
>         :siblings  [
>             :names  (
>            "Morgan"
>            "Kris"
>            "Kerry" ) ];
>         :sisterName "Kerry",
>                "Kris",
>                "Morgan" .
>
> Which is wrong. John doesn't have any sisters, and yet the model of
> the input is fine. The problem is caused by CWM canonicalising lists
> and having no way to turn it off.
>
> -- 
> Sean B. Palmer, http://inamidst.com/sbp/

Received on Friday, 23 November 2007 19:03:39 UTC