Opened 5 years ago

Closed 5 years ago

#21068 closed defect (invalid)

O(x) equals zero in PowerSeriesRing

Reported by: dkrenn Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: algebra Keywords:
Cc: Merged in:
Authors: Reviewers: Peter Bruin, Ralf Stephan
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

sage: O(PowerSeriesRing(ZZ, 'x').gen()) == 0
True

is wrong.

Change History (5)

comment:1 Changed 5 years ago by pbruin

No, it is correct. The documentation says:

sage: R.<x> = ZZ[[]]
sage: x._cmp_??
Source:
    cpdef int _cmp_(self, right) except -2:
        r"""
        Comparison of self and ``right``.

        We say two approximate power series are equal if they agree for
        all coefficients up to the *minimum* of the precisions of each.
        Thus, e.g., `f = 1 + q + O(q^2)` is equal to `g = 1 + O(q)`.

        This is how PARI defines equality of power series, but not how
        Magma defines equality. (Magma would declare `f` and `g` unequal.)
        The PARI/Sage convention is consistent with the idea that
        comparison should take place after coercing both elements into
        a common parent.  Hence, in the above example `f` is truncated
        to `f + O(q)`, which is considered to be equal to `g`, even
        though the coefficients of `q` are unknown for both series in
        that comparison.

comment:2 Changed 5 years ago by pbruin

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

I propose to close this as invalid (not a bug).

comment:3 Changed 5 years ago by rws

  • Status changed from needs_review to positive_review

comment:4 Changed 5 years ago by pbruin

  • Reviewers set to Peter Bruin, Ralf Stephan

comment:5 Changed 5 years ago by vbraun

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