Skip to content

Commit

Permalink
Fix some type instability in fixed_field (#2993)
Browse files Browse the repository at this point in the history
  • Loading branch information
thofma authored Nov 6, 2023
1 parent 9013fad commit 5766255
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions experimental/GaloisGrp/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,10 @@
subfields(F)
G, = galois_group(F)
@test is_isomorphic(G, symmetric_group(3))

K, a = cyclotomic_field(3, "a", cached = false)
G, C = galois_group(K)
k = fixed_field(C, G)
@test degree(k) == 1 && k isa AnticNumberField
end

4 changes: 2 additions & 2 deletions src/NumberTheory/GaloisGrp/GaloisGrp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2314,8 +2314,8 @@ extension.
"""
function fixed_field(GC::GaloisCtx, U::PermGroup, extra::Int = 5)
G = GC.G
if index(G, U) == 1 # not type stable
return QQ
if index(G, U) == 1
return Hecke.rationals_as_number_field()[1]
end
#XXX: seems to be broken for reducible f, ie. intransitive groups
a, T = relative_invariant(G, U)
Expand Down

0 comments on commit 5766255

Please sign in to comment.