Skip to content

Commit

Permalink
fix is_abelian (and some more) (#1629)
Browse files Browse the repository at this point in the history
fixes Simon's problem on slack:

julia> F, a = cyclotomic_field(7,:a)
(Cyclotomic field of order 7, a)

julia> P,x = polynomial_ring(F,:x)
(Univariate polynomial ring in x over F, x)

julia> FG,dd = number_field(x^6 + (133486969//288*a^5 - 223759151//432*a^4 - 223759151//432*a^3 + 133486969//288*a^2 - 232474865//288)*x^3 - 840539241479//13824*a^5 - 18036715089631//9216*a^4 - 18036715089631//9216*a^3 - 840539241479//13824*a^2 - 7320065966297//9216)
(Relative number field of degree 6 over F, _$)

julia> is_abelian(FG)
ERROR: Number field element not in the order
Stacktrace:
...

The same problem (plus some more) also would have prevented
maximal_abelian_subfield(FG, of_closure = true)
to have been correct

The runtime of those examples is a bit high for testing (always)
  • Loading branch information
fieker authored Sep 27, 2024
1 parent cfbc336 commit e5cdeb0
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions src/RCF/conductor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,13 @@ end
function is_abelian(K::RelSimpleNumField)
k = base_field(K)
Ok = maximal_order(k)
d = ideal(Ok, Ok(discriminant(K.pol)))
_d = discriminant(K.pol)
if _d in Ok
d = ideal(Ok, Ok(_d))
else
d = discriminant(any_order(K))
@assert order(d) == Ok
end
r, mr = ray_class_group(d, real_places(k), n_quo = degree(K))
s, ms = norm_group(K.pol, mr, false)
deg = divexact(order(r), order(s))
Expand Down Expand Up @@ -977,11 +983,22 @@ function maximal_abelian_subfield(K::RelSimpleNumField{AbsSimpleNumFieldElem}; o
dd = d
else
d = ideal(zk, discriminant(K))
dd = d.num
if !isone(d.den)
dd = discriminant(any_order(K))
else
dd = d.num
end
end

r1, r2 = signature(base_field(K))
C, mC = ray_class_group(dd, infinite_places(base_field(K))[1:r1], n_quo = degree(K))
#of_closure cannot use the n_quo by the degree: any D_n field has
#zeta_n in the closure...thus a degree 5 field might have a
#degree 4 subfield (actually 2 x 4) in the closure.
if of_closure
C, mC = ray_class_group(dd, infinite_places(base_field(K))[1:r1])
else
C, mC = ray_class_group(dd, infinite_places(base_field(K))[1:r1], n_quo = degree(K))
end
N, iN = norm_group(K, mC, of_closure = of_closure)
return ray_class_field(mC, quo(C, iN, false)[2])
end
Expand Down

0 comments on commit e5cdeb0

Please sign in to comment.