Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UniversalCyclotomicField elements considered real #17117

Closed
gagern mannequin opened this issue Oct 8, 2014 · 3 comments
Closed

UniversalCyclotomicField elements considered real #17117

gagern mannequin opened this issue Oct 8, 2014 · 3 comments

Comments

@gagern
Copy link
Mannequin

gagern mannequin commented Oct 8, 2014

This is certainly wrong:

sage: UCF.<E> = UniversalCyclotomicField()
sage: E3 = E(3)
sage: E3
E(3)
sage: N(E3)
-0.500000000000000 + 0.866025403784439*I
sage: real(E3)
E(3)
sage: imag(E3)
0

This is probably due to the fact that real and imag aren't methods of this class, even though conjugate seems to work correctly.

sage: E3.conjugate()
E(3)^2
sage: conjugate(E3)
E(3)^2
sage: (E3 + E3.conjugate())/2
-1/2
sage: (E3 - E3.conjugate())/(2*E(4))
-1/2*E(12)^7 + 1/2*E(12)^11

So I'd say these methods should be implemented, building on conjugate. Perhaps the functions will pick the methods up if they do exist, even though #17116 makes me far from certain on this point right now.

Furthermore, if asked explicitely then these objects know that they are not real:

sage: E3.is_real()
False

So the real function might want to call such an is_real method if it exists, and make sure not to simply return its argument if that method returns False.

Component: number fields

Issue created by migration from https://trac.sagemath.org/ticket/17117

@gagern gagern mannequin added this to the sage-6.4 milestone Oct 8, 2014
@gagern gagern mannequin added c: number fields labels Oct 8, 2014
@gagern

This comment has been minimized.

@videlec
Copy link
Contributor

videlec commented Apr 9, 2015

comment:2

Hello,

In #18152, I reimplemented the universal cyclotomic field using libgap (faster and more reliable). In that version the issue disappears. My goal would be to close this ticket as "won't fix" as soon as #18152 would be reviewed.

Vincent

@fchapoton
Copy link
Contributor

comment:3

now works with libgap version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants