Poor symbolic simplification of index operations

Poor symbolic simplification of index operations - Messages

#1 Posted: 11/19/2019 6:26:10 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

SMath can simplify expressions involving index operations, as the example shows. This, however, is limited to expressions with units. It doesn't work for general variables. This also affects the work of Maxima plugin (see bug report), because things like unevaluated linear indexing propagate to Maxima instead of being handled inside SMath Studio.

Is there any reason for disabling this feature? How can I enforce evaluation?
I'd expect the same structure of the results no matter if a or 'm is used. In both cases all expressions are evaluated symbolically.

indexing1.png
indexing1.sm (17 KiB) downloaded 32 time(s).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#2 Posted: 11/19/2019 4:10:04 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Wrote

SMath can simplify expressions involving index operations, as the example shows. This, however, is limited to expressions with units. It doesn't work for general variables. This also affects the work of Maxima plugin (see bug report), because things like unevaluated linear indexing propagate to Maxima instead of being handled inside SMath Studio.

Is there any reason for disabling this feature? How can I enforce evaluation?
I'd expect the same structure of the results no matter if a or 'm is used. In both cases all expressions are evaluated symbolically.



Hi Martin. I ask the same thing some time ago and the answer was that unevaluated expressions are not assumed as complex values like maple and others, but as general arrays.

You can write your own simplification routine for convert some expression in what you want.

Hope this helps.

indexing1.sm (34 KiB) downloaded 37 time(s).

Best regards.
Alvaro.
6 users liked this post
NDTM Amarasekera 11/19/2019 9:32:00 PM, Martin Kraska 11/20/2019 5:03:00 AM, Radovan Omorjan 11/20/2019 7:31:00 AM, Martin_B 11/19/2019 5:23:00 PM, frapuano 11/20/2019 6:00:00 AM, sergio 11/19/2019 5:26:00 PM
#3 Posted: 11/19/2019 5:19:56 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

How can I enforce evaluation?


Martin_2.PNG
#4 Posted: 11/20/2019 5:03:04 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Wrote



Hi Martin. I ask the same thing some time ago and the answer was that unevaluated expressions are not assumed as complex values like maple and others, but as general arrays.

You can write your own simplification routine for convert some expression in what you want.

Hope this helps.

Best regards.
Alvaro.



Hi Alvaro, your command of equrep() is really impressive and I hope that some of the stuff you designed will make it into SMath core.

As to assuming any undefined variable being an array, this is neither really implemented nor is it useful IMHO.

The following would be wrong if a and b were matrices (or whatever arrays), given that multiplication isn't by element.
multiply.png

Please, dear developers, don't take that as a request to suppress the last bit of symbolic simplification! I'd prefer the scalar assumption, perhaps augmented by some way to mark undefined variables as arrays. Examples would be underline or overarrow, perhaps the number of markers indicating the order (one underline - vector, two underlines - matrix).

I guess that 99% of the users would expect undefined variables to be scalars.



Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
4 users liked this post
Alvaro Diaz Falconi 11/20/2019 10:30:00 AM, frapuano 11/20/2019 6:01:00 AM, sergio 11/20/2019 6:50:00 AM, Radovan Omorjan 11/20/2019 7:30:00 AM
#5 Posted: 11/20/2019 10:26:53 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

I guess that 99% of the users would expect undefined variables to be scalars


For sure 'scalar' for Quick plot [ln(x)],
Thus will support all Smath more scalar maths .

  • New Posts New Posts
  • No New Posts No New Posts