Closed malb closed 14 years ago
CCing Burcin, because this patch contains the first step of refactoring he wants.
Groebner Strategy in action
sage: P = PolynomialRing(QQ,6,'x')
sage: I = sage.rings.ideal.Cyclic(P)
sage: J = Ideal(I.groebner_basis())
sage: J.ngens()
45
sage: f = P.random_element()
The usual call to kNF
:
sage: %timeit f.reduce(J.gens())
1000 loops, best of 3: 1.11 ms per loop
Using the GroebnerStrategy
object.
sage: %timeit J.reduce(f)
100000 loops, best of 3: 9.37 µs per loop
This patch requires Singular 3-1-0-4 which is available at
http://sage.math.washington.edu/home/malb/spkgs/singular-3-1-0-4-20090723.spkg
Doctests may fail on 32-bit system, #6628 contains the fix, sorry for the mixing.
Fixed doctests on 32-bit OSX.
I am having trouble applying this patch on top of sage-4.1.1 + the latest spkg at #6476. The issues occur in multi_polynomial_libsingular.pyx
, and there is too much stuff going on for me to just rebase it myself...
Replying to @malb:
This patch requires Singular 3-1-0-4 which is available at
http://sage.math.washington.edu/home/malb/spkgs/singular-3-1-0-4-20090723.spkg
Note that this is outdated, use
http://sage.math.washington.edu/home/malb/spkgs/singular-3-1-0-4-20090818.spkg
instead.
Attachment: libsingular_refactoring.patch.gz
should apply cleanly against 4.1.1
I rebased and updated the patch.
Attachment: trac_6596-referee.patch.gz
apply after the previous patch
Looks good. The attached patch fixes some minor docstring problems.
Reviewer: Alex Ghitza
Thanks, the referee patch looks good to me.
Merged both patches.
Merged: Sage 4.1.2.alpha0
See #6872 for a follow-up to this ticket.
The attached patch factors out some commonly called code for dealing with libsingular to make it more accessible.
Also, the attached patch wraps Singular's Gröbner strategy objects which allow much faster normal form computations.
CC: @sagetrac-PolyBoRi @burcin
Component: commutative algebra
Keywords: singular
Author: Martin Albrecht, Michael Brickenstein, Hans Schönemann
Reviewer: Alex Ghitza
Merged: Sage 4.1.2.alpha0
Issue created by migration from https://trac.sagemath.org/ticket/6596