IfI declare a function or expression before any "assume" statement, then the variables used in the expression do not have any trailing tildes "~". When an assume statement comes after this, there is some sense in which the variable name is changed (as indicated by the "about" statement), but there is also some sense in which the variable name is not changed, as it is still possible to use "subs" with the original variable name:

restart :
expr := x ;
assume( x > 0 ) ; print( expr ) ;
about( x ) ;
subs( x = 2.00, expr ) ;

It is also notable that "print( expr )" after assume shows the expression with the tildes, even though the expression was set before assume. So far I don't have any problems with this.

Now, things really start to get strange:

restart :
expr := x :
assume( x > 0 ) :
expr := x :
assume( x > 0 ) :
simplify( x - expr ) ;
is( x - expr, 0 ) ;

which results in "x~ - x~" and "false". Of course, I was thinking that  "x~ - x~" should simplify to zero. It looks like there are now two different instances of x~ which have the same name, but which are not equal to each other.

 


Please Wait...