Beispiel #1
0
def test_galois_action_on_embeddings(f, gal_deg):
    K = NumberField(f, "a")
    G_K = K.galois_group()
    G_K_emb, to_emb, from_emb, Kgal, embeddings = galois_action_on_embeddings(
        G_K)
    # test that to_emb and from_emb are isomorphism
    assert G_K.hom(G_K) == from_emb * to_emb
    assert G_K_emb.hom(G_K_emb) == to_emb * from_emb
    assert to_emb.domain() == G_K
    assert to_emb.codomain() == G_K_emb
    assert from_emb.domain() == G_K_emb
    assert from_emb.codomain() == G_K
    assert embeddings[0] == G_K.gen(0).as_hom() * embeddings[G_K_emb.gen(0)
                                                             (1) - 1]
    assert Kgal.degree() == G_K_emb.cardinality() == gal_deg
    assert G_K_emb.degree() == len(embeddings) == K.degree()
Beispiel #2
0
#!/usr/bin/env sage

from __future__ import print_function

from sage import *
from sage.rings.number_field.number_field import NumberField

#import sys
#print(sys.argv)

if 1:
    K = NumberField(x ^ 4 + 1)

    r2 = e8 + e8 ^ 7
    assert r2**2 == 2

    G = K.galois_group()
    assert len(G) == 4