Poor symbolic simplification of index operations

Poor symbolic simplification of index operations - Сообщения

#1 Опубликовано: 19.11.2019 06:26:10
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: 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 КиБ) скачан 33 раз(а).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#2 Опубликовано: 19.11.2019 16:10:04
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 сообщений из 1674 понравились пользователям.

Группа: 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 КиБ) скачан 37 раз(а).

Best regards.
Alvaro.
6 пользователям понравился этот пост
NDTM Amarasekera 19.11.2019 21:32:00, Martin Kraska 20.11.2019 05:03:00, Radovan Omorjan 20.11.2019 07:31:00, Martin_B 19.11.2019 17:23:00, frapuano 20.11.2019 06:00:00, sergio 19.11.2019 17:26:00
#3 Опубликовано: 19.11.2019 17:19:56
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Wrote

How can I enforce evaluation?


Martin_2.PNG
#4 Опубликовано: 20.11.2019 05:03:04
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: 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 пользователям понравился этот пост
Alvaro Diaz Falconi 20.11.2019 10:30:00, frapuano 20.11.2019 06:01:00, sergio 20.11.2019 06:50:00, Radovan Omorjan 20.11.2019 07:30:00
#5 Опубликовано: 20.11.2019 10:26:53
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: 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 .

  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений