Ticket #6545 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

[with patch, positive review] sorting of ideal bases

Reported by: malb Owned by: malb
Priority: major Milestone: sage-4.1.2
Component: commutative algebra Keywords:
Cc: Work issues:
Report Upstream: Reviewers: John Perry
Authors: Martin Albrecht Merged in: Sage 4.1.2.alpha2
Dependencies: Stopgaps:

Description (last modified by AlexGhitza) (diff)

MPolynomialIdeal.interreduced_basis() should return the same sorted list as MPolynomialIdeal.groebner_basis() when called on an ideal which has a (not reduced) Groebner basis as set of generator. Also the input to MPolynomialIdeal.triangular_decomposition() must be sorted to avoid confusing Singular.

Attachments

trac_6545_mpolynomial_ideal_sorted_outputs.patch Download (10.4 KB) - added by malb 4 years ago.
trac_6545-rebased.patch Download (9.2 KB) - added by mvngu 4 years ago.
rebased against Sage 4.1.2.alpha1

Change History

Changed 4 years ago by malb

comment:1 Changed 4 years ago by malb

  • Summary changed from sorting of ideal bases to [with patch, needs review] sorting of ideal bases

comment:2 Changed 4 years ago by john_perry

I don't understand the description of the comment: "MPolynomialIdeal.interreduced_basis() should return the same sorted list as MPolynomialIdeal.interreduced_basis()" Can someone elaborate?

comment:3 Changed 4 years ago by malb

Sorry, my bad. It should read

MPolynomialIdeal.interreduced_basis() should return the same sorted list as MPolynomialIdeal.groebner_basis() when called on an ideal which has a (not reduced) Groebner basis as set of generators.

comment:4 Changed 4 years ago by AlexGhitza

  • Description modified (diff)

comment:5 Changed 4 years ago by malb

Still applies against 4.1.1. One hunk might fail if #6596 and #6628 are applied (they fix the same annoying doctest output).

comment:6 Changed 4 years ago by john_perry

I'm working on an unmodified sage 4.1.1 and I can't get the patch to work. Nearly all the hunks fail.

comment:7 Changed 4 years ago by malb

Strange, here is what I do:

Did you mix up raw-attachment and attachment?

comment:8 Changed 4 years ago by john_perry

I tried your suggestion and it failed with the same errors. This will sound weird, but I'm looking at the diff and at the file, and it looks as if the patch applied anyway. I don't get it; maybe this thing isn't unmodified, or something is mucked up in the hg. I'm trying to work it out...

comment:9 Changed 4 years ago by john_perry

This seems to be working, with one exception. When I run it, I get one error:

TypeError?: factor() got an unexpected keyword argument 'proof'

This is ticket #5958, isn't it?

comment:10 Changed 4 years ago by malb

Yep, that should be it.

comment:11 Changed 4 years ago by john_perry

Should I mark this as a positive review? Once the patch to ticket 5958 is applied, this should work.

comment:12 Changed 4 years ago by malb

I just did a {{{make test}} with the following patches applied on sage.math

variety_CC.patch
variety_CC2.patch
trac_6545_mpolynomial_ideal_sorted_outputs.patch

and all tests passed. So I guess it is a positive review then? I leave it up to you.

comment:13 Changed 4 years ago by john_perry

  • Summary changed from [with patch, needs review] sorting of ideal bases to [with patch, positive review] sorting of ideal bases

I say positive review. If anyone says otherwise I'll leave academia and become a hermit.

Well, maybe not. But I'll want to. ;-)

comment:14 Changed 4 years ago by mvngu

First I merged patches at #6596 and #6628. Merging trac_6545_mpolynomial_ideal_sorted_outputs.patch results in a hunk failure:

[mvngu@mod sage-main]$ hg qimport http://trac.sagemath.org/sage_trac/raw-attachment/ticket/6545/trac_6545_mpolynomial_ideal_sorted_outputs.patch && hg qpush
adding trac_6545_mpolynomial_ideal_sorted_outputs.patch to series file
applying trac_6545_mpolynomial_ideal_sorted_outputs.patch
patching file sage/schemes/hyperelliptic_curves/jacobian_morphism.py
Hunk #1 FAILED at 294
1 out of 1 hunks FAILED -- saving rejects to file sage/schemes/hyperelliptic_curves/jacobian_morphism.py.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working dir
Errors during apply, please fix and refresh trac_6545_mpolynomial_ideal_sorted_outputs.patch

comment:15 Changed 4 years ago by malb

You can ignore this hunk failure it was also fixed in either #6596 or #6628. It was just this really annoying doctest failure which would crop up everytime one changes anything related to multivariate polynomial ideals.

Changed 4 years ago by mvngu

rebased against Sage 4.1.2.alpha1

comment:16 Changed 4 years ago by mvngu

The patch trac_6545-rebased.patch is a rebase of trac_6545_mpolynomial_ideal_sorted_outputs.patch against Sage 4.1.2.alpha1. The rebased patch is the same as the previous patch, but without this hunk:

--- jacobian_morphism.py                                                                                                                                                                                             
+++ jacobian_morphism.py                                                                                                                                                                                             
@@ -295,7 +295,7 @@
         sage: H = HyperellipticCurve(f, 2*x); H                                                                                                                                                                     
         Hyperelliptic Curve over Finite Field of size 1000000000000000000000000000057 defined by y^2 + 2*x*y = x^7 + x^2 + 1                                                                                        
         sage: J = H.jacobian()(F); J                                                                                                                                                                                
-        verbose 0 (919: multi_polynomial_ideal.py, dimension) Warning: falling back to very slow toy implementation.                                                                                                
+        verbose 0 (...: multi_polynomial_ideal.py, dimension) Warning: falling back to very slow toy implementation.                                                                                                
         Set of points of Jacobian of Hyperelliptic Curve over Finite Field of size 1000000000000000000000000000057 defined by y^2 + 2*x*y = x^7 + x^2 + 1 defined over Finite Field of size 10000000000000000000000\
00000057                                                                                                                                                                                                             
         sage: Q = J(H.lift_x(F(1))); Q                                                                                                                                                                              
         (x + 1000000000000000000000000000056, y + 1000000000000000000000000000056)

comment:17 Changed 4 years ago by mvngu

  • Status changed from new to closed
  • Reviewers set to John Perry
  • Resolution set to fixed
  • Merged in set to Sage 4.1.2.alpha2

Merged trac_6545-rebased.patch.

Note: See TracTickets for help on using tickets.