-
-
Notifications
You must be signed in to change notification settings - Fork 411
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
Cache groebner basis independend of degree bound #11667
Comments
This comment has been minimized.
This comment has been minimized.
Author: Volker Braun |
comment:2
I don't like that approach, for two reasons.
In other words, the approach of using a truncated Gröbner basis by default is error prone, potentially yields very difficult to debug problems, and violates the "explicit is better than implicit" mantra. If the user wants to play dirty, then s/he can already do so: One can explicitly set the return value of a cached method. Hence, if the user really wants to use a Gröbner basis out to degree 5 and pretend it to be a complete Gröbner basis, then s/he can already do so - but that must never happen accidentally! A valid approach would be to edit the places in which Gröbner bases are actually used, e.g., in the normal form computation. There, one could explicitly request a truncated Gröbner basis out to the degree of the polynomial that is going to be normalised. And then, the groebner_basis method could be modified to handle the degbound argument more intelligently:
Note that I have followed a similar approach in my implementation of Gröbner bases for free non-commutative associative homogeneous ideals - see #7797. With that approach, cached methods can not be used, but it would at least be for a good reason. Note that an additional detail may be taken care of. As much as I know, if one knows a Gröbner basis g out to degree d of an ideal J and wants to compute a Gröbner basis G out to degree D>d, then it is easier to start the computation of G with g and not with J. |
Reviewer: Simon King |
Work Issues: Error prone computations may be done explicitly, but must not be the default |
comment:3
I think a solution to Simon's objections would be to create a separate function, perhaps Note that an additional detail may be taken care of. As much as I know, if one knows a Gröbner basis g out to degree d of an ideal J and wants to compute a Gröbner basis G out to degree D>d, then it is easier to start the computation of G with g and not with J. There is also no need to recompute S-polynomials of degree less than or equal to d. Does anyone know if Singular tracks that or is aware of it? If not, that might be a feature request upstream. |
comment:4
Breaking out the functionality of a fake groebner basis sounds good. I'd prefer I don't see any good use case for a degree bound with inhomogeneous ideals, but that doesn't mean that it doesn't exist. For very specific ideals it might be useful to be able to compute with degree bounds even if it is not homogeneous, so I want to keep open that possibliity. We should probably show a warning in that case, though. |
comment:5
It seems to me that "truncated Gröbner basis" is a correct term for this, at least in the inhomogeneous case. See, for example, Definition 2.8 of "A new efficient algorithm for computing Gröbner bases (F4)" by J-C Faugére, Journal of Pure and Applied Algebra, vol 139 (1999) 61-88. In the homogeneous case, it is called a "degree d" Gröbner basis. I'm not aware of "partial" or "incomplete" Gröbner basis in the literature, though perhaps they exist. |
comment:6
I think "truncated_groebner_basis" is the correct name in inhomogeneous case. Namely, a "Gröbner basis G_d out to degree d of an ideal I" has the property that all leading monomials of I of degree less than or equal d are divisible by the leading monomial of an element of G. But if a degree bound is given then Singular simply disregards all S-polynomials of degree greater than d. Hence, in the inhomogeneous case, it could be that the result obtained from a computation with I think it is a good idea to add a new function for truncated GBs. What about the following model?
Concerning John's question whether Singular preserves the information that all S-polynomials out to a certain degree are computed: I don't know. But the real question is not whether Singular keeps that information, but whether libsingular keeps that information. I know, for example, that Singular can provide polynomial rings with arbitrary attributes - but the field storing that information has not been wrapped in Sage. I think attributes for ideals can be used in Sage to some extent, but I don't know if (lib)singular really is able to continue a truncated GB computation. |
comment:7
My issue with the name is that the truncation of the Groebner basis computation is in general not the truncation of the Groebner basis. But it is for homogeneous ideals which is the main use case, so maybe we should use My main problem is not that I can't compute a truncated Groebner basis, it is that I want to be able to use it as if it were a complete Groebner basis. This is of course dangerous, but it is also an often-used trick. So there should be a way to do it. It didn't occur to me to meddle with the |
comment:8
Replying to @vbraun:
Yes. And therefore (at least according to the terminology that I learnt) one has "Gröbner basis out to degree d" on the one hand (that is: the Gröbner basis is completely known out to degree d), and "Gröbner basis truncated at degree d" on the other hand (that is: all S-polynomials of degree at most d can be reduced to zero). For homogeneous ideals the two notions coincide.
I don't understand what |
comment:9
Replying to @simon-king-jena:
Yes, that is what I meant. This will ensure it is used in |
comment:10
Replying to @simon-king-jena:
I had never heard of a truncated Gröbner basis outside of this context. Learn something new every day. If I understand correctly, Volker wants to use this even in the context of inhomogeneous ideals? |
comment:11
Replying to @johnperry-math:
Yes, but "wants to use" is perhaps the wrong wording. He wants to give the user the possibility to use this, error prone though it is in a non-homogeneous context. Certainly truncation will not be the default, and certainly there will be a big fat warning message in the documentation, telling the user that Sage's money-back guarantee will expire if he/she uses that method. Or at least that is what I understood... |
comment:12
Replying to @simon-king-jena:
Yes, that was my intent by the phrase. |
comment:13
Replying to @vbraun:
If the user subsequently called |
Rediffed for Sage-4.7.2.alpha2 |
comment:14
Attachment: trac_11667_use_groebner_basis_with_degree_bound.patch.gz Replying to @johnperry-math:
No. By definition, it this would not be desired after the user forced Sage to use the incomplete Groebner basis.
One would not. If you go out of your way to break it, you get to keep both pieces. Your hypothetical ignorant user could have just as well modified the |
One of the basic tricks when working with Groebner bases is to compute only up to a certain degree bound. Right now we support that, but then we attempt to compute the complete Groebner basis for any subsequent operation (which is often impossible due to time/memory constraints).
This patch caches the Groebner basis independent of the degree bound.
Apply trac_11667_use_groebner_basis_with_degree_bound.patch
CC: @simon-king-jena @burcin
Component: commutative algebra
Work Issues: Error prone computations may be done explicitly, but must not be the default
Author: Volker Braun
Reviewer: Simon King
Issue created by migration from https://trac.sagemath.org/ticket/11667
The text was updated successfully, but these errors were encountered: