Bill Allombert on Wed, 12 Mar 2003 20:33:44 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: subst()


On Wed, Mar 12, 2003 at 02:11:58PM -0500, Igor Schein wrote:
> > What's wrong with this ? [ x^2 - x - 1 --> (x - x) - 1 = -1 ]
> 
> As far as I'm concerned, the above is a correct but also a useless
> operations.  I don't see where anyone would use it.  For me an error
> would be more useful, detecting that I'm doing something wrong by
> mistake.

I suppose Karim has Kronecker trick's in mind: substitute Y by a large
polynomial R(X) in P(X,Y) and Q(X,Y), multiply and then replace back
R(X) by Y in P... I cannot see another use.

Anyway it is not for the faint of heart since it depends on the 
algorithm used to do the substitution.

For example why subst(x^2+1-x^2,x^2+1,y) could not return y-x^2 ?

> Do other CAS have anything similar to subst(,x^n,x)?  

I vote for renaming this subst() 'substpol()' and reinstating the old subst()
with the old behaviour. Of course I am biaised since I always disliked
overloading.

Cheers,
Bill.