-
-
Notifications
You must be signed in to change notification settings - Fork 619
CRT_vectors does not handle non-coprime moduli #39158
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
Comments
Related or possibly duplicate: #32487 |
I am not a number theorist, but I think the following is a reasonable construction of a We have moduli This means that the solution to the CRT problem with residues See the following comment for a justification of this CRT basis. |
Justification of the above formula for a Let's see a particular solution of the CRT problem with just two residues Proof. By simple algebra, we have Now, we can justify the formula.
|
While that's a step in improvement, I'd rather hiding the feature behind a flag |
Yes, I agree that a flag should be added to the EDIT: I think it would be better to call the flag |
sagemathgh-40007: Fixed issue in CRT_vectors where moduli are not allowed to be coprime. Fixes sagemath#39158. Fixed the issue by creating functionality for `CRT_basis` if the moduli are not coprime. A more in depth explanation on how `CRT_basis` was expanded can be found in [Here](sagemath#39158). ### 📝 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. - [X] I have linked a relevant issue or discussion. - [X] I have created tests covering the changes. - [ ] 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#40007 Reported by: Noel-Roemmele Reviewer(s): DaveWitteMorris, Noel-Roemmele
sagemathgh-40007: Fixed issue in CRT_vectors where moduli are not allowed to be coprime. Fixes sagemath#39158. Fixed the issue by creating functionality for `CRT_basis` if the moduli are not coprime. A more in depth explanation on how `CRT_basis` was expanded can be found in [Here](sagemath#39158). ### 📝 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. - [X] I have linked a relevant issue or discussion. - [X] I have created tests covering the changes. - [ ] 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#40007 Reported by: Noel-Roemmele Reviewer(s): DaveWitteMorris, Noel-Roemmele
Uh oh!
There was an error while loading. Please reload this page.
Steps To Reproduce
Expected Behavior
Actual Behavior
Additional Information
Lead to a test failure here https://github.com/sagemath/sage/actions/runs/12390050306/job/34584290514?pr=39153#step:10:8784
Environment
Checklist
The text was updated successfully, but these errors were encountered: