#31514 closed enhancement (fixed)

number_field_elements_from_algebraics with complex embeddings

Reported by: Markus Wageringel Owned by:
Priority: major Milestone: sage-9.4
Component: number fields Keywords: qqbar
Cc: Jean-Philippe Labbé, Vincent Delecroix, John Cremona Merged in:
Authors: Markus Wageringel Reviewers: Vincent Delecroix
Report Upstream: N/A Work issues:
Branch: d726429 (Commits, GitHub, GitLab) Commit: d7264299ad02e86ca8891471eeb6368e9d6be2f7
Dependencies: Stopgaps:

Status badges


Currently, number_field_elements_from_algebraics only implements the embedded parameter if all the elements are real. This ticket extends this to number fields with embedding of (non-real) algebraic numbers.

sage: K, (ii, rt2), hom = number_field_elements_from_algebraics([QQbar(I), sqrt(2)], embedded=True)
sage: K
Number Field in a with defining polynomial y^4 + 1 with a = -0.7071067811865475? + 0.7071067811865475?*I
sage: QQbar(ii), QQbar(rt2)
(0.?e-19 + 1.000000000000000?*I, 1.414213562373095? + 0.?e-18*I)

In particular, this is useful for conversions from QQbar to the number field, which requires an embedding.

Change History (6)

comment:1 Changed 21 months ago by Markus Wageringel

Authors: Markus Wageringel
Branch: u/gh-mwageringel/31514
Cc: Jean-Philippe Labbé Vincent Delecroix added
Commit: d7264299ad02e86ca8891471eeb6368e9d6be2f7
Status: newneeds_review

The real case was implemented in #20181. I am not sure if there is a reason why the complex case was skipped, as the homomorphism returned by number_field_elements_from_algebraics(..., embedded=False) already corresponds to an embedding.

New commits:

d72642931514: allow complex embeddings in number_field_elements_from_algebraics

comment:2 Changed 21 months ago by Matthias Köppe

Cc: John Cremona added

comment:3 Changed 21 months ago by Matthias Köppe

Milestone: sage-9.3sage-9.4

Sage development has entered the release candidate phase for 9.3. Setting a new milestone for this ticket based on a cursory review of ticket status, priority, and last modification date.

comment:4 Changed 20 months ago by Vincent Delecroix

Reviewers: Vincent Delecroix
Status: needs_reviewpositive_review

This is a great addition. Thanks.

comment:5 Changed 20 months ago by Markus Wageringel

Thanks for the review.

comment:6 Changed 19 months ago by Volker Braun

Branch: u/gh-mwageringel/31514d7264299ad02e86ca8891471eeb6368e9d6be2f7
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.