rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

a combination of [...] confuses simplification #1471

Open rtoy opened 4 months ago

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-04 17:00:19 Created by slitvinov on 2015-06-23 21:51:45 Original: https://sourceforge.net/p/maxima/bugs/2983


A combination of ordegreat',subst', and function calls leads to a wrong result

lst: [x] $
ordergreat(y, x) $

B(e):= subst(y - lst[1], y, e) $
A( ):= B(x + y) $
A();

gives

(%i5) A();
(%o5)                              y + x - x 

with

(%i6) ?princ(%);
((MPLUS SIMP) ((MTIMES SIMP) -1 $X) _101X _102Y)

I expect `y'.

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-04 17:00:20 Created by robert_dodier on 2015-06-28 05:28:37 Original: https://sourceforge.net/p/maxima/bugs/2983/#7848


Here is a simpler version.

(%i1) c : 'a $
(%i2) ordergreat (a, b) $
(%i3) c - a;
(%o3)                                a - a

This happens because ordergreat creates a new symbol which is displayed as a. I don't know what could be done to fix it, aside from reimplementing ordergreat to use some other method.

It would be somewhat reasonable to document the existing behavior (that ordergreat creates a new symbol which is distinct from any previously entered symbol by the same name) and then mark this report as "won't fix".