Updates:
Labels: Polynomial
Comment #1 on issue 2456 by [email protected]: bug in polytools.groebner
http://code.google.com/p/sympy/issues/detail?id=2456
The last part, i.e. "domain.has_Field = True" in this example is not True,
because the initial coefficient domain is integer ring (it doesn't matter
that Groebner bases are computed over a field). If you want the resulting
basis to be over a field, tell groebner() precisely what you want to
achieve, e.g.:
In [1]: F = [x*y - 2*y, 2*y**2 - x**2]
In [2]: groebner(F, order='grevlex')
Out[2]:
⎡ 3 2 2 2 ⎤
⎣x - 2⋅x , - x + 2⋅y , x⋅y - 2⋅y⎦
In [3]: groebner(F, order='grevlex', field=True)
Out[3]:
⎡ 2 ⎤
⎢ 3 2 x 2 ⎥
⎢x - 2⋅x , - ── + y , x⋅y - 2⋅y⎥
⎣ 2 ⎦
All functions in sympy.polys always find a minimal coefficient domain for
input polynomials, if needed, extend it to perform computations and retract
it to the original domain if possible. In the case of groebner() the
simples what to specify what you want is to set field=True. You can also
say domain=QQ, but this will make your code useless for composite domains,
finite fields, etc.
btw. When you submit a bug report, use a minimal example that reproduces a
problem (unless a minimal example is that big). That saves time and makes
it possible to reply with the same example, not with a shorter, but
unrelated one. Also please explain why something should or should not be
done ("should be normalized to 1").
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.