Assume/is is not consistent in its treatment of
programming vs. mathematical variables
x:1$
assume(x<0) => Inconsistent
OK, this presumably is equivalent to assume(1<0)
assume('x<0) => Inconsistent
Questionable. Should 'x really refer to the
*programming
variable* x here even though it's quoted?
but
assume(y<0)$
y:1$ => no error
This is inconsistent with the situation above. But I
certainly don't want every variable assignment to be
checking the Assume database!
is(y<0) => false
OK, 1<0 is false.
is('y<0) => true
OK if 'y is treated as a *mathematical variable* and
uses the assume database, not the programming variable
y. But above, assume('x<0) treats them as the same.
Logged In: YES
user_id=588346
Clearer demonstration:
assume(equal('r,0))
r:10
is(equal('r,0)) => true
assume(equal('r,0)) => [inconsistent]
assume(not(equal('r,0))) => [redundant]
facts() => [ equal(r,0) ]
is(equal('r,10)) => false
assume(equal('r,10)) => [redundant]
is(not(equal('r,10))) => true
Logged In: YES
user_id=1902378
Originator: NO
Maxima version: 5.13.0cvs
Maxima build date: 17:3 11/2/2007
host type: i686-redhat-linux-gnu
lisp-implementation-type: GNU Common Lisp (GCL)
lisp-implementation-version: GCL 2.6.7
Original issue is already fixed by a someone. See code below.
But sample code from the note "2004-02-03 03:43" gives the following error:
is(equal('r,10)) => true
is(not(equal('r,10))) => true
The following code shows that origianl issue is fixed:
(%i1) assume(y<0);
(%o1) [y < 0]
(%i2) y:1$
(%i3) is(y<0);
(%o3) false
(%i4) is('y<0);
(%o4) false
The following code from comment "2004-02-03 03:43" shows that problem is changed a little
(%i1) assume(equal('r,0));
(%o1) [equal(r, 0)]
(%i2) r:10;
(%o2) 10
(%i3) is(equal('r,0));
(%o3) false
(%i4) assume(equal('r,0));
(%o4) [inconsistent]
(%i5) assume(not(equal('r,0)));
(%o5) [redundant]
(%i6) facts();
(%o6) [equal(r, 0)]
(%i7) is(equal('r,10));
(%o7) true
(%i8) assume(equal('r,10));
(%o8) [redundant]
(%i9) is(not(equal('r,10)));
(%o9) true
Logged In: YES
user_id=588346
Originator: YES
The last comment claims that "the original issue is fixed". But the example given shows that it is *not* fixed. The second case, is('y<0), should return true; instead, the 'y is being evaluated twice, giving 1. It takes double quoting to get it right: is('('y)<0) => true. (Two single quotes in a row (''y) are parsed differently, hence the parentheses.)
The situation is still a mess, and the issue has not been fixed.