*sigh* I'm not very good at this whole copying and pasting thing...

There should be another field initiated, B.<x>=K[], otherwise suddenly
talking about A in terms of x makes no sense.

So the complete code should be

K.<q>=NumberField(x^2 + 2); K


Number Field in q with defining polynomial x^2 + 2

Number Field in q with defining polynomial x^2 + 2

B.<x>=K[]
A.<c>=K.extension(x^3 + (q^3)*x^2 + (2*q^2)*x - 3*q); A


Number Field in c with defining polynomial x^3 - 2*q*x^2 - 4*x - 3*q
over its base field

Number Field in c with defining polynomial x^3 - 2*q*x^2 - 4*x - 3*q
over its base field

A.units()


Traceback (click to the left for traceback)
...
NotImplementedError: For a relative number field L you must use
either L.relative_polynomial() or L.absolute_polynomial() as
appropriate

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/notebook/sage_notebook/worksheets/admin/6/code/7.py",
line 6, in <module>
    A.units()
  File "/usr/local/sage/local/lib/python2.5/site-packages/Jinja-1.2-
py2.5-linux-i686.egg/", line 1, in <module>

  File "/usr/local/sage/local/lib/python2.5/site-packages/sage/rings/
number_field/number_field.py", line 4002, in units
    R = self.polynomial().parent()
  File "/usr/local/sage/local/lib/python2.5/site-packages/sage/rings/
number_field/number_field_rel.py", line 1422, in polynomial
    raise NotImplementedError, "For a relative number field L you must
use either L.relative_polynomial() or L.absolute_polynomial() as
appropriate"
NotImplementedError: For a relative number field L you must use either
L.relative_polynomial() or L.absolute_polynomial() as appropriate



which gives the desired error!





On Jun 17, 5:33 pm, Minh Nguyen <[email protected]> wrote:
> On Thu, Jun 18, 2009 at 2:30 AM, bonzerpotato<[email protected]> wrote:
>
> > sorry, my typo: L should be K in all instances.
>
> Which version of Sage are you using? Here's what I get on Sage 4.0.1:
>
> [mv...@sage sage-4.0.2.rc2]$ sage
> ----------------------------------------------------------------------
> | Sage Version 4.0.1, Release Date: 2009-06-06                       |
> | Type notebook() for the GUI, and license() for information.        |
> ----------------------------------------------------------------------
> sage: K.<q>=NumberField(x^2 +2); K
> Number Field in q with defining polynomial x^2 + 2
> sage: A.<c>=K.extension(x^3 +(q^3)*x^2 + (2*q^2)*x - 3*q); A
> ---------------------------------------------------------------------------
> TypeError                                 Traceback (most recent call last)
>
> /home/mvngu/.sage/temp/sage.math.washington.edu/24479/_home_mvngu__sage_init_sage_0.py
> in <module>()
>
> /usr/local/sage/local/lib/python2.5/site-packages/sage/structure/element.so
> in sage.structure.element.RingElement.__mul__
> (sage/structure/element.c:9815)()
>
> /usr/local/sage/local/lib/python2.5/site-packages/sage/structure/coerce.so
> in sage.structure.coerce.CoercionModel_cache_maps.bin_op
> (sage/structure/coerce.c:6584)()
>
> TypeError: unsupported operand parent(s) for '*': 'Number Field in q
> with defining polynomial x^2 + 2' and 'Symbolic Ring'
>
> --
> Regards
> Minh Van Nguyen
--~--~---------~--~----~------------~-------~--~----~
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
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to