Macaulay2 / M2

The primary source code repository for Macaulay2, a system for computing in commutative algebra, algebraic geometry and related fields.
https://macaulay2.com
330 stars 228 forks source link

improving trim #157

Open kschwede opened 9 years ago

kschwede commented 9 years ago

Trim for non-homogeneous ideals does a bad job (as does Prune for non-homogeneous modules), often making things worse.

In some experiments coming a Grobner basis seems to be much better, sometimes also computing

I : ideal(sub(1, R))

helps also.

DanGrayson commented 9 years ago

There doesn't seem to be an algorithm for making it better. So what should we do?

kschwede commented 9 years ago

Hm, since presumably a Groebner basis is being computed anyways, one could at least see if it appears to be simpler than the given generating set (for instance, if it has fewer elements, but there could be some slightly more subtle measurements too, like counting total monomials). Perhaps one could combine this with what trim is already doing?

DanGrayson commented 9 years ago

Could you provide an example where gb does better?

On Wed, Jul 30, 2014 at 6:38 PM, Karl Schwede notifications@github.com wrote:

Hm, since presumably a Groebner basis is being computed anyways, one could at least see if it appears to be simpler than the given generating set (for instance, if it has fewer elements, but there could be some slightly more subtle measurements too, like counting total monomials). Perhaps one could combine this with what trim is already doing?

— Reply to this email directly or view it on GitHub https://github.com/Macaulay2/M2/issues/157#issuecomment-50690131.

kschwede commented 9 years ago

Sure, sorry about that. I wrote this (with some examples) over in the Macaulay2 google group and Mike asked me to post it over here too.

R = QQ[y,z]/(1+y^3+z^3) J = ideal(y, z+1)

J defines a point on an affine chart of an elliptic curve. Obviously J^3 is a principal ideal (z+1).

However using trim and prune don't do anything useful (ie, don't notice that it is principal).

i11 : toString( trim(J^3)) o11 = ideal(z^2+z,y_z+y,z^3+1,y_z^2+2_y_z+y,y^2*z+y^2)

computing a Groebner basis or computing trim ( J^3 : ideal(sub(1, R)) )

will quickly yield principal ideals though.

Best wishes and sorry, I should have posted the complete information.

DanGrayson commented 9 years ago

Thanks!

On Wed, Jul 30, 2014 at 8:00 PM, Karl Schwede notifications@github.com wrote:

Sure, sorry about that. I wrote this (with some examples) over in the Macaulay2 google group and Mike asked me to post it over here too.

R = QQ[y,z]/(1+y^3+z^3) J = ideal(y, z+1)

J defines a point on an affine chart of an elliptic curve. Obviously J^3 is a principal ideal (z+1).

However using trim and prune don't do anything useful (ie, don't notice that it is principal).

i11 : toString( trim(J^3)) o11 = ideal(z^2+z,y_z+y,z^3+1,y_z^2+2_y_z+y,y^2*z+y^2)

computing a Groebner basis or computing trim ( J^3 : ideal(sub(1, R)) )

will quickly yield principal ideals though.

Best wishes and sorry, I should have posted the complete information.

— Reply to this email directly or view it on GitHub https://github.com/Macaulay2/M2/issues/157#issuecomment-50696979.