You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sage: %timeit J==J2
5 loops, best of 3: 642 ms per loop
sage: _ = J.groebner_basis()
sage: %timeit J==J2
5 loops, best of 3: 642 ms per loop
sage: _ = J2.groebner_basis()
sage: %timeit J==J2
625 loops, best of 3: 6.67 µs per loop
Hence, only when the Gröbner bases of both arguments are cached, then the cached Gröbner bases are used. As one can see by reading the code, even if only one argument does not have the Gröbner basis cached, then Gröbner bases are computed for degrevlex copies of both arguments.
Why copies? We have the same ring here, and we have degrevlex anyway. So, there is no need to copy.
Suggestion: Make the algorithm slightly more clever, so that taking a copy is avoided when the ring is degrevlex anyway. One could also consider to prepend a quick test, such as: Compare the set of generators, and compute Gröbner bases only if the quick test does not suffice to prove equality.
Jeroen, why "dependency"? This here is really just a duplicate.
jdemeyer
changed the title
When comparing ideals, ty to avoid computing the Gröbner basis of a copy of the ideal
When comparing ideals, try to avoid computing the Gröbner basis of a copy of the ideal
Jun 19, 2012
We define a polynomial ring, some ideal, and a copy of that ideal.
We have:
Hence, only when the Gröbner bases of both arguments are cached, then the cached Gröbner bases are used. As one can see by reading the code, even if only one argument does not have the Gröbner basis cached, then Gröbner bases are computed for degrevlex copies of both arguments.
Why copies? We have the same ring here, and we have degrevlex anyway. So, there is no need to copy.
Suggestion: Make the algorithm slightly more clever, so that taking a copy is avoided when the ring is degrevlex anyway. One could also consider to prepend a quick test, such as: Compare the set of generators, and compute Gröbner bases only if the quick test does not suffice to prove equality.
Depends on #12802
CC: @malb
Component: commutative algebra
Reviewer: Simon King
Issue created by migration from https://trac.sagemath.org/ticket/12987
The text was updated successfully, but these errors were encountered: