Skip to content

LaurentPolynomialRing: incorrect conversion of base ring element and failing conversion between rings #21855

@dkrenn

Description

@dkrenn
sage: P = LaurentPolynomialRing(QQ, 'a, b')
sage: Q = LaurentPolynomialRing(P, 'c, d')
sage: Q(P.0)
c

but the expected result is a as it is with polynomial rings:

sage: P = PolynomialRing(QQ, 'a, b')
sage: Q = PolynomialRing(P, 'c, d')
sage: Q(P.0)
a
  1. (In some sense) more generally, conversion between certain laurent polynomial rings (e.g. isomorphic rings) fail. E.g. the following should work
sage: L.<a, b, c, d> = LaurentPolynomialRing(QQ)
sage: M = LaurentPolynomialRing(QQ, 'c, d')
sage: Mc, Md = M.gens()
sage: N = LaurentPolynomialRing(M, 'a, b')
sage: Na, Nb = N.gens()
sage: M(c/d)
sage: N(a*b/c/d)
sage: N(c/d)
sage: L(Mc)
sage: L(Nb)
  1. As needed to fix the above, a method is_constant, as well as methods for the conversions of constant laurent polynomials are to be implemented.

Depends on #21833

CC: @cheuberg

Component: algebra

Author: Daniel Krenn

Branch/Commit: 65e2fc5

Reviewer: Frédéric Chapoton, Travis Scrimshaw

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions