Opened 8 months ago

Closed 6 months ago

#30420 closed defect (duplicate)

Wrong Coercion of Elements in Padic-Extension Fields

Reported by: gh-n-vi Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: padics Keywords: coercion, precision
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

Below are attempts to coerce elements from a field T (a padic eisenstein extension field) into a field D, where D is similar to T, except that its precision is higher.
Some of these attempts produced wrong results.

The 2 examples below vary in the initial precision of the fields. However in both cases, the precision of D is twice the precision of T.

Example 1:

sage: T.<a> = Qp(31, 3).extension(x^3 - 31)
sage: D.<b> = Qp(31, 6).extension(x^3 - 31)
# Trying to coerce different elements from T to D:
sage: D(29 + O(a^9)) # works
29 + O(b^9)
sage: D(29*a^27 + O(a^36)) # wrong result
29*b^27 + 18*b^33 + O(b^36)
sage: D(29*a^-27 + 3*a^-24 + 16*a^-23 + 28*a^-22 + 11*a^-21 + 22*a^-20 + 25*a^-19 + O(a^-18)) # wrong result
O(b^-18)
sage: D(29*a^-27 + 3*a^-24 + 16*a^-23 + 28*a^-22 + 11*a^-21 + 22*a^-20 + 25*a^-19) # wrong result
O(b^-18)

Example 2:

sage: T.<a> = Qp(31, 20).extension(x^3 - 31)
sage: D.<b> = Qp(31, 40).extension(x^3 - 31)
# Trying to coerce different elements from T to D:
sage: D(29 + O(a^9)) # works
29 + O(b^9)
sage: D(29*a^27 + O(a^36)) # works
29*b^27 + O(b^36)
sage: D(29*a^-27 + 3*a^-24 + 16*a^-23 + 28*a^-22 + 11*a^-21 + 22*a^-20 + 25*a^-19 + O(a^-18)) # wrong result
O(b^-18)
sage: D(29*a^-27 + 3*a^-24 + 16*a^-23 + 28*a^-22 + 11*a^-21 + 22*a^-20 + 25*a^-19) # wrong result
29*b^27 + 3*b^30 + 16*b^31 + 28*b^32 + O(b^33)

Change History (3)

comment:1 Changed 8 months ago by gh-n-vi

  • Milestone changed from sage-9.2 to sage-duplicate/invalid/wontfix
  • Status changed from new to needs_review

When using the most updated version of sage (including #29925, #29926 which might be relevant), and implementing the yet-unreviewed ticket #29927, the only one of the above examples which remains problematic is:

sage: T.<a> = Qp(31, 3).extension(x^3 - 31)
sage: D.<b> = Qp(31, 6).extension(x^3 - 31)
sage: D(29*a^27 + O(a^36))
29*b^27 + 18*b^33 + O(b^36)

But this results from the problem in _polynomial_list() which is described in #29932. Indeed:

sage: T.<a> = Qp(31, 3).extension(x^3 - 31)
sage: T((29*a^27 + O(a^36))._polynomial_list())
29*a^27 + 18*a^33 + O(a^36)

comment:2 Changed 7 months ago by saraedum

  • Status changed from needs_review to positive_review

comment:3 Changed 6 months ago by chapoton

  • Resolution set to duplicate
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.