Skip to content

Order builtin is wrong for monomial products of symbols #1886

Description

@rocky

Description

Mathics3 currently sorts symbols in products from left to right, while WMA goes from right to left in monomial products.

For example, consider Order[b c, a d].

Because $d$ is higher in the variable hierarchy than $c$, $ad$ is treated as having a "higher variable degree" than $bc$, placing $ad$ later in canonical polynomial order (e.g., $b c + a d$).

How to Reproduce and Output Given

In[1]:= Order[b c, a d]
Out[1]= -1

Expected behavior

In[1]:= Order[b c, a d]
Out[1]= 1

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions