Re: Combined Inverse Functional Properties

Thanks. That's perfect. That has helped me both learn N3 and is a nice 
solution.
All we need is to generalize this to CIFPs of any size and we have a 
really useful concept, ready to go up on the wiki :-)

Henry Story

On 15 Feb 2005, at 14:35, jos.deroo@agfa.com wrote:
> Hi, Dan
>
> I did just a 5 min test with Cwm and Euler :)
>
> given data
>
> :a :r1 :b.
> :a :r2 :c.
> :g :r1 :b.
> :g :r2 :c.
> :p :cifp (:r1 :r2).
>
>
> and some rules capturing only cases for 1, 2 and 3 cifp properties
>
> {?C :cifp ?L.
>  ?L rdf:first ?P;
>     rdf:rest rdf:nil.
>  ?A ?P ?X.
>  ?B ?P ?X}
>  =>
> {?A owl:sameAs ?B}.
>
> {?C :cifp ?L.
>  ?L rdf:first ?P;
>     rdf:rest ?M.
>  ?M rdf:first ?Q;
>     rdf:rest rdf:nil.
>  ?A ?P ?X;
>     ?Q ?Y.
>  ?B ?P ?X;
>     ?Q ?Y}
>  =>
> {?A owl:sameAs ?B}.
>
> {?C :cifp ?L.
>  ?L rdf:first ?P;
>     rdf:rest ?M.
>  ?M rdf:first ?Q;
>     rdf:rest ?N.
>  ?N rdf:first ?R;
>     rdf:rest rdf:nil.
>  ?A ?P ?X;
>     ?Q ?Y;
>     ?R ?Z.
>  ?B ?P ?X;
>     ?Q ?Y;
>     ?R ?Z}
>  =>
> {?A owl:sameAs ?B}.
>
>
> the N3QL query
>
> [] q:select {?X owl:sameAs ?Y}; q:where {?X owl:sameAs ?Y}.
>
> gave us
>
> :a owl:sameAs :a.
> :a owl:sameAs :g.
> :g owl:sameAs :a.
> :g owl:sameAs :g.
>

Received on Tuesday, 15 February 2005 14:51:28 UTC