-
-
Notifications
You must be signed in to change notification settings - Fork 488
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
Generic implementation of fitting ideal #36299
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…for MPolynomialRing
5 tasks
enriqueartal
approved these changes
Sep 25, 2023
Documentation preview for this PR (built with commit e4e3f36; changes) is ready! 🎉 |
This was referenced Sep 30, 2023
vbraun
pushed a commit
to vbraun/sage
that referenced
this pull request
Dec 4, 2023
…tic varieties <!-- Describe your changes here in detail --> Recently in sagemath#36128 (already in develop) characteristic varieties of finitely presented fundamental groups were introduced. Its computation is based on Fitting ideals of Laurent polynomial matrices. In sagemath#36299, Fitting ideals were implemented for generic rings with some improvements for PID and polynomial rings. There are two original goals in this PR: to improve the output of characteristic varieties and to use the cited implementation. In order to make computations faster, the implementation of Fitting ideals should apply to Laurent polynomial rings and for this goal, several changes should be applied to Laurent polynomials in `Sagemath`. I am not sure if a deeper change should be made, since I applied only the changes I needed for the above goal: - src/sage/groups/finitely_presented.py: - Changes in `fitting_ideals`. - src/sage/matrix/matrix2.py: Style changes. - src/sage/matrix/matrix_laurent_mpolynomial_dense.pyx: This is a new file to create the class `Matrix_laurent_mpolynomial_dense`. - A method `laurent_matrix_reduction` to obtain a matrix of polynomials where the variables are non common factors for neither the rows nor the columns. - A methord `_fitting_ideal` to use the same method for matrices of polynomials. - src/sage/matrix/matrix__mpolynomial_dense.pyx: Style changes. The main changes are for Laurent polynomials to avoid errors in the above implementations. - src/sage/rings/polynomials/laurent_polynomial.pyx: - Style changes. - Create `xgcd` needed for `inverse_mod`. - Create `inverse_mod`. - Create `divides`, I copied the code for polynomials with minor changes. - src/sage/rings/polynomials/laurent_polynomial_ideal.py: - Style changes. - Changes in hint keyword in `__init__`, the previous code create issues, e.g., impossible to sum ideals of univariate Laurent polynomial rings. They involve changes in doctests for `hint` - Changes in `__contains__` since `__reduce__` is different for univariate and multivaraite case. - Create `gens_reduced`. - Changes in `polynomial_ideal` to deal differently if uni- and multi-variate. - src/sage/rings/polynomials/laurent_polynomial_mpair.py: - Style changes. - Create `divides`, I copied the code for polynomials with minor changes. - src/sage/rings/polynomials/laurent_polynomial_ring.py: - Style changes. - Some `TestSuite`'s applied to domains as base_rings; the corresponding `TestSuite`'s for polynomials also failed if applied to polynomial rings. - src/sage/rings/polynomials/laurent_polynomial_ring_base.py: - Style changes. - Implement `is_noetherian`. - src/sage/rings/polynomials/polynomial_element.pyx: Style changes. <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have created tests covering the changes. - [x] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36368 Reported by: Enrique Manuel Artal Bartolo Reviewer(s): Enrique Manuel Artal Bartolo, kedlaya, miguelmarco, Travis Scrimshaw
vbraun
pushed a commit
to vbraun/sage
that referenced
this pull request
Dec 5, 2023
…tic varieties <!-- Describe your changes here in detail --> Recently in sagemath#36128 (already in develop) characteristic varieties of finitely presented fundamental groups were introduced. Its computation is based on Fitting ideals of Laurent polynomial matrices. In sagemath#36299, Fitting ideals were implemented for generic rings with some improvements for PID and polynomial rings. There are two original goals in this PR: to improve the output of characteristic varieties and to use the cited implementation. In order to make computations faster, the implementation of Fitting ideals should apply to Laurent polynomial rings and for this goal, several changes should be applied to Laurent polynomials in `Sagemath`. I am not sure if a deeper change should be made, since I applied only the changes I needed for the above goal: - src/sage/groups/finitely_presented.py: - Changes in `fitting_ideals`. - src/sage/matrix/matrix2.py: Style changes. - src/sage/matrix/matrix_laurent_mpolynomial_dense.pyx: This is a new file to create the class `Matrix_laurent_mpolynomial_dense`. - A method `laurent_matrix_reduction` to obtain a matrix of polynomials where the variables are non common factors for neither the rows nor the columns. - A methord `_fitting_ideal` to use the same method for matrices of polynomials. - src/sage/matrix/matrix__mpolynomial_dense.pyx: Style changes. The main changes are for Laurent polynomials to avoid errors in the above implementations. - src/sage/rings/polynomials/laurent_polynomial.pyx: - Style changes. - Create `xgcd` needed for `inverse_mod`. - Create `inverse_mod`. - Create `divides`, I copied the code for polynomials with minor changes. - src/sage/rings/polynomials/laurent_polynomial_ideal.py: - Style changes. - Changes in hint keyword in `__init__`, the previous code create issues, e.g., impossible to sum ideals of univariate Laurent polynomial rings. They involve changes in doctests for `hint` - Changes in `__contains__` since `__reduce__` is different for univariate and multivaraite case. - Create `gens_reduced`. - Changes in `polynomial_ideal` to deal differently if uni- and multi-variate. - src/sage/rings/polynomials/laurent_polynomial_mpair.py: - Style changes. - Create `divides`, I copied the code for polynomials with minor changes. - src/sage/rings/polynomials/laurent_polynomial_ring.py: - Style changes. - Some `TestSuite`'s applied to domains as base_rings; the corresponding `TestSuite`'s for polynomials also failed if applied to polynomial rings. - src/sage/rings/polynomials/laurent_polynomial_ring_base.py: - Style changes. - Implement `is_noetherian`. - src/sage/rings/polynomials/polynomial_element.pyx: Style changes. <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have created tests covering the changes. - [x] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36368 Reported by: Enrique Manuel Artal Bartolo Reviewer(s): Enrique Manuel Artal Bartolo, kedlaya, miguelmarco, Travis Scrimshaw
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
and specific _fitting_ideal for MPolynomialRing
This implements a method
fitting_ideal
for generic matrices, that only does a simple optimizations, and a more optimized version (named_fitting_ideal
) for matrices over polynomial rings with multiple variables.Fixes #36298
📝 Checklist
⌛ Dependencies