W3C home > Mailing lists > Public > public-cwm-talk@w3.org > April to June 2006

playing around with N3, OWL, and inconsistency

From: Dan Connolly <connolly@w3.org>
Date: Mon, 08 May 2006 13:32:07 -0500
To: public-cwm-talk@w3.org
Message-Id: <1147113127.22658.82.camel@dirk.w3.org>

In a paper for IRW[urisym], I used N3 to formalize the positions
of various people in a www-tag discussion.

The DCMI schema says, among other things:

  dc:title rdf:type rdf:Property.

and I gave TimBL's position as:

 ?X log:uri [
   str:startsWith "http:";
   str:notMatches "#"
 ] }
 => { ?X a tbl:Document }

  owl:disjointWith tbl:Car, rdf:Property, foaf:Person.

I wrote, "This position is quite clearly inconsistent with
the DCMI schema," which raises the question of what, exactly, I meant
by inconsistent, since N3 doesn't have negation in the traditional

There is a sense of inconsistency that N3 does have, which
is that two things can't both be string:greaterThan
and string:notGreaterThan. This can be defined in terms
of owl:differentFrom a la:

{ ?S ?P ?O1. ?S [ :opposite ?P ] ?O2 } => { ?O1 owl:differentFrom ?O2 }.
{ ?S1 ?P ?O. ?S2 [ :opposite ?P ] ?O } => { ?S1 owl:differentFrom ?S2 }.

then if we have { str:greaterThan :opposite str:notGreaterThan } and

 x str:greaterThan y.
 x str:notGreaterThan y.

we get

    :x owl:differentFrom :x .

which is unsatisfyable w.r.t. the semantics for OWL.

The following rule relates owl:disjointWith to owl:differentFrom:

{ [ is rdf:type of ?X] owl:disjointWith [ is rdf:type of ?Y ]}
 => { ?X owl:differentFrom ?Y }.

I think it actually defines owl:disjointWith in terms of
owl:differentFrom; i.e. I think it follows from the definition
in the OWL spec and the definition in the OWL spec follows from it.
Perhaps not quite. In any case, it's sufficient to get
from TimBL's position and the DCMI position to:

         owl:differentFrom <http://purl.org/dc/elements/1.1/title> .

I went one step meta and wrote the following rule, (using
the nifty new log:supports, by the way...):

{ ?X a PositionStatement; log:semantics ?F.
  ?Y a PositionStatement; log:semantics ?G.
  <owlAx.n3> log:semantics ?OWLSEM.
  (?F ?G ?OWLSEM) log:conjunction [
    log:supports { _:x owl:differentFrom _:x }
} => { ?X inconsistentWith ?Y }.

I put that in http://www.w3.org/2006/04/irw65/argument.n3
along with

 <tbl.n3> a PositionStatement.
 <dc.n3> a PositionStatement.
 <markb.n3> a PositionStatement.

and put the OWL axiom in http://www.w3.org/2006/04/irw65/owlAx.n3

So if you run:

$ python $swap/cwm.py http://www.w3.org/2006/04/irw65/argument.n3
--think --data

then out comes:

    <dc.n3>     a :PositionStatement;
         :inconsistentWith <tbl.n3> .

    <markb.n3>     a :PositionStatement;
         :inconsistentWith <tbl.n3> .

    <tbl.n3>     a :PositionStatement;
         :inconsistentWith <dc.n3>,
                <markb.n3> .

which makes me feel much better about having written
"This position is quite clearly inconsistent with
the DCMI schema." :)

[urisym] http://www.w3.org/2006/04/irw65/urisym.html

Dan Connolly, W3C http://www.w3.org/People/Connolly/
D3C2 887B 0F92 6005 C541  0875 0F91 96DE 6E52 C29E
Received on Monday, 8 May 2006 18:32:12 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:01:05 UTC