Poor symbolic simplification of index operations

Poor symbolic simplification of index operations - Mensajes

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

Martin Kraska

1.361 me gusta en 2.275 mensajes.

Grupo: 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,29 KiB) descargado 1146 vez(es).
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
#2 Publicado: 19/11/2019 16:10:04
Alvaro

Alvaro

1.139 me gusta en 1.805 mensajes.

Grupo: 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,13 KiB) descargado 1185 vez(es).

Best regards.
Alvaro.
A 6 usuarios les gustó este mensaje
NDTM Amarasekera 19/11/2019 21:32:00, Martin Kraska 20/11/2019 5:03:00, Radovan Omorjan 20/11/2019 7:31:00, Martin_B 19/11/2019 17:23:00, frapuano 20/11/2019 6:00:00, sergio 19/11/2019 17:26:00
#3 Publicado: 19/11/2019 17:19:56
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

Wrote

How can I enforce evaluation?


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

Martin Kraska

1.361 me gusta en 2.275 mensajes.

Grupo: 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.



Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
A 4 usuarios les gustó este mensaje
Alvaro 20/11/2019 10:30:00, frapuano 20/11/2019 6:01:00, sergio 20/11/2019 6:50:00, Radovan Omorjan 20/11/2019 7:30:00
#5 Publicado: 20/11/2019 10:26:53
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: 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 .

  • Nuevos mensajes
  • Sin mensajes nuevos