-
-
Notifications
You must be signed in to change notification settings - Fork 535
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
Add functionality to Galois groups #5159
Comments
comment:1
The above patch should do the job for absolute fields: it creates a new GaloisGroup class, which has very little resemblance to the old one, and derives from PermutationGroup_generic. The init script calls Pari's galoisinit. Elements are stored as GaloisGroupElement objects, which are basically permutations, but with the addition of a cached method that returns the image of a generator of that permutation under the corresponding automorphism. I've also added toy implementations of decomposition and ramification groups and the Artin symbol for prime ideals in number fields; I'm sure there are faster algorithms to calculate these rather than using the definitions directly as I've done, but I am a strong believer in toy implementations. At present this is all only for absolute fields, because Pari has no direct support for Galois groups of relative extensions. Relative fields could also be implemented, at least when the corresponding absolute field is Galois over QQ, by calculating the Galois group of the absolute extension and checking which automorphisms fix the intermediate field; but I haven't done this. |
comment:3
3.4 is for ReST tickets only. Cheers, Michael |
comment:4
This looks like great work which will be extremely useful, but needs to be rebased on 3.4 (i.e. change the docstrings in number_field.py into ReST style) before it can be tested. At the same time, I think you can safely replace the old galois_group.py with the new one instead of leaving there and adding _new to your name. I'll do a proper review when rebased, as so far as have just read the patch. |
patch against 3.4 with patch for #5508 applied |
comment:5
Attachment: galois.patch.gz I've rebased it to a patch based on (3.4 + the patch for #5508). This version actually adds quite a bit that wasn't in the previous version: based on the debate on sage-nt, I've made it return the Galois group of the splitting field when the given field isn't Galois, and also added a method fixed_field for subgroups of Galois groups based on Pari's "galoisfixedfield". In an ideal world, when given a non-Galois field, it would return the Galois group of the Galois closure of the given field, but represented as permutations of the roots of the defining polynomial of the original field. I couldn't work out an easy way of doing this which wouldn't be horribly slow in general, so elements are represented as permutations of the Galois conjugates of some single element generating the Galois closure. I've also ReSTified class_group.py and number_field_ideal.py (the latter because I was editing it anyway, and the former because it was easy to do); and deprecated galois_group and is_galois for relative fields in favour of explicitly relative and absolute variants. |
comment:6
I'm not sure whether I did something stupid here but in a fresh clone of 3.4 I applied sage-5508.2.patch from #5508 and then tried to apply the new galois.patch form here, but it does not apply properly:
Did I misunderstand something? John |
comment:7
Weird. I was using the first version of the #5508 patch, not the second, but that shouldn't make a huge difference. I will look at it in the morning. |
comment:8
Replying to @loefflerd:
|
Attachment: galois_new.patch.gz replaces previous patch -- apply after sage-5508.2.patch |
comment:9
Here's a new patch. On my machine I've checked that it applies happily on a clean clone of 3.4 with sage-5508.2.patch on top. Let me know if this works for you too. |
Attachment: trac_5159_extra.patch.gz |
comment:10
Good news: this patch applies fine on top of sage-5508.2.patch. I am very happy with this patch which provides a significant new set of functions and capabilities. I did have two trivial doctest failures, in two files, nothing serious:
and
I have put up a small patch which fixes these, so it can have a positive review. |
comment:12
The latest patch on top of #5508 causes a number of doctest failures:
Cheers, Michael |
Attachment: 5159-unpickle-fix.patch.gz apply over 5508-3.patch and previous TWO patches. |
comment:16
Replying to @loefflerd:
It would still be nice if someone did a quick re-review of the last two patches. Cheers, Michael |
comment:17
I can confirm that the patches apply ok as described, based on 3.4. I have not yet tried on 3.4.1, or tested whether my rebased patch for #5513 will still work, but will do that. I have relabelled this "positive review" although on of the new patches -- the very trivial one -- was mine. |
comment:18
I have just checked that it applies cleanly to 3.4.1.alpha0, and sage -testall passes. |
comment:19
Oops: on a 64-bit machine I get this:
I think you cannot rely on pari giveing you the primes in a specific order:
so the doctest needs to be designed to allow for that. Perhaps define P via
(which may or may not be the P i your doctest). |
comment:20
It doesn't greatly matter which P is being used, since they are all Galois-conjugate. Thus I have put a "..." in the two doctests that failed above. I've tested it on a 64-bit machine with this fix and now all doctests in sage/rings/number_fields pass there too. Patch coming in a moment. David |
Apply over previous three patches |
comment:21
Attachment: 5159-64bit-doctest.patch.gz |
comment:22
When merging
I am seeing the following doctest failure on sage.math, i.e. 64 bit Linux:
I would guess that sorting the list might fix the issue. Cheers, Michael |
comment:23
Sorting the list exposed another bug, which I refuse to accept any responsibility for whatsoever: there is something funny going on in the default I've worked around this by implementing Apologies that these things didn't get spotted earlier, but I'm working from home on a clapped out old 32-bit laptop, on which running sage -testall takes over three hours, so when I was working on this I only ran the doctests in sage/rings/number_field. That's a mistake I won't make again. David |
apply over previous four patches (!) |
comment:24
Attachment: 5159-sort-fix.patch.gz I'll test all these in a minute.... |
comment:25
Replying to @JohnCremona:
unfortunately the total weirdness I came across just now in testing 5513 is still here. It looks like I cannot test anything on 3.4.1.alpha0 without rebuilding from scratch, which unfortunately would not finish until after my free time for the day is over. So unless mabshoff has any idea what was causing that, it will be hard for me to do anything useful for a while. |
comment:26
Well the good news is that on my 64-bit build (on Bill Hart's computer) I successfully applied all 5 patches to 3.4.1.alpha0, and all tests (in sage/rings/number_field) pass, so I will give this a positive review and hope that it works for Michael too. |
comment:27
Merged
in Sage 3.4.1.rc0. Cheers, Michael |
Reviewer: John Cremona |
Merged: 3.4.1.rc0 |
Author: David Loeffler |
It would be nice to unify Sage's two ways of handling Galois groups: as abstract transitive groups, and as sets of explicit automorphisms with no group structure. This can be done by using Pari's galoisinit, galoispoltoperm and galoisapply functions.
Component: number theory
Keywords: galois groups, number theory
Author: David Loeffler
Reviewer: John Cremona
Merged: 3.4.1.rc0
Issue created by migration from https://trac.sagemath.org/ticket/5159
The text was updated successfully, but these errors were encountered: