Opened 9 years ago

Closed 6 years ago

#15276 closed defect (fixed)

Translation problem between Sage and Gap for cyclotomic field

Reported by: Vincent Beck Owned by:
Priority: major Milestone: sage-7.3
Component: algebra Keywords: CyclotomicField
Cc: Volker Braun, Jean-Philippe Labbé, Christian Stump Merged in:
Authors: Vincent Delecroix Reviewers: Frédéric Chapoton
Report Upstream: N/A Work issues:
Branch: 7abb356 (Commits, GitHub, GitLab) Commit: 7abb3560849ca3337f2cf4528eb418b34c8ca7ab
Dependencies: Stopgaps:

Status badges

Description (last modified by Vincent Delecroix)

Something strange is happening with the command CyclotomicField? and the order of the associated generator. Everything works very well for n which is different from 2 mod 4 but does not work for n =2 mod 4 as seen in the following lines.

This is right:

sage: K7.<s> = CyclotomicField(7)
sage: gap(K7)
CF(7)
sage: gap(s)
E(7)
sage: K7(_)
s

This is wrong

sage: K6.<s> = CyclotomicField(6)
sage: gap(K6)
CF(3)
sage: gap(s)    # this is wrong!
E(3)
sage: K6(_)     # coherent with above
s - 1

Note that the following works fine

sage: UCF = UniversalCyclotomicField()
sage: UCF(s)
-E(3)^2
sage: K6(_)
s

Change History (22)

comment:1 Changed 9 years ago by For batch modifications

Milestone: sage-6.1sage-6.2

comment:2 Changed 8 years ago by For batch modifications

Milestone: sage-6.2sage-6.3

comment:3 Changed 8 years ago by Vincent Delecroix

Description: modified (diff)

better presentation.

comment:4 Changed 8 years ago by Vincent Delecroix

Description: modified (diff)

Even better presentation ;-)

comment:5 Changed 8 years ago by For batch modifications

Milestone: sage-6.3sage-6.4

comment:6 Changed 6 years ago by Jakob Kroeker

Stopgaps: incorrectAnswerMarker

comment:7 Changed 6 years ago by Vincent Delecroix

Authors: Vincent Beck
Description: modified (diff)
Milestone: sage-6.4sage-7.3

comment:8 Changed 6 years ago by Vincent Delecroix

Authors: u/vdelecroix/15276
Status: newneeds_review
Stopgaps: incorrectAnswerMarker

comment:9 Changed 6 years ago by Vincent Delecroix

Authors: u/vdelecroix/15276Vincent Delecroix
Branch: u/vdelecroix/15276
Commit: 35df7dda766c0fc46eacdbcb0a7fb7b1f1bd6fe6

New commits:

35df7ddTrac 15276: fix sage-gap nf conversion

comment:10 Changed 6 years ago by Frédéric Chapoton

Status: needs_reviewneeds_work

bad syntax for link to trac + failing doctests

comment:11 Changed 6 years ago by Vincent Delecroix

Dependencies: #20999

comment:12 Changed 6 years ago by git

Commit: 35df7dda766c0fc46eacdbcb0a7fb7b1f1bd6fe65db5bf3d792f9d14a864fb4054d1a7a60f73bd5d

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

df0955fTrac 20999: fix ZZ(libgap(1)) and QQ(libgap(1))
30c0e00Trac 15276: fix sage-gap nf conversion
cf3a159Trac 15276: fix gap/libgap nf initialization
5db5bf3Trac 15276: fix trac directive in documentation

comment:13 Changed 6 years ago by Vincent Delecroix

Status: needs_workneeds_review

comment:14 Changed 6 years ago by Vincent Delecroix

Cc: Volker Braun Jean-Philippe Labbé Christian Stump added

comment:15 Changed 6 years ago by Frédéric Chapoton

Please use python3 compatible import

from .number_field import NumberField_cyclotomic

comment:16 Changed 6 years ago by Frédéric Chapoton

Status: needs_reviewneeds_work

comment:17 Changed 6 years ago by git

Commit: 5db5bf3d792f9d14a864fb4054d1a7a60f73bd5d7abb3560849ca3337f2cf4528eb418b34c8ca7ab

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

9fb8f67Trac 15276: fix sage-gap nf conversion
7c2637aTrac 15276: fix gap/libgap nf initialization
42ccc71Trac 15276: fix trac directive in documentation
7abb356Trac 15276: python 3 compatible imports

comment:18 Changed 6 years ago by Vincent Delecroix

Status: needs_workneeds_review

comment:19 Changed 6 years ago by Vincent Delecroix

Dependencies: #20999

comment:20 Changed 6 years ago by Frédéric Chapoton

Reviewers: Frédéric Chapoton
Status: needs_reviewpositive_review

ok, looks good to me.

comment:21 Changed 6 years ago by Vincent Delecroix

Great: one bug less! Thanks!

comment:22 Changed 6 years ago by Volker Braun

Branch: u/vdelecroix/152767abb3560849ca3337f2cf4528eb418b34c8ca7ab
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.