Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugs in LazySeries over non-integral domains #36154

Closed
2 tasks done
mantepse opened this issue Aug 29, 2023 · 0 comments · Fixed by #36156
Closed
2 tasks done

bugs in LazySeries over non-integral domains #36154

mantepse opened this issue Aug 29, 2023 · 0 comments · Fixed by #36156

Comments

@mantepse
Copy link
Contributor

Steps To Reproduce

sage: L.<z> = LazyPowerSeriesRing(Zmod(4))
sage: f = L(constant=2)
sage: f
2 + 2*z + 2*z^2 + O(z^3)
sage: 2*f
...
AssertionError: Stream_exact should only be used for non-zero streams

Expected Behavior

sage: L.<z> = LazyPowerSeriesRing(Zmod(4))
sage: f = L(constant=2)
sage: f
2 + 2*z + 2*z^2 + O(z^3)
sage: 2*f
0

Actual Behavior

There is an error.

Additional Information

No response

Environment

irrelevant

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide
vbraun pushed a commit to vbraun/sage that referenced this issue Sep 1, 2023
sagemathgh-36156: detect the zero series when returning an exact stream
    
By definition, an exact stream is non-zero.  Therefore, we have to check
before constructing one.

Fixes sagemath#36154

### 📝 Checklist

- [X] The title is concise, informative, and self-explanatory.
- [X] The description explains in detail what this PR is about.
- [X] I have linked a relevant issue or discussion.
- [X] I have created tests covering the changes.
    
URL: sagemath#36156
Reported by: Martin Rubey
Reviewer(s): Frédéric Chapoton
@mkoeppe mkoeppe added this to the sage-10.2 milestone Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants