Skip to content

Fix divides() for polynomials over rings with zero divisors (closes #40372) #40396

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

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

aksh08022006
Copy link

This PR fixes the divides() method for polynomials over rings with zero divisors (such as Zmod(4) and Zmod(8)), as requested by reviewers and described by DaveWitteMorris in #40372.

  • For non-integral domains, divides() now always uses division with remainder (quo_rem), skipping degree and leading coefficient checks.
  • For integral domains, the original logic is retained.
  • The Laurent polynomial divides() method is unchanged and delegates to the fixed polynomial logic.
  • All original doctests/examples in laurent_polynomial.pyx are left in place, as requested by reviewers.
  • Added new tests for polynomial divisibility over Zmod(4) and Zmod(8), covering all edge cases.

Fixes #40372

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

None.

@aksh08022006
Copy link
Author

If there are any specific issues or further changes you’d like me to address, please let me know and I’ll be happy to make the necessary updates.
If you have any suggestions or feedback on how I can improve this PR to meet the project’s requirements, I appreciate your guidance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect implementation of LaurentPolynomialRing.divides()
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy