sagemath / sage

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

Singular refactoring and Groebner Strategy objects #6596

Closed malb closed 14 years ago

malb commented 15 years ago

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

malb commented 15 years ago
comment:1

CCing Burcin, because this patch contains the first step of refactoring he wants.

malb commented 15 years ago
comment:2

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
malb commented 15 years ago
comment:3

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

malb commented 15 years ago
comment:4

Doctests may fail on 32-bit system, #6628 contains the fix, sorry for the mixing.

malb commented 15 years ago
comment:5

Fixed doctests on 32-bit OSX.

aghitza commented 14 years ago
comment:6

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

malb commented 14 years ago
comment:7

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.

malb commented 14 years ago

Attachment: libsingular_refactoring.patch.gz

should apply cleanly against 4.1.1

malb commented 14 years ago
comment:8

I rebased and updated the patch.

aghitza commented 14 years ago

Attachment: trac_6596-referee.patch.gz

apply after the previous patch

aghitza commented 14 years ago
comment:9

Looks good. The attached patch fixes some minor docstring problems.

aghitza commented 14 years ago

Reviewer: Alex Ghitza

malb commented 14 years ago
comment:10

Thanks, the referee patch looks good to me.

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

Merged both patches.

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

Merged: Sage 4.1.2.alpha0

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

See #6872 for a follow-up to this ticket.