Repository navigation
Support libgap conversion for general and relative number fields - #42435
Conversation
|
Documentation preview for this PR (built with commit 43b327b; changes) is ready! 🎉 |
f79d402 to
4e36599
Compare
ae7342c to
65e8774
Compare
65e8774 to
8cedc4a
Compare
8cedc4a to
d68c929
Compare
Extend libgap(...) conversion beyond cyclotomic fields so matrix groups (and Coxeter groups) over number fields use the GAP backend. - NumberFieldElement._libgap_ converts absolute and relative fields via the GAP algebraic-extension tower. Relative elements use the relative power-basis coordinates (self.list()), which match GAP's generator even when it is not an absolute primitive element of the field. - NumberField_generic._libgap_ builds relative fields as towers of GAP algebraic extensions, and is now cached. - The reverse conversion is centralized in _convert_from_gap_string, which strips GAP's '!' constant markers and interprets cyclotomic 'E(n)' in the field tower rather than the universal cyclotomic field.
d68c929 to
43b327b
Compare
|
@codex review (an experiment) |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
sagemathgh-42435: Support libgap conversion for general and relative number fields ### 📚 Description Extend `libgap(...)` conversion beyond cyclotomic fields so that matrix groups (and Coxeter groups) over number fields can use the GAP backend. - `NumberFieldElement._libgap_` converts both absolute and relative fields via the GAP algebraic-extension tower. Relative elements use the relative power-basis coordinates (`self.list()`), which match GAP's generator even when it is not an absolute primitive element of the field. - `NumberField_generic._libgap_` builds relative fields as towers of GAP algebraic extensions, and is now cached. - The reverse conversion is centralized in `_convert_from_gap_string`, which strips GAP's `!` constant markers and interprets cyclotomic `E(n)` in the field tower rather than in the universal cyclotomic field. This is split out from sagemath#42383 (CoxeterGroup default base ring), which depends on this conversion support but is reviewed separately. ### 📝 Checklist - [x] The title is concise and informative. - [x] I have linked a relevant issue or PR. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. URL: sagemath#42435 Reported by: Chenxin Zhong Reviewer(s): Dima Pasechnik, Frédéric Chapoton
Great |
📚 Description
Extend
libgap(...)conversion beyond cyclotomic fields so that matrixgroups (and Coxeter groups) over number fields can use the GAP backend.
NumberFieldElement._libgap_converts both absolute and relative fieldsvia the GAP algebraic-extension tower. Relative elements use the relative
power-basis coordinates (
self.list()), which match GAP's generator evenwhen it is not an absolute primitive element of the field.
NumberField_generic._libgap_builds relative fields as towers of GAPalgebraic extensions, and is now cached.
_convert_from_gap_string, whichstrips GAP's
!constant markers and interprets cyclotomicE(n)in thefield tower rather than in the universal cyclotomic field.
This is split out from #42383 (CoxeterGroup default base ring), which depends
on this conversion support but is reviewed separately.
📝 Checklist