Assertion is false - its complement unknown?

"Oliver Uwira" <[email protected]> Wed, 06 Apr 2011 11:41:04 +0200
Newsgroups gmane.comp.ai.powerloom
Message-ID <[email protected]>
Hello everybody,

I have encountered a peculiar issue in PowerLoom that I have failed to  
solve by studying the PowerLoom documention. My problem boils down to  
the following:

An assertion is evaluated as FALSE. Now I would expect it's  
complement, e.g. inserting the very statement into a (not) clause, to  
evaluate as TRUE. It does, however, evaluate to UNKNOWN. I hope  
somebody on here is able to give me some advice on this. Below I  
explain what I have done in more detail.

I'm currently trying to model the existence of things along the time  
line by asserting the start and end points of their existence. Time  
points are to be simple integers:

(defconcept PREDICATOR)
(defconcept THING-PREDICATOR (?p PREDICATOR))

(deffunction EXISTENCE-START ((?p THING-PREDICATOR)) :-> (?t INTEGER)
	:axioms (single-valued EXISTENCE-START)
)
(deffunction EXISTENCE-END   ((?p THING-PREDICATOR)) :-> (?t INTEGER)
	:axioms (single-valued EXISTENCE-END)

The goal is to be able to answer questions as to a thing's existence  
at a certain point in time. Thus I modeled the following relation:

(defrelation EXISTING ((?p THING-PREDICATOR) (?t INTEGER)))

I planned to let PowerLoom infer the existence of a thing ?p existing  
at a point in time ?t according to the following rule (in plain  
language):

(a) If both EXISTENCE-START and EXISTENCE-END have been asserted, a  
thing exists at a point in time t if t lies in between EXISTENCE-START  
and EXISTENCE-END.

(b) If EXISTENCE-START has been asserted but EXISTENCE-END end has not  
been asserted, a thing exists at a point in time t if t is >=  
EXISTENCE-START.

Case (b) is giving me trouble. I tried to model the above rule as follows:

(defrule EXISTENCE
   (forall (?p ?t)
     (=>
       (and
         (exists ?s
           (and
             (= (EXISTENCE-START ?p) ?s)
             (not (< ?t ?s))
           )
         )
         (or
           (not (exists ?e (= (EXISTENCE-END ?p) ?e)))
           (exists ?e
             (and
               (= (EXISTENCE-END ?p) ?e)
               (not (> ?t ?e))
             )
           )
         )
       )
       (EXISTING ?p ?t)
     )
   )
)

Now asserting only EXISTENCE-START of a thing, PowerLoom cannot infer  
the existence of that thing according to the rule above.

(assert (THING-PREDICATOR t3))
(assert (= (EXISTENCE-START t3) 10))

Now (ask (EXISTING t3 33)) returns FALSE.

I was able to track this down to the following. The first part of the  
(or) clause in the above rule evaluates to UNKNOWN. That is, even though

(exists ?e (= (EXISTENCE-END t3) ?e)))

evaluates to FALSE as expected, it's complement, which is used in the  
(or) clause,

(ask (not (exists ?e (= (EXISTENCE-END t3) ?e))))

evaluates to UNKNOWN.

Many thanks in advance on any effort to put me back on the right track,
Oliver Uwira