Opened 5 years ago

Closed 5 years ago

# O(x) equals zero in PowerSeriesRing

Reported by: Owned by: dkrenn major sage-duplicate/invalid/wontfix algebra Peter Bruin, Ralf Stephan N/A

### Description

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

is wrong.

### 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.