Galois groups of number fields#

AUTHORS:

  • William Stein (2004, 2005): initial version

  • David Loeffler (2009): rewrote to give explicit homomorphism groups

sage.rings.number_field.galois_group.GaloisGroup[source]#

alias of GaloisGroup_v1

class sage.rings.number_field.galois_group.GaloisGroupElement[source]#

Bases: PermutationGroupElement

An element of a Galois group. This is stored as a permutation, but may also be made to act on elements of the field (generally returning elements of its Galois closure).

EXAMPLES:

sage: K.<w> = QuadraticField(-7); G = K.galois_group()
sage: G[1]
(1,2)
sage: G[1](w + 2)
-w + 2

sage: x = polygen(ZZ, 'x')
sage: L.<v> = NumberField(x^3 - 2); G = L.galois_group(names='y')
sage: G[4]
(1,5)(2,4)(3,6)
sage: G[4](v)
1/18*y^4
sage: G[4](G[4](v))
-1/36*y^4 - 1/2*y
sage: G[4](G[4](G[4](v)))
1/18*y^4
>>> from sage.all import *
>>> K = QuadraticField(-Integer(7), names=('w',)); (w,) = K._first_ngens(1); G = K.galois_group()
>>> G[Integer(1)]
(1,2)
>>> G[Integer(1)](w + Integer(2))
-w + 2

>>> x = polygen(ZZ, 'x')
>>> L = NumberField(x**Integer(3) - Integer(2), names=('v',)); (v,) = L._first_ngens(1); G = L.galois_group(names='y')
>>> G[Integer(4)]
(1,5)(2,4)(3,6)
>>> G[Integer(4)](v)
1/18*y^4
>>> G[Integer(4)](G[Integer(4)](v))
-1/36*y^4 - 1/2*y
>>> G[Integer(4)](G[Integer(4)](G[Integer(4)](v)))
1/18*y^4
as_hom()[source]#

Return the homomorphism \(L \to L\) corresponding to self, where \(L\) is the Galois closure of the ambient number field.

EXAMPLES:

sage: G = QuadraticField(-7,'w').galois_group()
sage: G[1].as_hom()
Ring endomorphism of Number Field in w with defining polynomial x^2 + 7
 with w = 2.645751311064591?*I
  Defn: w |--> -w
>>> from sage.all import *
>>> G = QuadraticField(-Integer(7),'w').galois_group()
>>> G[Integer(1)].as_hom()
Ring endomorphism of Number Field in w with defining polynomial x^2 + 7
 with w = 2.645751311064591?*I
  Defn: w |--> -w
ramification_degree(P)[source]#

Return the greatest value of \(v\) such that \(s\) acts trivially modulo \(P^v\). Should only be used if \(P\) is prime and \(s\) is in the decomposition group of \(P\).

EXAMPLES:

sage: x = polygen(ZZ, 'x')
sage: K.<b> = NumberField(x^3 - 3, 'a').galois_closure()
sage: G = K.galois_group()
sage: P = K.primes_above(3)[0]
sage: s = hom(K, K, 1/18*b^4 - 1/2*b)
sage: G(s).ramification_degree(P)
4
>>> from sage.all import *
>>> x = polygen(ZZ, 'x')
>>> K = NumberField(x**Integer(3) - Integer(3), 'a').galois_closure(names=('b',)); (b,) = K._first_ngens(1)
>>> G = K.galois_group()
>>> P = K.primes_above(Integer(3))[Integer(0)]
>>> s = hom(K, K, Integer(1)/Integer(18)*b**Integer(4) - Integer(1)/Integer(2)*b)
>>> G(s).ramification_degree(P)
4
class sage.rings.number_field.galois_group.GaloisGroup_subgroup(ambient, gens=None, gap_group=None, domain=None, category=None, canonicalize=True, check=True)[source]#

Bases: GaloisSubgroup_perm

A subgroup of a Galois group, as returned by functions such as decomposition_group.

INPUT:

  • ambient – the ambient Galois group

  • gens – a list of generators for the group

  • gap_group – a gap or libgap permutation group, or a string

    defining one (default: None)

  • domain – a set on which this permutation group acts; extracted from ambient if not specified

  • category – the category for this object

  • canonicalize – if True, sorts and removes duplicates

  • check – whether to check that generators actually lie in the ambient group

EXAMPLES:

sage: from sage.rings.number_field.galois_group import GaloisGroup_subgroup
    sage: x = polygen(ZZ, 'x')
sage: G = NumberField(x^3 - x - 1, 'a').galois_closure('b').galois_group()
sage: GaloisGroup_subgroup( G, [G([(1,2,3),(4,5,6)])])
Subgroup generated by [(1,2,3)(4,5,6)] of
 (Galois group 6T2 ([3]2) with order 6 of x^6 - 6*x^4 + 9*x^2 + 23)

sage: K.<a> = NumberField(x^6 - 3*x^2 - 1)
sage: L.<b> = K.galois_closure()
sage: G = L.galois_group()
sage: P = L.primes_above(3)[0]
sage: H = G.decomposition_group(P)
sage: H.order()
3

sage: G = NumberField(x^3 - x - 1, 'a').galois_closure('b').galois_group()
sage: H = G.subgroup([G([(1,2,3),(4,5,6)])])
sage: H
Subgroup generated by [(1,2,3)(4,5,6)] of
 (Galois group 6T2 ([3]2) with order 6 of x^6 - 6*x^4 + 9*x^2 + 23)
>>> from sage.all import *
>>> from sage.rings.number_field.galois_group import GaloisGroup_subgroup
>>> x = polygen(ZZ, 'x')
>>> G = NumberField(x**Integer(3) - x - Integer(1), 'a').galois_closure('b').galois_group()
>>> GaloisGroup_subgroup( G, [G([(Integer(1),Integer(2),Integer(3)),(Integer(4),Integer(5),Integer(6))])])
Subgroup generated by [(1,2,3)(4,5,6)] of
 (Galois group 6T2 ([3]2) with order 6 of x^6 - 6*x^4 + 9*x^2 + 23)

>>> K = NumberField(x**Integer(6) - Integer(3)*x**Integer(2) - Integer(1), names=('a',)); (a,) = K._first_ngens(1)
>>> L = K.galois_closure(names=('b',)); (b,) = L._first_ngens(1)
>>> G = L.galois_group()
>>> P = L.primes_above(Integer(3))[Integer(0)]
>>> H = G.decomposition_group(P)
>>> H.order()
3

>>> G = NumberField(x**Integer(3) - x - Integer(1), 'a').galois_closure('b').galois_group()
>>> H = G.subgroup([G([(Integer(1),Integer(2),Integer(3)),(Integer(4),Integer(5),Integer(6))])])
>>> H
Subgroup generated by [(1,2,3)(4,5,6)] of
 (Galois group 6T2 ([3]2) with order 6 of x^6 - 6*x^4 + 9*x^2 + 23)
Element[source]#

alias of GaloisGroupElement

fixed_field(name=None, polred=None, threshold=None)[source]#

Return the fixed field of this subgroup (as a subfield of the Galois closure of the number field associated to the ambient Galois group).

INPUT:

  • name – a variable name for the new field.

  • polred – whether to optimize the generator of the newly created field

    for a simpler polynomial, using PARI’s pari:polredbest. Defaults to True when the degree of the fixed field is at most 8.

  • threshold – positive number; polred only performed if the cost is at most this threshold

EXAMPLES:

sage: x = polygen(ZZ, 'x')
sage: L.<a> = NumberField(x^4 + 1)
sage: G = L.galois_group()
sage: H = G.decomposition_group(L.primes_above(3)[0])
sage: H.fixed_field()
(Number Field in a0 with defining polynomial x^2 + 2 with a0 = a^3 + a,
 Ring morphism:
   From: Number Field in a0 with defining polynomial x^2 + 2 with a0 = a^3 + a
   To:   Number Field in a with defining polynomial x^4 + 1
   Defn: a0 |--> a^3 + a)
>>> from sage.all import *
>>> x = polygen(ZZ, 'x')
>>> L = NumberField(x**Integer(4) + Integer(1), names=('a',)); (a,) = L._first_ngens(1)
>>> G = L.galois_group()
>>> H = G.decomposition_group(L.primes_above(Integer(3))[Integer(0)])
>>> H.fixed_field()
(Number Field in a0 with defining polynomial x^2 + 2 with a0 = a^3 + a,
 Ring morphism:
   From: Number Field in a0 with defining polynomial x^2 + 2 with a0 = a^3 + a
   To:   Number Field in a with defining polynomial x^4 + 1
   Defn: a0 |--> a^3 + a)

You can use the polred option to get a simpler defining polynomial:

sage: K.<a> = NumberField(x^5 - 5*x^2 - 3)
sage: G = K.galois_group(); G
Galois group 5T2 (5:2) with order 10 of x^5 - 5*x^2 - 3
sage: sigma, tau = G.gens()
sage: H = G.subgroup([tau])
sage: H.fixed_field(polred=False)
(Number Field in a0 with defining polynomial x^2 + 84375
  with a0 = 5*ac^5 + 25*ac^3,
 Ring morphism:
   From: Number Field in a0 with defining polynomial x^2 + 84375
         with a0 = 5*ac^5 + 25*ac^3
   To:   Number Field in ac with defining polynomial x^10 + 10*x^8 + 25*x^6 + 3375
   Defn: a0 |--> 5*ac^5 + 25*ac^3)
sage: H.fixed_field(polred=True)
(Number Field in a0 with defining polynomial x^2 - x + 4
  with a0 = -1/30*ac^5 - 1/6*ac^3 + 1/2,
 Ring morphism:
   From: Number Field in a0 with defining polynomial x^2 - x + 4
         with a0 = -1/30*ac^5 - 1/6*ac^3 + 1/2
   To:   Number Field in ac with defining polynomial x^10 + 10*x^8 + 25*x^6 + 3375
   Defn: a0 |--> -1/30*ac^5 - 1/6*ac^3 + 1/2)
sage: G.splitting_field()
Number Field in ac with defining polynomial x^10 + 10*x^8 + 25*x^6 + 3375
>>> from sage.all import *
>>> K = NumberField(x**Integer(5) - Integer(5)*x**Integer(2) - Integer(3), names=('a',)); (a,) = K._first_ngens(1)
>>> G = K.galois_group(); G
Galois group 5T2 (5:2) with order 10 of x^5 - 5*x^2 - 3
>>> sigma, tau = G.gens()
>>> H = G.subgroup([tau])
>>> H.fixed_field(polred=False)
(Number Field in a0 with defining polynomial x^2 + 84375
  with a0 = 5*ac^5 + 25*ac^3,
 Ring morphism:
   From: Number Field in a0 with defining polynomial x^2 + 84375
         with a0 = 5*ac^5 + 25*ac^3
   To:   Number Field in ac with defining polynomial x^10 + 10*x^8 + 25*x^6 + 3375
   Defn: a0 |--> 5*ac^5 + 25*ac^3)
>>> H.fixed_field(polred=True)
(Number Field in a0 with defining polynomial x^2 - x + 4
  with a0 = -1/30*ac^5 - 1/6*ac^3 + 1/2,
 Ring morphism:
   From: Number Field in a0 with defining polynomial x^2 - x + 4
         with a0 = -1/30*ac^5 - 1/6*ac^3 + 1/2
   To:   Number Field in ac with defining polynomial x^10 + 10*x^8 + 25*x^6 + 3375
   Defn: a0 |--> -1/30*ac^5 - 1/6*ac^3 + 1/2)
>>> G.splitting_field()
Number Field in ac with defining polynomial x^10 + 10*x^8 + 25*x^6 + 3375

An embedding is returned also if the subgroup is trivial (Issue #26817):

sage: H = G.subgroup([])
sage: H.fixed_field()
(Number Field in ac with defining polynomial x^10 + 10*x^8 + 25*x^6 + 3375,
 Identity endomorphism of
  Number Field in ac with defining polynomial x^10 + 10*x^8 + 25*x^6 + 3375)
>>> from sage.all import *
>>> H = G.subgroup([])
>>> H.fixed_field()
(Number Field in ac with defining polynomial x^10 + 10*x^8 + 25*x^6 + 3375,
 Identity endomorphism of
  Number Field in ac with defining polynomial x^10 + 10*x^8 + 25*x^6 + 3375)
class sage.rings.number_field.galois_group.GaloisGroup_v1(group, number_field)[source]#

Bases: SageObject

A wrapper around a class representing an abstract transitive group.

This is just a fairly minimal object at present. To get the underlying group, do G.group(), and to get the corresponding number field do G.number_field(). For a more sophisticated interface use the type=None option.

EXAMPLES:

sage: # needs sage.symbolic
sage: from sage.rings.number_field.galois_group import GaloisGroup_v1
sage: K = QQ[2^(1/3)]
sage: pK = K.absolute_polynomial()
sage: G = GaloisGroup_v1(pK.galois_group(pari_group=True), K); G
...DeprecationWarning: GaloisGroup_v1 is deprecated; please use GaloisGroup_v2
See https://github.com/sagemath/sage/issues/28782 for details.
Galois group PARI group [6, -1, 2, "S3"] of degree 3 of the
 Number Field in a with defining polynomial x^3 - 2 with a = 1.259921049894873?
sage: G.order()
6
sage: G.group()
PARI group [6, -1, 2, "S3"] of degree 3
sage: G.number_field()
Number Field in a with defining polynomial x^3 - 2 with a = 1.259921049894873?
>>> from sage.all import *
>>> # needs sage.symbolic
>>> from sage.rings.number_field.galois_group import GaloisGroup_v1
>>> K = QQ[Integer(2)**(Integer(1)/Integer(3))]
>>> pK = K.absolute_polynomial()
>>> G = GaloisGroup_v1(pK.galois_group(pari_group=True), K); G
...DeprecationWarning: GaloisGroup_v1 is deprecated; please use GaloisGroup_v2
See https://github.com/sagemath/sage/issues/28782 for details.
Galois group PARI group [6, -1, 2, "S3"] of degree 3 of the
 Number Field in a with defining polynomial x^3 - 2 with a = 1.259921049894873?
>>> G.order()
6
>>> G.group()
PARI group [6, -1, 2, "S3"] of degree 3
>>> G.number_field()
Number Field in a with defining polynomial x^3 - 2 with a = 1.259921049894873?
group()[source]#

Return the underlying abstract group.

EXAMPLES:

sage: from sage.rings.number_field.galois_group import GaloisGroup_v1
sage: x = polygen(ZZ, 'x')
sage: K = NumberField(x^3 + 2*x + 2, 'theta')
sage: G = GaloisGroup_v1(K.absolute_polynomial().galois_group(pari_group=True), K)
...DeprecationWarning: GaloisGroup_v1 is deprecated; please use GaloisGroup_v2
See https://github.com/sagemath/sage/issues/28782 for details.
sage: H = G.group(); H
PARI group [6, -1, 2, "S3"] of degree 3
sage: P = H.permutation_group(); P
Transitive group number 2 of degree 3
sage: sorted(P)
[(), (2,3), (1,2), (1,2,3), (1,3,2), (1,3)]
>>> from sage.all import *
>>> from sage.rings.number_field.galois_group import GaloisGroup_v1
>>> x = polygen(ZZ, 'x')
>>> K = NumberField(x**Integer(3) + Integer(2)*x + Integer(2), 'theta')
>>> G = GaloisGroup_v1(K.absolute_polynomial().galois_group(pari_group=True), K)
...DeprecationWarning: GaloisGroup_v1 is deprecated; please use GaloisGroup_v2
See https://github.com/sagemath/sage/issues/28782 for details.
>>> H = G.group(); H
PARI group [6, -1, 2, "S3"] of degree 3
>>> P = H.permutation_group(); P
Transitive group number 2 of degree 3
>>> sorted(P)
[(), (2,3), (1,2), (1,2,3), (1,3,2), (1,3)]
number_field()[source]#

Return the number field of which this is the Galois group.

EXAMPLES:

sage: from sage.rings.number_field.galois_group import GaloisGroup_v1
sage: x = polygen(ZZ, 'x')
sage: K = NumberField(x^6 + 2, 't')
sage: G = GaloisGroup_v1(K.absolute_polynomial().galois_group(pari_group=True), K); G
...DeprecationWarning: GaloisGroup_v1 is deprecated; please use GaloisGroup_v2
See https://github.com/sagemath/sage/issues/28782 for details.
Galois group PARI group [12, -1, 3, "D(6) = S(3)[x]2"] of degree 6 of the
 Number Field in t with defining polynomial x^6 + 2
sage: G.number_field()
Number Field in t with defining polynomial x^6 + 2
>>> from sage.all import *
>>> from sage.rings.number_field.galois_group import GaloisGroup_v1
>>> x = polygen(ZZ, 'x')
>>> K = NumberField(x**Integer(6) + Integer(2), 't')
>>> G = GaloisGroup_v1(K.absolute_polynomial().galois_group(pari_group=True), K); G
...DeprecationWarning: GaloisGroup_v1 is deprecated; please use GaloisGroup_v2
See https://github.com/sagemath/sage/issues/28782 for details.
Galois group PARI group [12, -1, 3, "D(6) = S(3)[x]2"] of degree 6 of the
 Number Field in t with defining polynomial x^6 + 2
>>> G.number_field()
Number Field in t with defining polynomial x^6 + 2
order()[source]#

Return the order of this Galois group.

EXAMPLES:

sage: from sage.rings.number_field.galois_group import GaloisGroup_v1
sage: x = polygen(ZZ, 'x')
sage: K = NumberField(x^5 + 2, 'theta_1')
sage: G = GaloisGroup_v1(K.absolute_polynomial().galois_group(pari_group=True), K); G
...DeprecationWarning: GaloisGroup_v1 is deprecated; please use GaloisGroup_v2
See https://github.com/sagemath/sage/issues/28782 for details.
Galois group PARI group [20, -1, 3, "F(5) = 5:4"] of degree 5 of the
 Number Field in theta_1 with defining polynomial x^5 + 2
sage: G.order()
20
>>> from sage.all import *
>>> from sage.rings.number_field.galois_group import GaloisGroup_v1
>>> x = polygen(ZZ, 'x')
>>> K = NumberField(x**Integer(5) + Integer(2), 'theta_1')
>>> G = GaloisGroup_v1(K.absolute_polynomial().galois_group(pari_group=True), K); G
...DeprecationWarning: GaloisGroup_v1 is deprecated; please use GaloisGroup_v2
See https://github.com/sagemath/sage/issues/28782 for details.
Galois group PARI group [20, -1, 3, "F(5) = 5:4"] of degree 5 of the
 Number Field in theta_1 with defining polynomial x^5 + 2
>>> G.order()
20
class sage.rings.number_field.galois_group.GaloisGroup_v2(number_field, algorithm='pari', names=None, gc_numbering=None, _type=None)[source]#

Bases: GaloisGroup_perm

The Galois group of an (absolute) number field.

Note

We define the Galois group of a non-normal field \(K\) to be the Galois group of its Galois closure \(L\), and elements are stored as permutations of the roots of the defining polynomial of \(L\), not as permutations of the roots (in \(L\)) of the defining polynomial of \(K\). The latter would probably be preferable, but is harder to implement. Thus the permutation group that is returned is always simply-transitive.

The ‘arithmetical’ features (decomposition and ramification groups, Artin symbols etc) are only available for Galois fields.

EXAMPLES:

sage: x = polygen(ZZ, 'x')
sage: G = NumberField(x^3 - x - 1, 'a').galois_closure('b').galois_group()
sage: G.subgroup([G([(1,2,3),(4,5,6)])])
Subgroup generated by [(1,2,3)(4,5,6)] of
 (Galois group 6T2 ([3]2) with order 6 of x^6 - 6*x^4 + 9*x^2 + 23)
>>> from sage.all import *
>>> x = polygen(ZZ, 'x')
>>> G = NumberField(x**Integer(3) - x - Integer(1), 'a').galois_closure('b').galois_group()
>>> G.subgroup([G([(Integer(1),Integer(2),Integer(3)),(Integer(4),Integer(5),Integer(6))])])
Subgroup generated by [(1,2,3)(4,5,6)] of
 (Galois group 6T2 ([3]2) with order 6 of x^6 - 6*x^4 + 9*x^2 + 23)

Subgroups can be specified using generators (Issue #26816):

sage: K.<a> = NumberField(x^6 - 6*x^4 + 9*x^2 + 23)
sage: G = K.galois_group()
sage: list(G)
[(),
 (1,2,3)(4,5,6),
 (1,3,2)(4,6,5),
 (1,4)(2,6)(3,5),
 (1,5)(2,4)(3,6),
 (1,6)(2,5)(3,4)]
sage: g = G[1]
sage: h = G[3]
sage: list(G.subgroup([]))
[()]
sage: list(G.subgroup([g]))
[(), (1,2,3)(4,5,6), (1,3,2)(4,6,5)]
sage: list(G.subgroup([h]))
[(), (1,4)(2,6)(3,5)]
sage: sorted(G.subgroup([g,h])) == sorted(G)
True
>>> from sage.all import *
>>> K = NumberField(x**Integer(6) - Integer(6)*x**Integer(4) + Integer(9)*x**Integer(2) + Integer(23), names=('a',)); (a,) = K._first_ngens(1)
>>> G = K.galois_group()
>>> list(G)
[(),
 (1,2,3)(4,5,6),
 (1,3,2)(4,6,5),
 (1,4)(2,6)(3,5),
 (1,5)(2,4)(3,6),
 (1,6)(2,5)(3,4)]
>>> g = G[Integer(1)]
>>> h = G[Integer(3)]
>>> list(G.subgroup([]))
[()]
>>> list(G.subgroup([g]))
[(), (1,2,3)(4,5,6), (1,3,2)(4,6,5)]
>>> list(G.subgroup([h]))
[(), (1,4)(2,6)(3,5)]
>>> sorted(G.subgroup([g,h])) == sorted(G)
True
Element[source]#

alias of GaloisGroupElement

Subgroup[source]#

alias of GaloisGroup_subgroup

artin_symbol(P)[source]#

Return the Artin symbol \(\left(\frac{K / \QQ}{\mathfrak{P}}\right)\), where \(K\) is the number field of self, and \(\mathfrak{P}\) is an unramified prime ideal. This is the unique element \(s\) of the decomposition group of \(\mathfrak{P}\) such that \(s(x) = x^p \bmod \mathfrak{P}\), where \(p\) is the residue characteristic of \(\mathfrak{P}\).

EXAMPLES:

sage: x = polygen(ZZ, 'x')
sage: K.<b> = NumberField(x^4 - 2*x^2 + 2, 'a').galois_closure()
sage: G = K.galois_group()
sage: [G.artin_symbol(P) for P in K.primes_above(7)]
[(1,4)(2,3)(5,8)(6,7), (1,4)(2,3)(5,8)(6,7),
 (1,5)(2,6)(3,7)(4,8), (1,5)(2,6)(3,7)(4,8)]
sage: G.artin_symbol(17)
Traceback (most recent call last):
...
ValueError: Fractional ideal (17) is not prime
sage: QuadraticField(-7,'c').galois_group().artin_symbol(13)
(1,2)
sage: G.artin_symbol(K.primes_above(2)[0])
Traceback (most recent call last):
...
ValueError: Fractional ideal (...) is ramified
>>> from sage.all import *
>>> x = polygen(ZZ, 'x')
>>> K = NumberField(x**Integer(4) - Integer(2)*x**Integer(2) + Integer(2), 'a').galois_closure(names=('b',)); (b,) = K._first_ngens(1)
>>> G = K.galois_group()
>>> [G.artin_symbol(P) for P in K.primes_above(Integer(7))]
[(1,4)(2,3)(5,8)(6,7), (1,4)(2,3)(5,8)(6,7),
 (1,5)(2,6)(3,7)(4,8), (1,5)(2,6)(3,7)(4,8)]
>>> G.artin_symbol(Integer(17))
Traceback (most recent call last):
...
ValueError: Fractional ideal (17) is not prime
>>> QuadraticField(-Integer(7),'c').galois_group().artin_symbol(Integer(13))
(1,2)
>>> G.artin_symbol(K.primes_above(Integer(2))[Integer(0)])
Traceback (most recent call last):
...
ValueError: Fractional ideal (...) is ramified
complex_conjugation(P=None)[source]#

Return the unique element of self corresponding to complex conjugation, for a specified embedding \(P\) into the complex numbers. If \(P\) is not specified, use the “standard” embedding, whenever that is well-defined.

EXAMPLES:

sage: L.<z> = CyclotomicField(7)
sage: G = L.galois_group()
sage: conj = G.complex_conjugation(); conj
(1,4)(2,5)(3,6)
sage: conj(z)
-z^5 - z^4 - z^3 - z^2 - z - 1
>>> from sage.all import *
>>> L = CyclotomicField(Integer(7), names=('z',)); (z,) = L._first_ngens(1)
>>> G = L.galois_group()
>>> conj = G.complex_conjugation(); conj
(1,4)(2,5)(3,6)
>>> conj(z)
-z^5 - z^4 - z^3 - z^2 - z - 1

An example where the field is not CM, so complex conjugation really depends on the choice of embedding:

sage: x = polygen(ZZ, 'x')
sage: L = NumberField(x^6 + 40*x^3 + 1372, 'a')
sage: G = L.galois_group()
sage: [G.complex_conjugation(x) for x in L.places()]
[(1,3)(2,6)(4,5), (1,5)(2,4)(3,6), (1,2)(3,4)(5,6)]
>>> from sage.all import *
>>> x = polygen(ZZ, 'x')
>>> L = NumberField(x**Integer(6) + Integer(40)*x**Integer(3) + Integer(1372), 'a')
>>> G = L.galois_group()
>>> [G.complex_conjugation(x) for x in L.places()]
[(1,3)(2,6)(4,5), (1,5)(2,4)(3,6), (1,2)(3,4)(5,6)]
decomposition_group(P)[source]#

Decomposition group of a prime ideal \(P\), i.e., the subgroup of elements that map \(P\) to itself. This is the same as the Galois group of the extension of local fields obtained by completing at \(P\).

This function will raise an error if \(P\) is not prime or the given number field is not Galois.

\(P\) can also be an infinite prime, i.e., an embedding into \(\RR\) or \(\CC\).

EXAMPLES:

sage: x = polygen(ZZ, 'x')
sage: K.<a> = NumberField(x^4 - 2*x^2 + 2, 'b').galois_closure()
sage: P = K.ideal([17, a^2])
sage: G = K.galois_group()
sage: G.decomposition_group(P)
Subgroup generated by [(1,8)(2,7)(3,6)(4,5)] of
 (Galois group 8T4 ([4]2) with order 8 of x^8 - 20*x^6 + 104*x^4 - 40*x^2 + 1156)
sage: G.decomposition_group(P^2)
Traceback (most recent call last):
...
ValueError: Fractional ideal (...) is not a prime ideal
sage: G.decomposition_group(17)
Traceback (most recent call last):
...
ValueError: Fractional ideal (17) is not a prime ideal
>>> from sage.all import *
>>> x = polygen(ZZ, 'x')
>>> K = NumberField(x**Integer(4) - Integer(2)*x**Integer(2) + Integer(2), 'b').galois_closure(names=('a',)); (a,) = K._first_ngens(1)
>>> P = K.ideal([Integer(17), a**Integer(2)])
>>> G = K.galois_group()
>>> G.decomposition_group(P)
Subgroup generated by [(1,8)(2,7)(3,6)(4,5)] of
 (Galois group 8T4 ([4]2) with order 8 of x^8 - 20*x^6 + 104*x^4 - 40*x^2 + 1156)
>>> G.decomposition_group(P**Integer(2))
Traceback (most recent call last):
...
ValueError: Fractional ideal (...) is not a prime ideal
>>> G.decomposition_group(Integer(17))
Traceback (most recent call last):
...
ValueError: Fractional ideal (17) is not a prime ideal

An example with an infinite place:

sage: x = polygen(ZZ, 'x')
sage: L.<b> = NumberField(x^3 - 2,'a').galois_closure(); G = L.galois_group()
sage: x = L.places()[0]
sage: G.decomposition_group(x).order()
2
>>> from sage.all import *
>>> x = polygen(ZZ, 'x')
>>> L = NumberField(x**Integer(3) - Integer(2),'a').galois_closure(names=('b',)); (b,) = L._first_ngens(1); G = L.galois_group()
>>> x = L.places()[Integer(0)]
>>> G.decomposition_group(x).order()
2
easy_order(algorithm=None)[source]#

Return the order of this Galois group if it’s quick to compute.

EXAMPLES:

sage: R.<x> = ZZ[]
sage: x = polygen(ZZ, 'x')
sage: K.<a> = NumberField(x^3 + 2*x + 2)
sage: G = K.galois_group()
sage: G.easy_order()
6
sage: x = polygen(ZZ, 'x')
sage: L.<b> = NumberField(x^72 + 2*x + 2)
sage: H = L.galois_group()
sage: H.easy_order()
>>> from sage.all import *
>>> R = ZZ['x']; (x,) = R._first_ngens(1)
>>> x = polygen(ZZ, 'x')
>>> K = NumberField(x**Integer(3) + Integer(2)*x + Integer(2), names=('a',)); (a,) = K._first_ngens(1)
>>> G = K.galois_group()
>>> G.easy_order()
6
>>> x = polygen(ZZ, 'x')
>>> L = NumberField(x**Integer(72) + Integer(2)*x + Integer(2), names=('b',)); (b,) = L._first_ngens(1)
>>> H = L.galois_group()
>>> H.easy_order()
group()[source]#

While GaloisGroup_v1 is being deprecated, this provides public access to the PARI/GAP group in order to keep all aspects of that API.

EXAMPLES:

sage: R.<x> = ZZ[]
sage: x = polygen(ZZ, 'x')
sage: K.<a> = NumberField(x^3 + 2*x + 2)
sage: G = K.galois_group(type="pari")
...DeprecationWarning: the different Galois types have been merged into one class
See https://github.com/sagemath/sage/issues/28782 for details.
sage: G.group()
...DeprecationWarning: the group method is deprecated;
you can use _pol_galgp if you really need it
See https://github.com/sagemath/sage/issues/28782 for details.
PARI group [6, -1, 2, "S3"] of degree 3
>>> from sage.all import *
>>> R = ZZ['x']; (x,) = R._first_ngens(1)
>>> x = polygen(ZZ, 'x')
>>> K = NumberField(x**Integer(3) + Integer(2)*x + Integer(2), names=('a',)); (a,) = K._first_ngens(1)
>>> G = K.galois_group(type="pari")
...DeprecationWarning: the different Galois types have been merged into one class
See https://github.com/sagemath/sage/issues/28782 for details.
>>> G.group()
...DeprecationWarning: the group method is deprecated;
you can use _pol_galgp if you really need it
See https://github.com/sagemath/sage/issues/28782 for details.
PARI group [6, -1, 2, "S3"] of degree 3
inertia_group(P)[source]#

Return the inertia group of the prime \(P\), i.e., the group of elements acting trivially modulo \(P\). This is just the 0th ramification group of \(P\).

EXAMPLES:

sage: x = polygen(ZZ, 'x')
sage: K.<b> = NumberField(x^2 - 3, 'a')
sage: G = K.galois_group()
sage: G.inertia_group(K.primes_above(2)[0])
Subgroup generated by [(1,2)] of (Galois group 2T1 (S2) with order 2 of x^2 - 3)
sage: G.inertia_group(K.primes_above(5)[0])
Subgroup generated by [()] of (Galois group 2T1 (S2) with order 2 of x^2 - 3)
>>> from sage.all import *
>>> x = polygen(ZZ, 'x')
>>> K = NumberField(x**Integer(2) - Integer(3), 'a', names=('b',)); (b,) = K._first_ngens(1)
>>> G = K.galois_group()
>>> G.inertia_group(K.primes_above(Integer(2))[Integer(0)])
Subgroup generated by [(1,2)] of (Galois group 2T1 (S2) with order 2 of x^2 - 3)
>>> G.inertia_group(K.primes_above(Integer(5))[Integer(0)])
Subgroup generated by [()] of (Galois group 2T1 (S2) with order 2 of x^2 - 3)
is_galois()[source]#

Whether the underlying number field is Galois.

EXAMPLES:

sage: x = polygen(ZZ, 'x')
sage: NumberField(x^3 - x + 1,'a').galois_group(names='b').is_galois()
False
sage: NumberField(x^2 - x + 1,'a').galois_group().is_galois()
True
>>> from sage.all import *
>>> x = polygen(ZZ, 'x')
>>> NumberField(x**Integer(3) - x + Integer(1),'a').galois_group(names='b').is_galois()
False
>>> NumberField(x**Integer(2) - x + Integer(1),'a').galois_group().is_galois()
True
list()[source]#

List of the elements of self.

EXAMPLES:

sage: x = polygen(ZZ, 'x')
sage: NumberField(x^3 - 3*x + 1,'a').galois_group().list()
[(), (1,2,3), (1,3,2)]
>>> from sage.all import *
>>> x = polygen(ZZ, 'x')
>>> NumberField(x**Integer(3) - Integer(3)*x + Integer(1),'a').galois_group().list()
[(), (1,2,3), (1,3,2)]
number_field()[source]#

The ambient number field.

EXAMPLES:

sage: x = polygen(ZZ, 'x')
sage: K = NumberField(x^3 - x + 1, 'a')
sage: K.galois_group(names='b').number_field() is K
True
>>> from sage.all import *
>>> x = polygen(ZZ, 'x')
>>> K = NumberField(x**Integer(3) - x + Integer(1), 'a')
>>> K.galois_group(names='b').number_field() is K
True
order(algorithm=None, recompute=False)[source]#

Return the order of this Galois group

EXAMPLES:

sage: R.<x> = ZZ[]
sage: x = polygen(ZZ, 'x')
sage: K.<a> = NumberField(x^3 + 2*x + 2)
sage: G = K.galois_group()
sage: G.order()
6
>>> from sage.all import *
>>> R = ZZ['x']; (x,) = R._first_ngens(1)
>>> x = polygen(ZZ, 'x')
>>> K = NumberField(x**Integer(3) + Integer(2)*x + Integer(2), names=('a',)); (a,) = K._first_ngens(1)
>>> G = K.galois_group()
>>> G.order()
6
pari_label()[source]#

Return the label assigned by PARI for this Galois group, an attempt at giving a human readable description of the group.

EXAMPLES:

sage: R.<x> = ZZ[]
sage: x = polygen(ZZ, 'x')
sage: K.<a> = NumberField(x^8 - x^5 + x^4 - x^3 + 1)
sage: G = K.galois_group()
sage: G.transitive_label()
'8T44'
sage: G.pari_label()
'[2^4]S(4)'
>>> from sage.all import *
>>> R = ZZ['x']; (x,) = R._first_ngens(1)
>>> x = polygen(ZZ, 'x')
>>> K = NumberField(x**Integer(8) - x**Integer(5) + x**Integer(4) - x**Integer(3) + Integer(1), names=('a',)); (a,) = K._first_ngens(1)
>>> G = K.galois_group()
>>> G.transitive_label()
'8T44'
>>> G.pari_label()
'[2^4]S(4)'
ramification_breaks(P)[source]#

Return the set of ramification breaks of the prime ideal \(P\), i.e., the set of indices \(i\) such that the ramification group \(G_{i+1} \ne G_{i}\). This is only defined for Galois fields.

EXAMPLES:

sage: x = polygen(ZZ, 'x')
sage: K.<b> = NumberField(x^8 - 20*x^6 + 104*x^4 - 40*x^2 + 1156)
sage: G = K.galois_group()
sage: P = K.primes_above(2)[0]
sage: G.ramification_breaks(P)
{1, 3, 5}
sage: min(G.ramification_group(P, i).order()
....:         / G.ramification_group(P, i + 1).order()
....:     for i in G.ramification_breaks(P))
2
>>> from sage.all import *
>>> x = polygen(ZZ, 'x')
>>> K = NumberField(x**Integer(8) - Integer(20)*x**Integer(6) + Integer(104)*x**Integer(4) - Integer(40)*x**Integer(2) + Integer(1156), names=('b',)); (b,) = K._first_ngens(1)
>>> G = K.galois_group()
>>> P = K.primes_above(Integer(2))[Integer(0)]
>>> G.ramification_breaks(P)
{1, 3, 5}
>>> min(G.ramification_group(P, i).order()
...         / G.ramification_group(P, i + Integer(1)).order()
...     for i in G.ramification_breaks(P))
2
ramification_group(P, v)[source]#

Return the \(v\)-th ramification group of self for the prime \(P\), i.e., the set of elements \(s\) of self such that \(s\) acts trivially modulo \(P^{(v+1)}\). This is only defined for Galois fields.

EXAMPLES:

sage: x = polygen(ZZ, 'x')
sage: K.<b> = NumberField(x^3 - 3, 'a').galois_closure()
sage: G=K.galois_group()
sage: P = K.primes_above(3)[0]
sage: G.ramification_group(P, 3)
Subgroup generated by [(1,2,4)(3,5,6)] of
 (Galois group 6T2 ([3]2) with order 6 of x^6 + 243)
sage: G.ramification_group(P, 5)
Subgroup generated by [()] of (Galois group 6T2 ([3]2) with order 6 of x^6 + 243)
>>> from sage.all import *
>>> x = polygen(ZZ, 'x')
>>> K = NumberField(x**Integer(3) - Integer(3), 'a').galois_closure(names=('b',)); (b,) = K._first_ngens(1)
>>> G=K.galois_group()
>>> P = K.primes_above(Integer(3))[Integer(0)]
>>> G.ramification_group(P, Integer(3))
Subgroup generated by [(1,2,4)(3,5,6)] of
 (Galois group 6T2 ([3]2) with order 6 of x^6 + 243)
>>> G.ramification_group(P, Integer(5))
Subgroup generated by [()] of (Galois group 6T2 ([3]2) with order 6 of x^6 + 243)
signature()[source]#

Return \(1\) if contained in the alternating group, \(-1\) otherwise.

EXAMPLES:

sage: R.<x> = ZZ[]
sage: x = polygen(ZZ, 'x')
sage: K.<a> = NumberField(x^3 - 2)
sage: K.galois_group().signature()
-1
sage: K.<a> = NumberField(x^3 - 3*x - 1)
sage: K.galois_group().signature()
1
>>> from sage.all import *
>>> R = ZZ['x']; (x,) = R._first_ngens(1)
>>> x = polygen(ZZ, 'x')
>>> K = NumberField(x**Integer(3) - Integer(2), names=('a',)); (a,) = K._first_ngens(1)
>>> K.galois_group().signature()
-1
>>> K = NumberField(x**Integer(3) - Integer(3)*x - Integer(1), names=('a',)); (a,) = K._first_ngens(1)
>>> K.galois_group().signature()
1
transitive_number(algorithm=None, recompute=False)[source]#

Regardless of the value of gc_numbering, give the transitive number for the action on the roots of the defining polynomial of the original number field, not the Galois closure.

INPUT:

  • algorithm – string, specify the algorithm to be used

  • recompute – boolean, whether to recompute the result even if known by another algorithm

EXAMPLES:

sage: R.<x> = ZZ[]
sage: x = polygen(ZZ, 'x')
sage: K.<a> = NumberField(x^3 + 2*x + 2)
sage: G = K.galois_group()
sage: G.transitive_number()
2
sage: x = polygen(ZZ, 'x')
sage: L.<b> = NumberField(x^13 + 2*x + 2)
sage: H = L.galois_group(algorithm="gap")
sage: H.transitive_number() # optional - gap_packages
9
>>> from sage.all import *
>>> R = ZZ['x']; (x,) = R._first_ngens(1)
>>> x = polygen(ZZ, 'x')
>>> K = NumberField(x**Integer(3) + Integer(2)*x + Integer(2), names=('a',)); (a,) = K._first_ngens(1)
>>> G = K.galois_group()
>>> G.transitive_number()
2
>>> x = polygen(ZZ, 'x')
>>> L = NumberField(x**Integer(13) + Integer(2)*x + Integer(2), names=('b',)); (b,) = L._first_ngens(1)
>>> H = L.galois_group(algorithm="gap")
>>> H.transitive_number() # optional - gap_packages
9
unrank(i)[source]#

Return the \(i\)-th element of self.

INPUT:

  • i – integer between \(0\) and \(n-1\) where \(n\) is the cardinality of this set

EXAMPLES:

sage: x = polygen(ZZ, 'x')
sage: G = NumberField(x^3 - 3*x + 1,'a').galois_group()
sage: [G.unrank(i) for i in range(G.cardinality())]
[(), (1,2,3), (1,3,2)]
>>> from sage.all import *
>>> x = polygen(ZZ, 'x')
>>> G = NumberField(x**Integer(3) - Integer(3)*x + Integer(1),'a').galois_group()
>>> [G.unrank(i) for i in range(G.cardinality())]
[(), (1,2,3), (1,3,2)]