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

Implement algebra_containment from Singular #34502

Closed
jhpalmieri opened this issue Sep 7, 2022 · 5 comments · Fixed by #36030
Closed

Implement algebra_containment from Singular #34502

jhpalmieri opened this issue Sep 7, 2022 · 5 comments · Fixed by #36030

Comments

@jhpalmieri
Copy link
Member

Implement the algebra_containment procedure from Singular. Perhaps also inSubring.

Component: packages: standard

Branch/Commit: u/jhpalmieri/singular-subalgebra-containment @ 852b2c4

Issue created by migration from https://trac.sagemath.org/ticket/34502

@rburing
Copy link
Contributor

rburing commented Sep 14, 2022

comment:1

See my answer to https://ask.sagemath.org/question/58630/compute-minimal-number-of-generators-of-subring/ for a description of the algorithm and an implementation via the Singular interface.

@jhpalmieri
Copy link
Member Author

comment:2

That's very helpful. For the particular case I was using, I had already implemented my own version using the algorithm you described there (item 1 below). Now I see at least three options:

  1. create a polynomial ring with new generators z_1, ..., z_m corresponding to the subalgebra generators y_1, ..., y_m and reduce using the ideal (z_i - y_i)
  2. use the in_subring function that you provided
  3. use an algebra_containment function with a very similar definition

By the way, regarding item 1, is there any advantage to replacing a line like

J = R.ideal(z1 - (whatever), z2 - (whatever))

with

J = R.ideal(z1 - (whatever), z2 - (whatever)).groebner_basis()

Does that speed up the f.reduce(J) computation, for example if you need to do this for many f?

@jhpalmieri
Copy link
Member Author

@jhpalmieri
Copy link
Member Author

comment:4

Here is a draft. Maybe it would be better to not use singular_lib and singular_function and instead define these at the same level as other Singular functions in Sage. Anyway, it's a start.


New commits:

852b2c4trac 34502: subalgebra containment tests for polynomial algebras

@jhpalmieri
Copy link
Member Author

Commit: 852b2c4

@mkoeppe mkoeppe removed this from the sage-9.8 milestone Jan 29, 2023
jhpalmieri added a commit to jhpalmieri/sage that referenced this issue Aug 3, 2023
jhpalmieri added a commit to jhpalmieri/sage that referenced this issue Aug 3, 2023
vbraun pushed a commit to vbraun/sage that referenced this issue Aug 23, 2023
…agemath#34502)

    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->

This implements subalgebra containment for polynomials: whether a
polynomial is contained in the subalgebra determined by given
generators.

<!-- Describe your changes here in detail -->

<!-- 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. -->

This fixes sagemath#34502. It provides several algorithms for the calculution,
using Singular's algebra_containment, Singular's inSubring, or Sage's
Groebner basis tools.


### 📝 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 linked a relevant issue or discussion.
- [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#36030
Reported by: John H. Palmieri
Reviewer(s): John H. Palmieri, Kwankyu Lee
vbraun pushed a commit to vbraun/sage that referenced this issue Aug 27, 2023
…agemath#34502)

    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->

This implements subalgebra containment for polynomials: whether a
polynomial is contained in the subalgebra determined by given
generators.

<!-- Describe your changes here in detail -->

<!-- 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. -->

This fixes sagemath#34502. It provides several algorithms for the calculution,
using Singular's algebra_containment, Singular's inSubring, or Sage's
Groebner basis tools.


### 📝 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 linked a relevant issue or discussion.
- [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#36030
Reported by: John H. Palmieri
Reviewer(s): John H. Palmieri, Kwankyu Lee
@mkoeppe mkoeppe added this to the sage-10.2 milestone Aug 27, 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.

3 participants