Re: skolem warnings

Thomas Russ <[email protected]>
Newsgroups gmane.comp.ai.powerloom
Message-ID <[email protected]>
Since Hans very nicely answered the warnings, question, I thought
I would provide a thought about modeling one of the other
interesting constructs in your KB:

On Mar 19, 2004, at 11:24 AM, Jonathan Ito wrote:

> (number-of-flower-parts ?f "multiples of 4 or 5")

The trick here it to figure out what it would mean
to be a multiple of 4 or 5.  One definition of a
multiple of 4 would be:

(defconcept multiple-of-four ((?n NUMBER))
   :<=>  (exists (?factor)
            (and (integer ?factor)
                 (* ?factor 4 ?n))))

	? (ask (multiple-of-four 10))
	UNKNOWN
	? (ask (multiple-of-four 8))
	TRUE
	? (ask (multiple-of-four 20.0))
	TRUE
	? (ask (multiple-of-four 21.1))
	UNKNOWN

One could also generalize this with a relation about
multiples:

(defrelation multiple-of ((?n NUMBER) (?base NUMBER))
   :documentation "?n is a multiple of ?base"
   :<=> (exists (?factor)
          (and (integer ?factor)
               (* ?factor ?base ?n))))

	(ask (multiple-of 8 4))
	TRUE
	? (ask (multiple-of 8 4.0))
	TRUE
	? (ask (multiple-of 8 4.5))
	UNKNOWN
	? (ask (multiple-of 9 4.5))
	TRUE
	? (retrieve all (multiple-of 10 ?x))
	No solutions.

These provide the sorts of answers that you would expect.  In 
particular,
PowerLoom is not crazy enough to try to generate all the multiples of 
10.


-----------------------------------

Now, if you try this at home, there may be some surprising results which
come from PowerLoom remembering that it has seen some solutions to this
problem, and using them to answer.  In general PowerLoom won't derive 
these
results by running the rule, but if it has seen concrete examples, it 
will
be able to find and return them.  But you can't really rely on this
particular behavior, since this may change in the future.

? (retrieve all (multiple-of 9 ?x))
There is 1 solution:
   #1: ?X=4.5

? (retrieve all (multiple-of 8 ?x))
There are 2 solutions:
   #1: ?X=4.0
   #2: ?X=4
?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.