[sage-support] Re: groebner basis algorithm: intended way of calling (out of other method)

2019-02-08 Thread Simon King
On 2019-02-08, Daniel Krenn  wrote:
> Which algorithm does not return a *reduced* Gröbner basis?

Singular has some options that determine whether or not a reduced GB is
returned. I simply don't know (and have at the moment no time to look at
the code) whether this option is used. Also, IIRC, there is some toy
implementation of Buchberger's algorithm (which is mainly for teaching,
not for production), and I am not sure if it returns a reduced GB.

In any case, if the documentation says it returns a *reduced* GB, then
we certainly have a bug. Either a bug in the documentation (if in fact
the returned GB is not always reduced) or in caching (if it *is* the
reduced GB and isn't cached).

Best regards,
Simon

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Re: groebner basis algorithm: intended way of calling (out of other method)

2019-02-08 Thread Daniel Krenn
On 2019-02-08 10:33, Simon King wrote:
> On 2019-02-08, Daniel Krenn  wrote:
>> Let I be an ideal. Then I might want to compute something involving
>> Groebner basis, e.g. computing I.variety().
>> Now suppose one wants to select a particular algorithm for the
>> computation of the Groebner basis. Then (due to caching) I use something
>> along the lines of
>>
>>   GB = I.groebner_basis(algorithm='libsingular:slimgb')
>>   I.groebner_basis.set_cache(GB)
>>   I.variety()
>>
>> Is this the intended way of doing so?
> 
> I guess not. I would expect that I.groebner_basis uses caching
> regardless of the used algorithm. Are you sure that this is not the
> case?

Not the case; I've carefully checked the code.

> Or do you say that I.groebner_basis sets a cache item for each possible
> value of "algorithm" individually? That would probably be a bug (i.e.,
> please open a ticket).

Yes, this is what I am saying. And indeed my implied question is,
whether this is a bug.

> Why "probably"? *Reduced* Gröbner bases are unique, hence, they should
> be cached independently of the algorithm used to compute them. But some
> algorithms would only call *some* Gröbner basis, no *the* reduced
> Gröbner basis. So, in these cases it makes sense to not automatically
> cache the value.

And indeed again, this is why I didn't open a ticket up to now. On the
contrary, the one-line description says
  "Return the reduced Groebner basis of this ideal"
Therefore, the intended result is unique and therefore, we have a bug as
above).

Which algorithm does not return a *reduced* Gröbner basis?

Best, Daniel

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: groebner basis algorithm: intended way of calling (out of other method)

2019-02-08 Thread Simon King
Hi Daniel,

On 2019-02-08, Daniel Krenn  wrote:
> Let I be an ideal. Then I might want to compute something involving
> Groebner basis, e.g. computing I.variety().
> Now suppose one wants to select a particular algorithm for the
> computation of the Groebner basis. Then (due to caching) I use something
> along the lines of
>
>   GB = I.groebner_basis(algorithm='libsingular:slimgb')
>   I.groebner_basis.set_cache(GB)
>   I.variety()
>
> Is this the intended way of doing so?

I guess not. I would expect that I.groebner_basis uses caching
regardless of the used algorithm. Are you sure that this is not the
case?

Or do you say that I.groebner_basis sets a cache item for each possible
value of "algorithm" individually? That would probably be a bug (i.e.,
please open a ticket).

Why "probably"? *Reduced* Gröbner bases are unique, hence, they should
be cached independently of the algorithm used to compute them. But some
algorithms would only call *some* Gröbner basis, no *the* reduced
Gröbner basis. So, in these cases it makes sense to not automatically
cache the value.

Best regards,
Simon

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] groebner basis algorithm: intended way of calling (out of other method)

2019-02-08 Thread Daniel Krenn
Let I be an ideal. Then I might want to compute something involving
Groebner basis, e.g. computing I.variety().
Now suppose one wants to select a particular algorithm for the
computation of the Groebner basis. Then (due to caching) I use something
along the lines of

  GB = I.groebner_basis(algorithm='libsingular:slimgb')
  I.groebner_basis.set_cache(GB)
  I.variety()

Is this the intended way of doing so?

(It somehow feels wrong that one needs quite some background on the
implementation and technical understanding (caching in SageMath) to
understand the behavior.)

Details: A method using a Groebner basis calls self.groebner_basis(),
i.e. uses default arguments or whatever is cached.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.