Skip to content

Commit

Permalink
Fix automorphism group of non-simple field
Browse files Browse the repository at this point in the history
  • Loading branch information
thofma committed Sep 21, 2023
1 parent 3827bb4 commit abb8fd9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Map/automorphisms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export absolute_automorphism_list, absolute_automorphism_group


function _automorphisms(K::NfAbsNS; is_abelian::Bool = false)
pols = QQPolyRingElem[is_univariate(x)[2] for x in K.pol]
pols = QQPolyRingElem[to_univariate(Globals.Qx, x) for x in K.pol]
rt = Vector{Vector{NfAbsNSElem}}(undef, length(pols))
for i = 1:length(pols)
rt[i] = roots(K, pols[i])
Expand All @@ -19,7 +19,7 @@ function _automorphisms(K::NfAbsNS; is_abelian::Bool = false)
ind = 1
I = cartesian_product_iterator([1:length(x) for x in rt], inplace = true)
for i in I
auts[ind] = hom(K, K, elem_type(K)[rt[i[j]] for j = 1:length(pols)])
auts[ind] = hom(K, K, elem_type(K)[rt[j][i[j]] for j = 1:length(pols)])
ind += 1
end
return auts
Expand Down
10 changes: 10 additions & 0 deletions test/NumField/NfAbs/NfAbs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,13 @@ end
K, a = number_field(f)
@test length(factor(K, f).fac) == 4
end

@testset "automorphisms" begin
Qx, x = QQ["x"]
K, a = number_field([x^2 - 2, x^2 - 3], "a", cached = false)
@test is_normal(K)
@test length(automorphism_list(K)) == 4
K, a = number_field([x^2 - 2, x^3 - 2], "a", cached = false)
@test !is_normal(K)
@test length(automorphism_list(K)) == 2
end

0 comments on commit abb8fd9

Please sign in to comment.