The following code will produce an expression that Maxima *thinks* is
simplified even if it is not:
(%i1) :lisp (defun $pseudosimp (x) (cond ((atom x) x) (t (cons (append (car
x) '(simp)) (cdr x)))))
(%i2) block([simp:false],pseudosimp(1+1));
(%o2) 1 + 1
If this is useful to you, fine... but remember that Maxima is not designed
to work with expressions like this and may well behave in peculiar ways.
See below.
(%i9) block([simp:false],pseudosimp(x+y+1));
(%o9) 1 + y +
x
(%i10) block([simp:false],pseudosimp(x+y+1))-x;
(%o10) 1 + y
(%i11) block([simp:false],pseudosimp(x+y+1))-y;
(%o11) 1 + x
(%i12) block([simp:false],pseudosimp(x+y+1))-1;
(%o12) 1 + y + x
- 1
(%i13) block([simp:false],pseudosimp(x+y+1))-x-y;
(%o13) 1
(%i14) block([simp:false],pseudosimp(x+y+1))-x-1;
(%o14) 1 + y -
1
To undo the effect of pseudosimp, use expand(XXX,1,1)
-s
On Tue, Sep 1, 2009 at 5:32 PM, Alejandro Jakubi <jakubi at df.uba.ar> wrote:
> Stavros and Robert
>
> Thank you for these explanations.
>
> Now, the real question. I understand that most commands assume that the
> global
> flag 'simp' is set to 'true', so that in general it is safer to keep it in
> its
> default value. However, in some particular cases, the result of the
> automatic
> simplification on an expression is not what I may want to get. I.e. at some
> steps I may like to get higher control of the computation path.
>
> So I wonder how to keep the global 'simp' set to 'true' and preserve the
> result of ev(...,simp=false) from the "outer" simplification.
>
> Alejandro Jakubi
>
>
>
>
>
>
>
>
>