View on GitHub


Experimental code for computing Galois groups over p-adic fields.


Experimental code for computing Galois groups over p-adic fields. Written in Magma.

We have also compiled some tables of Galois groups.


Getting started


The following confirms the Galois group in the 12th line of this table is S_4.

> // the following line only needs to be done once per session
> AttachSpec("/path/to/package/spec");
> // optional/recommended if you have the ExactpAdics package (see the Getting started section)
> PGG_UseExactpAdicsFactorization();
> PGG_UseExactpAdicsRoots();
> // define a polynomial over Q_2
> K := pAdicField(2,100);
> R<x> := PolynomialRing(K);
> f := x^8 + 20*x^2 + 4;
> // compute its Galois group with this package
> // the syntax of the algorithm parameter is explained below
> time G := PGG_GaloisGroup(f : Alg:="ARM[Global[RamTower[Symmetric]],All[FactorDegrees,Index]]");
Time: 0.370
> GroupName(G);

Main intrinsics

GaloisGroup(f :: PGGPol)
PGG_GaloisGroup(f :: RngUPolElt)
PGG_GaloisGroup(f :: RngUPolElt_FldPadExact)
  -> GrpPerm

The Galois group of f which must be a univariate polynomial defined over a p-adic field.

The group is a permutation group on the roots of f, and therefore has the same degree as f. The group is defined up to conjugacy in the corresponding symmetric group. If using the absolute resolvent method with global models, it may be defined up to conjugacy in a smaller group depending on the global model used.

If using the ExactpAdics package, the polynomial can be over an exact p-adic field.



Call SetVerbose("PGG_GaloisGroup", 1); to print out information as the algorithm proceeds, including some timings.

Algorithm parameter

Our implementation is modular, meaning that different algorithms are used in various places. An algorithm is specified by a string of the form NAME[ARG1,ARG2,...] where the part in brackets is optional.

The arguments have an order, but in general they have defaults and can be skipped over, so ARM[All,Global], ARM[All], ARM[Global] and ARM might all be interpreted the same, assuming the arguments to ARM have defaults All and Global.

Arguments can be given by their name instead of by their order, so ARM[Eval:Global,All] is interpreted the same as ARM[All,Global].

In fact : is syntactic sugar allowing us to write the last parameter outside of brackets. So a[b,c]:d is equivalent to a[b,c,d], which is useful for writing highly nested parameters such as Global:Factors:RamTower:Symmetric:SinglyRamified.

Here we notate the current options for the algorithms. The Alg parameter to PGG_GaloisGroup must be a GALOISGROUP algorithm.


How to compute a Galois group.


How to deduce the Galois group using resolvents. Use Maximal2 in general or All when it is quick to enumerate all possible Galois groups.


How to evaluate resolvents.


How to produce a global model, a global number field which completes to a given local field.


A function which can be applied to polynomials and groups, with the property that the statistic of a polynomial equals the statistic of its Galois group. The most useful is usually FactorDegrees.


How to choose the subgroup.


How to select sets (“tranches”) of subgroups.


How to select possibly infinite streams of subgroups. Unlike tranches, the subgroups are not cached and so this is typically used for randomly generated subgroups.


A priority to order a set of groups.


Controls how to dedupe subgroups up to conjugacy in some larger group.


Controls how some tranches generate their groups.


Specifies an equivalence relation on possible Galois groups such that it suffices to determine the class of the actual Galois group.

In the context of the absolute resolvent method, we take OvergroupEmbedding[CheckInjective:True] as the default.


An expression with free variables.


Represents true or false.

Unit testing

The script unit_tests.mag can be used to test that most functionality of the package is working. Call it like:

magma -b OPTIONS unit_tests.mag



Each test has a set of tags associated to it. Here are their meanings:

Each Galois group test also is given a tag for each component of its algorithm, so ARM[Global[Symmetric],RootsMaximal] has tags ARM, Global etc.

The tests

Currently, there is one type of test called GaloisGroup. An instance of this will compute the Galois group of some polynomial over some field using some algorithm, and check that the results equals some expected answer. There is a built-in list of polynomials and a built-in list of algorithms, and we test every polynomial-algorithm pair which is reasonable (i.e. should be compatible and won’t take ages to run).