Feature #996
New function: IdealOfGBasis
Description
Consider this case
I := ideal(.....); G := GBasis(I); J := ideal(G);
now, G is the GBasis of J, but J does not know it. So
GBasis(J)
has to recompute it.
I propose to add in (CoCoALib and) CoCoA-5 the function IdealOfGBasis(I)
which does as above and sets the GBasis of the returned value.
Related issues
History
#1 Updated by Anna Maria Bigatti about 7 years ago
- Related to Feature #957: New function: HasGBasis added
#2 Updated by Anna Maria Bigatti about 7 years ago
- Related to Bug #349: IdealOfPoints: gens are actually a GBasis added
#3 Updated by Anna Maria Bigatti about 7 years ago
Asking for approval: is this name ok?
#4 Updated by Anna Maria Bigatti about 7 years ago
- Related to Feature #1017: New function: SetGBasisAsGens [--> NO: use IdealOfGBasis] added
#5 Updated by Anna Maria Bigatti about 7 years ago
- Related to Design #1020: Rename minimalized(I) into IdealOfMinGens(I)? added
#6 Updated by John Abbott about 7 years ago
As I pointed out in #1020, this fn should also copy across any 3-way flags (e.g. IamRadical3
) from the original ideal.
#7 Updated by Anna Maria Bigatti about 7 years ago
John Abbott wrote:
As I pointed out in #1020, this fn should also copy across any 3-way flags (e.g.
IamRadical3
) from the original ideal.
oh, I guess you are right :-/
#8 Updated by Anna Maria Bigatti about 7 years ago
John Abbott wrote:
As I pointed out in #1020, this fn should also copy across any 3-way flags (e.g.
IamRadical3
) from the original ideal.
After trying to do it, I realized I cannot.
You seemed against having IdealOfGBasis
in CoCoALib, so I have no access to the flags.
They have to be set with care: for example, IhaveMonomialGens3Value
should not be copied if false
(GBasis might be monomial)
#9 Updated by John Abbott about 7 years ago
- Status changed from New to In Progress
I don't recall being opposed to the idea of having IdealOfGBasis
(or something similar) in CoCoALib.
Now that you point out that not all flags can be simply copied, it seems potentially "safer" to have a function which makes a new ideal, rather than one which "updates" an existing ideal. When making a new ideal one has to copy explicitly those flags which are to be preserved; in constrast, when "updating" an ideal one has to reset any flags which need this. Human forgetfulness could lead to wasted computation in the first case (as some "forgotten" flag is recomputed), whereas it might lead to an incorrectly set flag in the second case.
An annoying feature of creating a new ideal (and thus copying all relevant flags) is that adding more flags in the future would require updating the "pseudo-copy-constructor" [though as I pointed out above, forgetting to do so will, in the worst case, just waste some recomputation].
#10 Updated by Anna Maria Bigatti almost 7 years ago
John Abbott wrote:
I don't recall being opposed to the idea of having
IdealOfGBasis
(or something similar) in CoCoALib.
Then should I move IdealOfGBasis
and IdealOfMinGens
from CoCoALibSupplement
to SparsePolyRing
?
#11 Updated by Anna Maria Bigatti almost 7 years ago
- Status changed from In Progress to Resolved
- % Done changed from 10 to 70
#12 Updated by John Abbott almost 7 years ago
OK to put IdealOfGBasis
into SparsePolyRing.C
assuming you are convinced that that is the right place.
What about something similar for Janet bases?
#13 Updated by John Abbott almost 7 years ago
Cosa dovrebbe fare il seguente?
IdealOfGBasis(ideal(zero(P)));
NOTE: problem came up when I did GroebnerFanIdeals(ideal(0,0))
#14 Updated by Anna Maria Bigatti almost 7 years ago
- Related to Feature #1053: New function: IdealOfGBasis, IdealOfMinGens in CoCoALib added
#15 Updated by Anna Maria Bigatti almost 7 years ago
- Status changed from Resolved to Feedback
- % Done changed from 70 to 90
John Abbott wrote:
Cosa dovrebbe fare il seguente?
fixed
#16 Updated by Anna Maria Bigatti almost 7 years ago
- Estimated time set to 2.01 h
#17 Updated by Anna Maria Bigatti almost 7 years ago
- Status changed from Feedback to Closed
- % Done changed from 90 to 100