diff --git a/src/FunField/Factor.jl b/src/FunField/Factor.jl index add01c5243..8f7c5f1e87 100644 --- a/src/FunField/Factor.jl +++ b/src/FunField/Factor.jl @@ -34,7 +34,7 @@ function to_mpoly(f::Generic.Poly{<:Generic.RationalFunctionFieldElem}) end return finish(Fc) end - + function Hecke.factor(f::Generic.Poly{<:Generic.RationalFunctionFieldElem}) Pf = parent(f) lf = factor(to_mpoly(f)) @@ -44,7 +44,7 @@ function Hecke.factor(f::Generic.Poly{<:Generic.RationalFunctionFieldElem}) @assert iszero(f) || sum(degree(x)*y for (x,y) = fa; init = 0) == degree(f) return fa end - + function Hecke.factor_absolute(f::Generic.Poly{<:Generic.RationalFunctionFieldElem}) Pf = parent(f) lf = factor_absolute(to_mpoly(f)) @@ -55,7 +55,7 @@ function Hecke.factor_absolute(f::Generic.Poly{<:Generic.RationalFunctionFieldEl h = gh[2] k = base_ring(g) kt, t = RationalFunctionField(k, base_ring(Pf).S, cached = false) - ktx, x = PolynomialRing(kt, symbols(Pf)[1], cached = false) + ktx, x = polynomial_ring(kt, symbols(Pf)[1], cached = false) push!(la, [from_mpoly(g, ktx), from_mpoly(h, ktx)]=>v) end return la diff --git a/src/NumField/ComplexEmbeddings/Generic.jl b/src/NumField/ComplexEmbeddings/Generic.jl index 2a1b8d1a73..727264bf3a 100644 --- a/src/NumField/ComplexEmbeddings/Generic.jl +++ b/src/NumField/ComplexEmbeddings/Generic.jl @@ -146,7 +146,7 @@ This is the same as `g * f`. # Examples ```jldoctest -julia> K, a = CyclotomicField(5, "a"); +julia> K, a = cyclotomic_field(5, "a"); julia> k, ktoK = Hecke.subfield(K, [a + inv(a)]); @@ -175,7 +175,7 @@ all embedings of $K$ which restrict to $e$ along $f$. # Example ```jldoctest -julia> K, a = CyclotomicField(5, "a"); +julia> K, a = cyclotomic_field(5, "a"); julia> k, ktoK = Hecke.subfield(K, [a + inv(a)]); diff --git a/test/Misc/Poly.jl b/test/Misc/Poly.jl index 85d1b7af8a..a4e2439adb 100644 --- a/test/Misc/Poly.jl +++ b/test/Misc/Poly.jl @@ -73,12 +73,12 @@ end @testset "roots" begin - o = CyclotomicField(2)[1](1) + o = cyclotomic_field(2)[1](1) @test issetequal(roots(o, 2), [o, -o]) - o = CyclotomicField(1)[1](1) + o = cyclotomic_field(1)[1](1) @test issetequal(roots(o, 2), [o, -o]) - o, a = CyclotomicField(4) + o, a = cyclotomic_field(4) _, x = o["x"] @test length(roots(x^2-a^2//4)) == 2 diff --git a/test/Misc/jordan_test.jl b/test/Misc/jordan_test.jl index 79d133c2d6..24426a8ec5 100644 --- a/test/Misc/jordan_test.jl +++ b/test/Misc/jordan_test.jl @@ -60,7 +60,7 @@ end @test haskey(l, one(FlintQQ)) @test l[one(FlintQQ)] == 2 - K, a = CyclotomicField(3, "a") + K, a = cyclotomic_field(3, "a") lK = eigvals(M, K) @test length(keys(lK)) == 3 @test haskey(lK, one(K)) && haskey(lK, a) && haskey(lK, -a - 1) diff --git a/test/NfAbs/NfAbs.jl b/test/NfAbs/NfAbs.jl index 55e9ca1f84..dbb34b0ea9 100644 --- a/test/NfAbs/NfAbs.jl +++ b/test/NfAbs/NfAbs.jl @@ -1,8 +1,8 @@ @testset "coercion between cyclotomic fields" begin - F2, z2 = CyclotomicField(2) + F2, z2 = cyclotomic_field(2) @test Hecke.force_coerce_cyclo(F2, z2) == z2 - F1, z1 = CyclotomicField(1) + F1, z1 = cyclotomic_field(1) up = Hecke.force_coerce_cyclo(F2, z1) @test Hecke.force_coerce_cyclo(F1, up) == z1 @@ -10,10 +10,10 @@ # coerce first up and then down for n in 1:15 - Fn, zn = CyclotomicField(n) + Fn, zn = cyclotomic_field(n) for m in 1:15 nm = n*m - Fnm, znm = CyclotomicField(nm) + Fnm, znm = cyclotomic_field(nm) x = rand(Fn, choices) x_up = Hecke.force_coerce_cyclo(Fnm, x) x_down = Hecke.force_coerce_cyclo(Fn, x_up) @@ -23,12 +23,12 @@ # coerce first down and then up for n in 1:15 - Fn, zn = CyclotomicField(n) + Fn, zn = cyclotomic_field(n) for g in divisors(n) - Fg, zg = CyclotomicField(g) + Fg, zg = cyclotomic_field(g) for m in 1:15 gm = g*m - Fgm, zgm = CyclotomicField(gm) + Fgm, zgm = cyclotomic_field(gm) x = rand(Fg, choices) x_up = Hecke.force_coerce_cyclo(Fgm, x) x_n = Hecke.force_coerce_cyclo(Fn, x_up) @@ -39,10 +39,10 @@ # impossible coercions for n in 1:45 - Fn, zn = CyclotomicField(n) + Fn, zn = cyclotomic_field(n) for m in 1:45 if n % m != 0 && ! (isodd(n) && (2*n) % m == 0) - Fm, zm = CyclotomicField(m) + Fm, zm = cyclotomic_field(m) @test_throws ErrorException Hecke.force_coerce_cyclo(Fn, zm) @test Hecke.force_coerce_cyclo(Fn, zm, Val{false}) === nothing end @@ -50,8 +50,8 @@ end # equality check requiring the construction of a common superfield - F5, z5 = CyclotomicField(5) - F3, z3 = CyclotomicField(3) + F5, z5 = cyclotomic_field(5) + F3, z3 = cyclotomic_field(3) @test z5^5 == z3^3 # splitting field diff --git a/test/NumField/NfAbs/NfAbs.jl b/test/NumField/NfAbs/NfAbs.jl index 7d6248e073..b1cd78c557 100644 --- a/test/NumField/NfAbs/NfAbs.jl +++ b/test/NumField/NfAbs/NfAbs.jl @@ -1,7 +1,7 @@ @testset "NumField/NfAbs/NfAbs" begin cyclo_expl = function(n, m) - Fn, zn = CyclotomicField(n) - Fnm, znm = CyclotomicField(n*m) + Fn, zn = cyclotomic_field(n) + Fnm, znm = cyclotomic_field(n*m) x = zn x_up = Hecke.force_coerce_cyclo(Fnm, x) x_down = Hecke.force_coerce_cyclo(Fn, x_up)