-
-
Notifications
You must be signed in to change notification settings - Fork 528
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
Cyclotomic field elements are not converted to Gap correctly #5618
Comments
comment:2
Here is some problem analysis:
So, apparently GAP treats "the same" elements of a cyclotomic field differently if they have different names. But this isn't particularly surprising, since the two cyclotomic fields seem to have a totaly different representation in GAP:
Note that comparison of the two field in the GAP interface results in an error:
But GAP indeed considers the two fields to be different:
So, what does all this mean?
It seems likely to me that after implementing 2., things will already work. But 1. should be fixed as well. |
Gap-representation of Cyclotomic Fields should be a Cyclotomic Field in Gap |
Changed keywords from none to gap interface cyclotomic field |
comment:3
Attachment: trac_5618_gap_for_cyclotomic_fields.patch.gz I created the patch after the patches from #8909 and #9423 -- so, it is possible that the new patch actually depends on the two other tickets (but one of them already has a positive review). With the patch, a cyclotomic field in Sage is represented as a cyclotomic field (and not as a number field) in GAP:
The advantage is that the motivating example from the ticket description now works (and is used as a doctest):
The disadvantage: While it is still possible to chose the name of a number field generator in GAP as in Sage
it is now impossible to do the same for cyclotomic fields:
By consequence, I had to fix a couple of doctests. All doctests pass, but I can not vouch for external code. |
Author: Simon King |
comment:4
The patch simply converts sage Cyclotomic fields to gap cyclotomic fields instead of generic number fields. The disadvantage presented is just a limitation of gap, not sage. The semantics of gap(CyclotomicField(n)) have changed! The doctests are relevant. However, this patch depends on #9423 and one doctest has disappeared in that patch. That doctest is relevant, because it shows the change in the code. So, I would add the output of:
in NumberField_cyclotomic.gap_init() |
Reviewer: Luis Felipe Tabera Alonso |
Attachment: trac_5618_gap_for_cyclotomic_fields.2.patch.gz updated headers |
additional doctest |
comment:5
Attachment: trac_5618_gap_for_cyclotomic_fields_doctest.patch.gz I give a positive review to Simon's patch. However, I have added some doctest in trac_5618_gap_for_cyclotomic_fields_doctest.patch that needs review. The doctest are in the unpatched code, but they have disappeared in the process. This patch put them back. Apply: trac_5618_gap_for_cyclotomic_fields.2.patch trac_5618_gap_for_cyclotomic_fields_doctest.patch Depends on: #9423 |
comment:6
Should this be marked positive review then? |
comment:7
If you agreee with the doctest I wrote back in #5618 yes, it should have a positive review. |
comment:8
The doctest looks fine to me. Let's get this in. (I'm not going to claim reviewer credit for this one -- I just verified that the doctest was the same as the one removed from #9423.) |
Merged: sage-4.6.2.alpha2 |
Although this works:
the resulting gap element doesn't have the correct properties:
This causes the following problem with group characters.
Note: the above works if one takes z = gap.E(3).
CC: @wdjoyner
Component: algebra
Keywords: gap interface cyclotomic field
Author: Simon King
Reviewer: Luis Felipe Tabera Alonso
Merged: sage-4.6.2.alpha2
Issue created by migration from https://trac.sagemath.org/ticket/5618
The text was updated successfully, but these errors were encountered: