sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.44k stars 480 forks source link

sorting of ideal bases #6545

Closed malb closed 15 years ago

malb commented 15 years ago

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.

Component: commutative algebra

Author: Martin Albrecht

Reviewer: John Perry

Merged: Sage 4.1.2.alpha2

Issue created by migration from https://trac.sagemath.org/ticket/6545

malb commented 15 years ago
comment:1

Attachment: trac_6545_mpolynomial_ideal_sorted_outputs.patch.gz

johnperry-math commented 15 years ago
comment:2

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?

malb commented 15 years ago
comment:3

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.

aghitza commented 15 years ago

Description changed:

--- 
+++ 
@@ -1 +1 @@
-`MPolynomialIdeal.interreduced_basis()` should return the same sorted list as `MPolynomialIdeal.interreduced_basis()`, also the input to `MPolynomialIdeal.triangular_decomposition()` must be sorted to avoid confusing Singular.
+`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.
malb commented 15 years ago
comment:5

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

johnperry-math commented 15 years ago
comment:6

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

malb commented 15 years ago
comment:7

Strange, here is what I do:

Did you mix up raw-attachment and attachment?

johnperry-math commented 15 years ago
comment:8

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...

johnperry-math commented 15 years ago
comment:9

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?

malb commented 15 years ago
comment:10

Yep, that should be it.

johnperry-math commented 15 years ago
comment:11

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

malb commented 15 years ago
comment:12

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.

johnperry-math commented 15 years ago
comment:13

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

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

7c09a680-e216-4024-bb8e-9bfd4aa7f313 commented 15 years ago
comment:14

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 https://github.com/sagemath/sage-prod/files/10645558/trac_6545_mpolynomial_ideal_sorted_outputs.patch.gz && 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
malb commented 15 years ago
comment:15

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.

7c09a680-e216-4024-bb8e-9bfd4aa7f313 commented 15 years ago

rebased against Sage 4.1.2.alpha1

7c09a680-e216-4024-bb8e-9bfd4aa7f313 commented 15 years ago
comment:16

Attachment: trac_6545-rebased.patch.gz

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)
7c09a680-e216-4024-bb8e-9bfd4aa7f313 commented 15 years ago
comment:17

Merged trac_6545-rebased.patch.

7c09a680-e216-4024-bb8e-9bfd4aa7f313 commented 15 years ago

Merged: Sage 4.1.2.alpha2

7c09a680-e216-4024-bb8e-9bfd4aa7f313 commented 15 years ago

Reviewer: John Perry