I'm trying to work with some roots of a rational polynomial, but I can't
seem to get it to work. One example is
z^3 + 1/3
I seem to be able to get the splitting field from:
R.<z>=PolynomialRing(QQ)
K.<a>=NumberField([z^3 + 1/3])
R.<z>=PolynomialRing(K)
print (z^3 + 1/3).factor()
L.<b>=NumberField([z^2 + a*z + a^2])
But, I can't seem to do anything with it
b^3 + 1/3
returns
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_52.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n"
+
_support_.preparse_worksheet_cell(base64.b64decode("Ui48ej49UG9seW5vbWlhbFJpbmcoUVEpCksuPGE+PU51bWJlckZpZWxkKFt6XjMgKyAxLzNdKQpSLjx6Pj1Qb2x5bm9taWFsUmluZyhLKQpwcmludCAoel4zICsgMS8zKS5mYWN0b3IoKQpMLjxiPj1OdW1iZXJGaWVsZChbel4yICsgYSp6ICsgYV4yXSkKYl4zKzEvMw=="),globals())+"\\n");
execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/tmp/tmpTZzoeR/___code___.py", line 8, in <module>
exec compile(u'b**_sage_const_3 +_sage_const_1 /_sage_const_3
File "", line 1, in <module>
File
"/home/ben/sage-4.8/local/lib/python2.6/site-packages/sage/misc/displayhook.py",
line 174, in displayhook
print_obj(sys.stdout, obj)
File
"/home/ben/sage-4.8/local/lib/python2.6/site-packages/sage/misc/displayhook.py",
line 142, in print_obj
print >>out_stream, `obj`
File "sage_object.pyx", line 154, in
sage.structure.sage_object.SageObject.__repr__
(sage/structure/sage_object.c:1492)
File "number_field_element.pyx", line 3760, in
sage.rings.number_field.number_field_element.NumberFieldElement_relative._repr_
(sage/rings/number_field/number_field_element.cpp:22839)
File "number_field_element.pyx", line 3727, in
sage.rings.number_field.number_field_element.NumberFieldElement_relative.list
(sage/rings/number_field/number_field_element.cpp:22612)
File "number_field_element.pyx", line 2521, in
sage.rings.number_field.number_field_element.NumberFieldElement.vector
(sage/rings/number_field/number_field_element.cpp:17386)
File
"/home/ben/sage-4.8/local/lib/python2.6/site-packages/sage/rings/number_field/number_field_rel.py",
line 1210, in relative_vector_space
from_V = maps.MapRelativeVectorSpaceToRelativeNumberField(V, self)
File
"/home/ben/sage-4.8/local/lib/python2.6/site-packages/sage/rings/number_field/maps.py",
line 278, in __init__
self.__rnf = K.pari_rnf()
File
"/home/ben/sage-4.8/local/lib/python2.6/site-packages/sage/misc/cachefunc.py",
line 555, in __call__
w = self._cachedmethod._instance_call(self._instance, *args, **kwds)
File
"/home/ben/sage-4.8/local/lib/python2.6/site-packages/sage/misc/cachefunc.py",
line 778, in _instance_call
return self._cachedfunc.f(inst, *args, **kwds)
File
"/home/ben/sage-4.8/local/lib/python2.6/site-packages/sage/rings/number_field/number_field_rel.py",
line 1398, in pari_rnf
return self._pari_base_nf().rnfinit(self.pari_relative_polynomial())
File
"/home/ben/sage-4.8/local/lib/python2.6/site-packages/sage/misc/cachefunc.py",
line 555, in __call__
w = self._cachedmethod._instance_call(self._instance, *args, **kwds)
File
"/home/ben/sage-4.8/local/lib/python2.6/site-packages/sage/misc/cachefunc.py",
line 778, in _instance_call
return self._cachedfunc.f(inst, *args, **kwds)
File
"/home/ben/sage-4.8/local/lib/python2.6/site-packages/sage/rings/number_field/number_field_rel.py",
line 1116, in _pari_base_nf
return abs_base.pari_nf()
File
"/home/ben/sage-4.8/local/lib/python2.6/site-packages/sage/rings/number_field/number_field.py",
line 2677, in pari_nf
raise TypeError, "Unable to coerce number field defined by non-integral
polynomial to PARI."
TypeError: Unable to coerce number field defined by non-integral polynomial to
PARI.
Trying instead to work with a galois_closure I can't even define the field
R.<z>=PolynomialRing(QQ)
K.<a>=NumberField([z^3 + 1/3])
L.<b>=K.galois_closure()
I get
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_53.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n"
+
_support_.preparse_worksheet_cell(base64.b64decode("Ui48ej49UG9seW5vbWlhbFJpbmcoUVEpCksuPGE+PU51bWJlckZpZWxkKFt6XjMgKyAxLzNdKQpMLjxiPj1LLmdhbG9pc19jbG9zdXJlKCkKYl4zKzEvMw=="),globals())+"\\n");
execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/tmp/tmpbWZl2Z/___code___.py", line 5, in <module>
L = K.galois_closure(names=('b',)); (b,) = L._first_ngens(1)
File
"/home/ben/sage-4.8/local/lib/python2.6/site-packages/sage/rings/number_field/number_field.py",
line 6161, in galois_closure
L, self_into_L = self._galois_closure_and_embedding(names)
File
"/home/ben/sage-4.8/local/lib/python2.6/site-packages/sage/rings/number_field/number_field.py",
line 6094, in _galois_closure_and_embedding
newK, K_into_newK, _, _ = K.composite_fields(self, names=names,
both_maps=True, preserve_embedding=False)[-1]
File
"/home/ben/sage-4.8/local/lib/python2.6/site-packages/sage/rings/number_field/number_field.py",
line 3469, in composite_fields
self_to_F = self.hom([F(a_in_F)])
File "parent.pyx", line 988, in sage.structure.parent.Parent.__call__
(sage/structure/parent.c:7355)
File "coerce_maps.pyx", line 82, in
sage.structure.coerce_maps.DefaultConvertMap_unique._call_
(sage/structure/coerce_maps.c:3311)
File "coerce_maps.pyx", line 77, in
sage.structure.coerce_maps.DefaultConvertMap_unique._call_
(sage/structure/coerce_maps.c:3214)
File
"/home/ben/sage-4.8/local/lib/python2.6/site-packages/sage/rings/number_field/number_field.py",
line 1226, in _element_constructor_
return self._coerce_non_number_field_element_in(x)
File
"/home/ben/sage-4.8/local/lib/python2.6/site-packages/sage/rings/number_field/number_field.py",
line 5376, in _coerce_non_number_field_element_in
return self._element_class(self, x)
File "number_field_element.pyx", line 340, in
sage.rings.number_field.number_field_element.NumberFieldElement.__init__
(sage/rings/number_field/number_field_element.cpp:5545)
TypeError: Coercion of PARI polmod with modulus 243*x^6 - 1620*x^3 + 9261 into
number field with defining polynomial 9*x^6 - 60*x^3 + 343 failed
I'd like to be able to work algebraically with the roots of this
polynomial. Is there a way to get this to work?
Thanks,
Ben
--
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/sage-support
URL: http://www.sagemath.org