Re: Inference in daml

> Sorry, I haven't bothered much the with xml serialization of rdf
> and so always seem to get it wrong when I do use it -- [...]

Me too, which is why I write things in Notation3 [1], and then convert
them over with CWM [2]. It also saves time.

> >       [ :unionOf (:Animal [ :complementOf :Dog ]) ] .
> [...]
> Ultimately I'm trying to express the rule that if something is a dog
> then it is an animal.

Oh, easy:-

   :Dog rdfs:subClassOf :Animal .

Remembering that:-

   type(x, z) :- type(x, y), subClassOf(y, z).

And a full list of rules in English: if x is a dog, it must be an
animal, if x is an animal, then it may or may not be a dog. If x is
not an animal, then it is not a dog, and if x is not a dog it may or
may not be an animal.

I prefer to write out stuff like that in Notation3, because it has
contexts, and then use TimBL's FOL namespace
(http://www.w3.org/2000/10/swap/log#):-

   this log:forAll :x , :Dog , Animal .

   { :Dog rdfs:subClassOf :Animal . :x a :Dog }
   log:implies
   { :x a :Animal } .

   { :Dog rdfs:subClassOf :Animal .
      :x a [ daml:complimentOf :Animal ] }
   log:implies
   { { :x a :Dog } a log:Falsehood } .

There are some other similar axioms written out in Notation3 (and some
in Prolog) at [3] that you might find interesting.

[1] http://www.w3.org/2000/10/swap/Primer
[2] http://www.w3.org/2000/10/swap/cwm.py
[3] http://infomesh.net/2001/05/rdflint/

--
Kindest Regards,
Sean B. Palmer
@prefix : <http://webns.net/roughterms/> .
:Sean :hasHomepage <http://purl.org/net/sbp/> .

Received on Sunday, 17 June 2001 14:30:15 UTC