You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sagemathgh-39365: Allow coercion from Frac(QQ[x]) to LaurentSeriesRing(QQ)
If `A` is a field then `self = LaurentSeriesRing(A)` is a field, by
universal property of fraction field, a coercion `P.base() → self` can
be uniquely extended to `P → self`. So this makes sense.
As a side effect, this coercion allows the user to write things such as
```sage
sage: R.<x> = QQ[]
sage: 1/(x-1)+O(x^100)
-1 - x - x^2 - x^3 - x^4 - x^5 - x^6 - x^7 - x^8 - x^9 - x^10 - x^11 -
x^12 - x^13 - x^14 - x^15 - x^16 - x^17 - x^18 - x^19 + O(x^20)
```
Another side effect: If the base ring is something like `Zmod(5)` or
`QQ["x"].quotient(...)` then a primality/irreducibility check will be
carried out.
### 📝 Checklist
<!-- Put an `x` in all the boxes that apply. -->
- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation and checked the documentation
preview.
### ⌛ Dependencies
<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
URL: sagemath#39365
Reported by: user202729
Reviewer(s):
0 commit comments