Bug report ID:635627 - subst([...] is order-dependent



Am Mittwoch, den 31.03.2010, 09:49 -0600 schrieb Robert Dodier:
> On Wed, Mar 31, 2010 at 9:37 AM, Dieter Kaiser <drdieterkaiser at web.de> wrote:
> 
> > We have the open bug report ID:635627 - subst([...] is order-dependent.
> 
> I am in favor of substitution in parallel for "subst".
> (We could have another function for serial substitution but
> that should not be the default.)
> 
> > I have tried a general algorithm which does the substitution in
> > parallel. These are the steps I have implemented:
> 
> Hmm, can't we merge sublis and subst? i.e. have the effect of
> subst just be the same as a similar call to sublis.
> Probably I'm missing something here.


I have tried this approach first. The problem is that the algorithm of
sublis only works for atoms on the left hand side of equations.
Furthermore, sublis does not take into account the many special cases
which have to be considered when doing a substitution into a Maxima
expression. The code of maxima-substitute is more complete and we should
not double it.


> (In general I'm not in favor of functions which vary in
> irregular ways. sublis has parallel substitution but it also
> differs from subst in other, seemingly random, ways.)


This is the reason I have tried to find an algorithm which works by
using the function maxima-substitute.


> We can modify to_poly_solve or any other functions which
> expect serial substitution.


I do not know the code of to_poly_solve in detail. Perhaps, it is easy
to change it in a way that it will work with a function $substitute
which does the substitution in parallel.

Dieter Kaiser