reduce is defined as:
Reduce an element modulo the reduced Groebner basis for this
ideal. This returns 0 if and only if the element is in this
ideal. In any case, this reduction is unique up to monomial
orders.
See J.reduce?
> So if this is a bug i'll give you more details.
From what you've provided it is hard to tell. Could you provide a small
reproducible example? I know you said its hard to do but without it, it will
be difficult to help you.
Here are my attempts:
sage: P.<y9,y12,y13,y15> = PolynomialRing(CyclotomicField(3))
sage: J.reduce(y13 + y9 - y12)
(-2)*y12 + y13
sage: J.reduce(y13*y15 + y9 - y12)
y13*y15 + (-2)*y12
sage: J.reduce(y9 - y12)
(-2)*y12
Cheers,
Martin
--
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_www: http://www.informatik.uni-bremen.de/~malb
_jab: martinr...@jabber.ccc.de
Luckily (because we can fix it)/ unfortunately (because I'm probably to blame)
it seems like a bug in our pexpect interface to Singular.
First, this is vanilla 3.1.2.rc2:
sage: k.<w> = CyclotomicField(3)
sage: A= PolynomialRing(k, ["y9", "y12", "y13", "y15"])
sage: A.inject_variables()
sage: J= [ y9 + y12]*A
sage: J.groebner_basis()
sage: J.reduce(y13*y15 + y9 - y12)
y13*y15 + y9 - y12
This is 3.1.2.rc2 with
http://trac.sagemath.org/sage_trac/ticket/686
http://trac.sagemath.org/sage_trac/ticket/4022
http://trac.sagemath.org/sage_trac/ticket/4021
applied:
sage: k.<w> = CyclotomicField(3)
sage: A= PolynomialRing(k, ["y9", "y12", "y13", "y15"])
sage: A.inject_variables()
sage: J= [ y9 + y12]*A
sage: J.groebner_basis()
sage: J.reduce(y13*y15 + y9 - y12)
y13*y15 - 2*y12
so quite obviously we fail to tell Singular via pexpect to perform tail
reduction while in the libSingular wrapper we do tail reduction.
I'll look into it. Btw. reduction to zero should still work, since that
doesn't require tail reduction.
Cheers,
Martin
--
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_www: http://www.informatik.uni-bremen.de/~malb
_jab: martinr...@jabber.ccc.de
The solution to this problem is _really_ simple, if we tell Singular "don't do
tail reduction" then it won't tail reduce. Patch coming up.
Alternatively, the forementioned patches might be interesting to you since
they speed up multivariate polynomial arithmetic over absolute number fields
dramatically. All they need are reviews ... hint, hint ;-)
Martin
--
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_www: http://www.informatik.uni-bremen.de/~malb
_jab: martinr...@jabber.ccc.de
Hi there,
the 'hint, hint' was more aimed at other Sage developers who bugged me for
this functionality for months :-)
> This was my one suggestion in the survey: improve the
> documentation on "how to contribute", for real SVN-dummies like me.
> (There was once a mercurial tutorial on the sage mirror i use, now
> even this seems to be gone.) Note that i know how to program
> reasonably well (C++ and Python), i'm just stuck with men's singles.
> No clue about playing in a team.
We started working on the Developer's guide again, which should eventually
address all those issues.
> If you have any pointers, they'll be welcome. In fact i'm toying with
> the idea of applying for a "teaching-free year", like they grant you
> every few years in France, in order to be more involved with sage.
You can have a look at the current stage here:
http://sage.math.washington.edu/home/mhansen/doc-sphinx/developer/.build/html/
(which is Mike Hansens copy for conversion from LaTeX to ReST/Sphinx)
We'd be very happy to hear what is unclear, missing, etc. Some parts are not
done yet (e.g. coercion) though.
Cheers,