Poor symbolic simplification of index operations

Poor symbolic simplification of index operations - 消息

#1 已发布: 2019/11/19 06:26:10
Martin Kraska

Martin Kraska

1,362个赞,共2,276个帖子。

组: 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)已下载 1159 次。
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
#2 已发布: 2019/11/19 16:10:04
Alvaro

Alvaro

1,139个赞,共1,805个帖子。

组: 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)已下载 1200 次。

Best regards.
Alvaro.
6位用户喜欢此帖子
NDTM Amarasekera 2019/11/19 21:32:00, Martin Kraska 2019/11/20 05:03:00, Radovan Omorjan 2019/11/20 07:31:00, Martin_B 2019/11/19 17:23:00, frapuano 2019/11/20 06:00:00, sergio 2019/11/19 17:26:00
#3 已发布: 2019/11/19 17:19:56
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

Wrote

How can I enforce evaluation?


Martin_2.PNG
#4 已发布: 2019/11/20 05:03:04
Martin Kraska

Martin Kraska

1,362个赞,共2,276个帖子。

组: 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
4位用户喜欢此帖子
Alvaro 2019/11/20 10:30:00, frapuano 2019/11/20 06:01:00, sergio 2019/11/20 06:50:00, Radovan Omorjan 2019/11/20 07:30:00
#5 已发布: 2019/11/20 10:26:53
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

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

  • 有新帖
  • 无新帖