inexpression(x,g) ?



Am 16 Jun 2008 um 13:24 hat Stavros Macrakis geschrieben:

> Thanks for the corrections to my stupid mistakes!  I should have known
> something was wrong.
> 
> Re:
> 
>         freeof(2,1/x^2) => false
>         freeof(-2,1/x^2) => true
>         freeof(-x,f(-x)) => false
>         freeof(-x,f(- -x)) => true

I'm surprised:

Maxima 5.15.0 http://maxima.sourceforge.net
Using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (aka GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) freeof(2,1/x^2);
(%o1)                                true
(%i2) freeof(-2,1/x^2);
(%o2)                                false



> my inclination would be to disallow numbers in the first argument (and
> expressions other than simple subscripts) as not very well-defined or
> useful.

Right

> > I don't know if it is possible to turn the simplifier off when evaluating freeof or if this would cause trouble then.
> 
> By the time freeof "sees" the argument, it has already been
> simplified, which is correct and reasonable behavior.  Do you really
> want freeof(x,x-x) to be false but (ex: x-x, freeof(x,ex)) to be true
> (referential transparency)?  

You are right,  freeof(x,x-x)  should be true. 

Volker