-
-
Notifications
You must be signed in to change notification settings - Fork 673
Fix libgap(<NumberField>) #40973
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
base: develop
Are you sure you want to change the base?
Fix libgap(<NumberField>) #40973
Conversation
Documentation preview for this PR (built with commit 0e7c5bc; changes) is ready! 🎉 |
a | ||
Check that libgap global variables does not interfere with this method | ||
(as it should if the method is correctly implemented and avoid ``libgap.eval``):: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does --> do
avoid ---> avoids
sage: z = QQ['z'].0 | ||
sage: K.<zeta> = NumberField(z^2 - 2) | ||
sage: K._gap_init_() # the following variable name $sage1 represents the F.base_ring() in gap and is somehow random | ||
sage: K._gap_init_() # random (the variable name $sage1 represents F.base_ring() in gap is somehow random) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rather write "and is random" so that the sentence is correct
raise NotImplementedError("Currently, only simple algebraic extensions are implemented in libgap") | ||
|
||
from sage.libs.gap.libgap import libgap | ||
q = self.polynomial() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
q is not used ; you could also merge the last 2 lines
Previously
libgap(QQ[I])
fails. Now it works.also add some minor clean-ups and documentation changes.
The pointed out bug (that is, Sage FiniteField ↔ GAP GF does not keep the
DefiningPolynomial
) is to be addressed in a subsequent pull request.context: I was trying to improve the performance of
GF(next_prime(2^128)^4)
by using GAP'sStandardFF
package, see #38376 (comment). but at the moment the conversion between Sage and Gap FiniteField is wrong.📝 Checklist
⌛ Dependencies