sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.44k stars 481 forks source link

Inconsistency in valuation of elements that are non-distinguishable from zero #30696

Open 333767a0-8bb0-4499-a032-33e52572d678 opened 4 years ago

333767a0-8bb0-4499-a032-33e52572d678 commented 4 years ago

Using version 9.1 of Sage, Power-Series and Multi-Power-Series O(xn) elements are given valuation n, whereas Laurent-series O(xn) elements are given valuation infinity:

# Power-Series
sage: P.<x> = PowerSeriesRing(ZZ)
sage: O(x^5).valuation()
5
# Multi-Power-Series
sage: R.<x,y> = QQ[[]]
sage: r = R(0).O(5)
sage: r
0 + O(x, y)^5
sage: r.valuation()
5
# Laurent-Series
sage: S.<y> = LaurentSeriesRing(ZZ)
sage: O(y^5).valuation()
+Infinity

In case this should be changed, here are some considerations for choosing a uniform approach:

  1. padic O(xn) elements are given valuation n (like power-series and multi-power-series), which suggests giving valuation n.
  2. In all cases (power-series, multi-power-series, laurent-series, padics), O(xn) elements return True for is_zero(), which suggests giving valuation infinity (in all cases).

Component: numerical

Keywords: valuation, zero, power-series, laurent

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

mkoeppe commented 3 years ago
comment:2

Moving to 9.4, as 9.3 has been released.