Ticket #13041 (new defect)

Opened 12 months ago

Last modified 11 months ago

Cannot convert elements of cyclotomic fields to algebraic numbers

Reported by: rbeezer Owned by: AlexGhitza
Priority: minor Milestone: sage-5.10
Component: algebra Keywords: sd40.5
Cc: Work issues:
Report Upstream: N/A Reviewers:
Authors: Merged in:
Dependencies: Stopgaps:

Description

sage: C.<z> = CyclotomicField(7)
sage: a = 2*z^2 + 5*z^4
sage: E = C.algebraic_closure()
sage: E(a)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<snip>
TypeError: Illegal initializer for algebraic number

Change History

comment:1 Changed 11 months ago by arminstraub

Unfortunately, at the moment, elements of number fields don't coerce/convert to the algebraic closure QQbar. This is an instance of #12715 (Number field embeddings should go via AA and QQbar).

Note that you can coerce elements to numerical complex numbers though:

sage: C.<z> = CyclotomicField(7)
sage: CC(z)
0.623489801858734 + 0.781831482468030*I
sage: QQbar(z)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<your snip>
TypeError: Illegal initializer for algebraic number

I would therefore suggest to mark this ticket as a duplicate. (I don't immediately see a way to do that myself, so please let me know if I could and should have done so myself.)

Note: See TracTickets for help on using tickets.