Skip to content

sorted variables in multivariate polynomial ring wrong order #17550

Closed
@dkrenn

Description

@dkrenn

We have

sage: R.<a,b> = QQ[]
sage: sorted([a,b])
[b, a]

which looks weird to me and is not what one would expect.

This is also inconsistent with

sage: var('a, b')
(a, b)
sage: sorted([a,b])
[a, b]

(but in this case the ordering seems always to be alphabetically.)

However, in the multivariate polynomial ring this ordering depends on the definition:

sage: R.<b,a> = QQ[]
sage: sorted([a,b])
[a, b]

Component: algebra

Issue created by migration from https://trac.sagemath.org/ticket/17550

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions