Joe
Yes that's cracked it! I can see you've given values to @A and @B before
solving for @C but in Prolog I wasn't aware that the order mattered...There
again the calculation is being done in Lisp.
As a result of Alex's response this morning I added more parenthesis and
that seemed to solve what I
Hi Dean
On Sun, Nov 27, 2016 at 05:42:21PM +, dean wrote:
> (prove (goal '( (^ @X (- (-> @A) (-> @B) )) (equal @A 4) (equal @B 2) )))
> -> NIL
>
> -> wasn't the "one" in this case
I'm not sure I understand the problem, but the most natural way for a
diff predicate is perhaps
: (be - (@
dean,
does this help? I don't know pilog well but was just playing around
: (prove (goal '( (equal @A 5) (equal @B 2) (^ @C (- (-> @A) (-> @B) )
-> ((@A . 5) (@B . 2) (@C . 3))
On Sun, Nov 27, 2016 at 12:42 PM, dean wrote:
> (prove (goal '( (^ @X (- (-> @A) (-> @B) )) (equal @A 4) (e
(prove (goal '( (^ @X (- (-> @A) (-> @B) )) (equal @A 4) (equal @B 2) )))
-> NIL
-> wasn't the "one" in this case
On 27 November 2016 at 17:34, dean wrote:
> Oopslet me try this
>
> (-> @X) in place of @X in the lisp clause
>
>
> On 27 November 2016 at 16:38, dean wrote:
>
>> In preparat
Oopslet me try this
(-> @X) in place of @X in the lisp clause
On 27 November 2016 at 16:38, dean wrote:
> In preparation to do a predicate 'minus' I thought I see how to use lisp
> '-' within pilog.
> The first statement works re getting a 100% lisp calculation out to pilog
> but
> I t
In preparation to do a predicate 'minus' I thought I see how to use lisp
'-' within pilog.
The first statement works re getting a 100% lisp calculation out to pilog
but
I think I need to pass in pilog variables and apply - to them...unless
pilog has a -.
Many apologies if I should know how to d
Ok I'll keep trying and thank you for the pointers.
Best Regardsd
Dean
On 27 November 2016 at 07:33, Alexander Burger wrote:
> Hi Dean,
>
> > #(prove (goal '(equal 3 @X) ))
>
> 'goal' needs a list of clauses:
>
>: (prove (goal '((equal 3 @X
>-> ((@X . 3))
>
>
> > #: (prove (goal '(
Hi Dean,
> #(prove (goal '(equal 3 @X) ))
'goal' needs a list of clauses:
: (prove (goal '((equal 3 @X
-> ((@X . 3))
> #: (prove (goal '( (equal 3 @X) (member @X (1 2 4)) )))
> #-> NIL
> #: (prove (goal '( (equal 3 @X) (member @X (1 2 3)) )))
> #-> ((@X . 3))
OK
> #(
I'm quite shaky on this so started with a simple example and added stuff.
Unfortunately, I've come off the rails somewhere but am not sure wjy or
what to do about it.
Any advice...much appreciated.
#(prove (goal '(equal 3 @X) ))
#: (prove (goal '( (equal 3 @X) (member @X (1 2 4)) )))
#->