|
From: Robert D. <rob...@us...> - 2025-11-24 00:36:17
|
- **labels**: --> box, expand, simplification
---
**[bugs:#4629] box expression missing simp flags & expand applied to boxed objects**
**Status:** open
**Group:** None
**Labels:** box expand simplification
**Created:** Tue Nov 04, 2025 12:45 PM UTC by Barton Willis
**Last Updated:** Tue Nov 04, 2025 12:45 PM UTC
**Owner:** nobody
The user documentation doesn't say what `expand` is supposed to do to a boxed expression, but I'm pretty sure that we don't want `expand` to strip a boxed expression of some of its `simp` flags:
~~~
(%i25) xxx : box(x/2)$
(%i26) ?print([xxx,expand(xxx)]);
((MLIST SIMP) ((MBOX) ((MTIMES SIMP) ((RAT SIMP) 1 2) $X))
((MBOX) ((MTIMES) ((RAT) 1 2) $X)))
~~~
In the expanded expression, `rat` lost its `simp` flag. Additionally, the `mbox` operators are missing a `simp` flag.
For a labeled box, all is well:
~~~
(%i32) xxx : box(x/2,0)$
(%i33) ?print([xxx,expand(xxx)]);
((MLIST SIMP) ((MLABOX SIMP) ((MTIMES SIMP) ((RAT SIMP) 1 2) $X) 0)
((MLABOX SIMP) ((MTIMES SIMP) ((RAT SIMP) 1 2) $X) 0))
(%o33) [box(x/2,0),box(x/2,0)]
~~~
This was done with a recent Maxima build. With Maxima 5.48.1, I think all is well:
~~~
(%i1) xxx : box(x/2);
(xxx) box(x/2)
(%i2) ?print(%);
((MBOX SIMP) ((MTIMES SIMP) ((RAT SIMP) 1 2) $X))
(%o2) box(x/2)
(%i3) expand(xxx);
(%o3) box(x/2)
(%i4) ?print(%);
((MBOX SIMP) ((MTIMES SIMP) ((RAT SIMP) 1 2) $X))
(%o4) box(x/2)
~~~
---
Sent from sourceforge.net because max...@li... is subscribed to https://sourceforge.net/p/maxima/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/maxima/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |