Hello,
in fact I want to have something like mathematica's x_ pattern to use it
inside some bigger expression.
go_furuya@infoseek.jp wrote:
> Hi Andrei
>
> Maybe,this is not a bug. the rule x->x^2,not stopping is right.
> you shoud use subst,such that subst([x=x^2],expression).
> defrule ,apply1 is doing until result is not changing.
> tellsimp ,letsimp,is doing until it can apply.
> see,
> (C1) defrule(tama2,x,x);
> (D1) tama2 : x -> x
> (C2) apply1(x,tama2);
> (D2) x
> (C3) let([x,x],one)$
> (C4) letsimp(x,one);
> overflow
> more example ,this is not a good example but ...,
> (C5) defrule(tama,_x,if (log(_x)/log(x)=1) then x^2 else x^2)$
> (C6) apply1(_x,tama);
> (D6) x^2
> (C7) apply1(_x+_x^2,tama);
> (D7) x^4+x^2
>
> the rule x->x^2 changes result permanently,so apply1 not to stop.
> please use subst for this problem.
>
> Gosei Furuya (go_furuya@infoseek.jp)
>
>
>
>
>>
>
>>Hello,
>>what if I want my custom rule to be applied only once? If I say
>>matchdeclare(x,true); defrule(f,x,x^2);
>>then apply1(f,s); goes into infinite loop...
>>--
>>Andrei Zorine
>>
>>_______________________________________________
>>Maxima mailing list
>>Maxima@www.math.utexas.edu
>>http://www.math.utexas.edu/mailman/listinfo/maxima
>>
>>
>
>
>