pw.mac



The root cause of that problem:

x:y$ y:z$
assume(x<1);  => [y<1]       This is what it assumes
apply('forget,%);  => [z < 1]   This is what it forgets
facts();   =>  [1>y]

The problem seems to be that 'forget' re-evaluates the relation:

apply('forget,'[print(x)>1]);
y                  <<< prints value of x
(%o7)          [y > 1]    <<< returns [y>1]

(Why? Not quite sure, but probably related to the peculiar way 'is' works.)
 This can probably be fixed (by explicitly quoting the arguments to
'forget'), but... yuck!  Just use contexts, and the problem goes away.

              -s


On Sat, Jun 2, 2012 at 5:25 PM, Barton Willis <willisb at unk.edu> wrote:

>
> A crazy chained assignment:
>
>  (%i3) (a : b, b : c, c : d, d : e)$
>
> No facts:
>
>  (%i4) facts();
>  (%o4) []
>
> Call simp_given on 1 with one fact a < b
>
>  (%i5) simp_given(1,a<b);
>  (%o5) 1
>
> And oops--a fact leaked out:
>
>  (%i6) facts();
>  (%o6) [d>c]
>
> Isn't this a bug?
>
>
>
> --Barton
>
>
>
>
>