-
-
Notifications
You must be signed in to change notification settings - Fork 572
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
Added option to return explicit polynomial in .in_subalgebra #39555
Conversation
Documentation preview for this PR (built with commit d0845dd; changes) is ready! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor details trying to improve the doc and code formatting.
Co-authored-by: Travis Scrimshaw <[email protected]>
Co-authored-by: Travis Scrimshaw <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. LGTM.
sagemathgh-39555: Added option to return explicit polynomial in .in_subalgebra <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> Fixes sagemath#39225. Previously the function in_subalgebra in src/sage/rins/polynomial/multi_polynomial_libsingular.pyx returned True or False, depending on whether the polynomial was present in the provided subalgebra. When the parameter 'algorithm' was set to 'groebner' it would do this by generating a polynomial, but this polynomial would not be made available to the user. This function was enhanced by adding a key-word only argument 'certificate' to the function which defaults to False. When the value provided for this argument evaluates to False the function behaves as before. When the value provided evaluates to True and the Groebner algorithm is used the function returns the polynomial generated by the algorithm when it would have otherwise returned True, and returns None when it would have otherwise returned False. Additionally, if the value provided for the 'certificate' argument is a string which evaluates to True then that string will be used to name the variables in the generated polynomial. The existing example for this function has been modified to test this new functionality. ### 📝 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. - [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#39555 Reported by: Caleb Van't Land Reviewer(s): Caleb Van't Land, Travis Scrimshaw
Easy enough to fix on a followup PR. |
sagemathgh-39623: Fix spacing for documentation Partially discussed in sagemath#39555. Meanwhile I find a few more. ### 📝 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. - [ ] 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#39623 Reported by: user202729 Reviewer(s): Frédéric Chapoton
sagemathgh-39623: Fix spacing for documentation Partially discussed in sagemath#39555. Meanwhile I find a few more. ### 📝 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. - [ ] 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#39623 Reported by: user202729 Reviewer(s): Frédéric Chapoton
Fixes #39225.
Previously the function in_subalgebra in src/sage/rins/polynomial/multi_polynomial_libsingular.pyx returned True or False, depending on whether the polynomial was present in the provided subalgebra. When the parameter 'algorithm' was set to 'groebner' it would do this by generating a polynomial, but this polynomial would not be made available to the user.
This function was enhanced by adding a key-word only argument 'certificate' to the function which defaults to False. When the value provided for this argument evaluates to False the function behaves as before. When the value provided evaluates to True and the Groebner algorithm is used the function returns the polynomial generated by the algorithm when it would have otherwise returned True, and returns None when it would have otherwise returned False.
Additionally, if the value provided for the 'certificate' argument is a string which evaluates to True then that string will be used to name the variables in the generated polynomial.
The existing example for this function has been modified to test this new functionality.
📝 Checklist
⌛ Dependencies