Skip to content

Commit

Permalink
fix _automorphisms for degree 1 number field (#1585)
Browse files Browse the repository at this point in the history
  • Loading branch information
StevellM authored Aug 23, 2024
1 parent f88e78f commit c8604b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Map/automorphisms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ end

function _automorphisms(K::AbsSimpleNumField; is_abelian::Bool = false)
if degree(K) == 1
return automorphism_type(K)[hom(K, K, one(K))]
return automorphism_type(K)[hom(K, K, gen(K))]
end
if Nemo.is_cyclo_type(K)
f = get_attribute(K, :cyclo)::Int
Expand Down
4 changes: 4 additions & 0 deletions test/Map/NumberField.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ end
@test fl
fl, tau = Hecke.is_cm_field(K)
@test fl

Qt, t = QQ["t"]
K, _ = number_field(t+1; cached=false)
@test length(automorphism_list(K)) == 1
end

@testset "parents" begin
Expand Down

0 comments on commit c8604b9

Please sign in to comment.