Skip to content

Cannot create distinct polynomial rings over p-adic rings with different print_modes #1210

@ncalexan

Description

@ncalexan
mannequin

The issue is in the caching:

sage: R = Qp(7, print_mode='val-unit')
sage: S = Qp(7)
sage: R(7^2 + 1)
7^2 * 1 + O(7^22)
sage: S(7^2)
7^2 + O(7^22)
sage: R(7^2 + 1)
50 + O(7^20)
sage: S(7^2 + 1)
1 + 7^2 + O(7^20)
sage: R is S
False
sage: R['x'] is S['x']
True

The issue manifests itself in polynomial_ring_constructor, which fails because the cache is keyed by ==, not identity, and

sage: R == S
True

Component: commutative algebra

Keywords: polynomial p-adic print mode cache caching

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions