handling tellsimp'ed rules



I am using the same build of maxima. I may not have transcribed
something wrong, but I don't see what is different.

the rules for F are FRULE1, FRULE2, ....
the rules for F2 are F2RULE1, F2RULE2, ...


Yes, you could keep track of all the rules each time
you call tellsimp.  Or you can define your own rules using
defrule, and then use apply1 or similar programs to simplify
according to those rules. Then you would not have to worry
about interactions of your rules with others.

By the way, the block([sd,t,y] ...) is probably ineffective.  I think the
matchdeclare names s,d,t,y  are treated globally.  That is,
they are not lexically scoped, and so the tellsimp(...sd... )
just uses the most recent declaration for sd.
I recommend a "different name convention" for lots of
pattern variables. For example, sd_true, t_true, y_true...
RJF







Andrei Zorine wrote:

> Here's what I see when I load a file or batch it:
>
> (C1) block([sd,t,y ],
>   matchdeclare([sd,t,y],true),
>   print(tellsimp('diff(II(sd,t),t,2),0)),
>   print(tellsimp('diff(II(sd,t),t),sd/ID(t))),
>   print(tellsimp('diff(II(sd,t),sd),0)))$
>
> [DERIVATIVERULE1, SIMPDERIV]
> [DERIVATIVERULE2, DERIVATIVERULE1, SIMPDERIV]
> [DERIVATIVERULE3, DERIVATIVERULE2, DERIVATIVERULE1, SIMPDERIV]
> (C2) build_info();
>
>
> Maxima version: 5.9.0
> Maxima build date: 19:10 2/9/2003
> host type: i686-pc-mingw32
> lisp-implementation-type: Kyoto Common Lisp
> lisp-implementation-version: GCL-2-5.0
>
> Suppose, besides may package, user tellsimps more and more. How do I 
> chop down my rules precisely??? I could possibly take the head of the 
> list every time I do tellsimp. But why do these two cases differ, 
> yours and mine?
>
> (C3) tellsimp(f(sd),sd+1);
>
> (D3)                     [fRULE1, FALSE]
> (C4) tellsimp(f2(s3d),sd+1);
>
> (D4)                    [f2RULE1, FALSE]
>
> So, there seems to be a different behaviour between command line and 
> loading a file?
>
> -- 
> Andrei Zorine
>
> Richard Fateman wrote:
>
>> There is a function remrule.  It works like this:
>>
>> remrule(<name of function>, <rulename>)
>>
>> example..
>>
>> matchdeclare(a,true);
>> tellsimp(f(a),g(a+1);    ... returns [f, fRULE1].
>>
>> f(34) ;... returns g(35).
>>
>> remrule(f,fRULE1);
>>
>> now  f(34) is not changed.
>>
>> There is also a variable called rules  that has all the
>> rules defined in the system so far.
>>
>> I think this is all you need.
>> Good luck!
>>
>> RJF
>>
>
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima