From 379ee516b81bd82876891b6ee160810142eed8a9 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 29 Sep 2023 14:39:27 +0200 Subject: [PATCH] Switch from FiniteField to finite_field Command used to create this PR: git grep -l -w FiniteField | xargs perl -pi -e 's;\bFiniteField\b;finite_field;g' --- Project.toml | 2 +- examples/Plesken.jl | 8 ++--- src/EllCrv/Finite.jl | 2 +- src/GenOrd/Ideal.jl | 2 +- src/LocalField/LocalField.jl | 2 +- src/LocalField/qAdic.jl | 2 +- src/Misc/Plesken.jl | 12 +++---- src/Misc/Poly.jl | 2 +- src/Misc/RelFiniteField.jl | 6 ++-- src/NumField/NfAbs/Simplify.jl | 2 +- src/NumFieldOrd/NfOrd/Hensel.jl | 4 +-- src/NumFieldOrd/NfOrd/Ideal/Prime.jl | 2 +- src/NumFieldOrd/NfOrd/MaxOrd/Polygons.jl | 6 ++-- src/QuadForm/Quad/NormalForm.jl | 2 +- test/AlgAss/AlgAss.jl | 4 +-- test/EllCrv/Finite.jl | 4 +-- test/EllCrv/Isogeny.jl | 2 +- test/GenOrd/MaximalOrder.jl | 2 +- test/Misc/FiniteField.jl | 8 ++--- test/Misc/Poly.jl | 2 +- test/Misc/RelFinField.jl | 42 ++++++++++++------------ test/Misc/meataxe.jl | 4 +-- test/Misc/stable_subgroups.jl | 2 +- test/QuadForm/Quad/PadicLift.jl | 2 +- 24 files changed, 63 insertions(+), 63 deletions(-) diff --git a/Project.toml b/Project.toml index a7fd1420ab..caf9ab40fe 100644 --- a/Project.toml +++ b/Project.toml @@ -30,7 +30,7 @@ PolymakeExt = "Polymake" [compat] AbstractAlgebra = "^0.32.1" GAP = "0.9.6" -Nemo = "^0.36.0" +Nemo = "^0.36.1" Polymake = "0.10, 0.11" RandomExtensions = "0.4.3" julia = "1.6" diff --git a/examples/Plesken.jl b/examples/Plesken.jl index 39cea2d05a..80719bc9f9 100644 --- a/examples/Plesken.jl +++ b/examples/Plesken.jl @@ -214,7 +214,7 @@ function plesken_kummer(p::ZZRingElem, r::Int, s::Int) if (p-1) % r == 0 - R = FiniteField(p) + R = finite_field(p) descent = false else f = cyclotomic(r, polynomial_ring(FlintZZ)[2]) @@ -283,7 +283,7 @@ end function plesken_as(p::ZZRingElem, r::Int, s::Int) @assert p==r - R = FiniteField(p) + R = finite_field(p) g = R(-1) t = 1 while s>1 @@ -300,12 +300,12 @@ function plesken_2(p::ZZRingElem, r::Int, s::Int) @assert r==2 #Plesken, 1.27 if valuation(p-1, 2) >1 - R = FiniteField(p) + R = finite_field(p) g = primitive_root_r_div_qm1(p, r) t = 1 else @assert valuation(p+1, 2)>1 - R = FiniteField(p) + R = finite_field(p) Rx,x = polynomial_ring(R, "t_1") R = residue_ring(Rx, x^2+1) g = primitive_root_r_div_qm1(R, 2) diff --git a/src/EllCrv/Finite.jl b/src/EllCrv/Finite.jl index 688514cf78..b768847a70 100644 --- a/src/EllCrv/Finite.jl +++ b/src/EllCrv/Finite.jl @@ -990,7 +990,7 @@ function _embed_into_p2(j, L) if degree(p) <= 1 return L(_to_z(j)) end - F, a = FiniteField(p) + F, a = finite_field(p) e = embed(F, L) return e(gen(F)) end diff --git a/src/GenOrd/Ideal.jl b/src/GenOrd/Ideal.jl index d73f70a265..d6688fdd75 100644 --- a/src/GenOrd/Ideal.jl +++ b/src/GenOrd/Ideal.jl @@ -576,7 +576,7 @@ end ################################################################################ function Hecke.residue_field(R::fpPolyRing, p::fpPolyRingElem) - K, _ = FiniteField(p,"o") + K, _ = finite_field(p,"o") return K, MapFromFunc(R, K, x->K(x), y->R(y)) end diff --git a/src/LocalField/LocalField.jl b/src/LocalField/LocalField.jl index ca8f98ca65..116060f7e5 100644 --- a/src/LocalField/LocalField.jl +++ b/src/LocalField/LocalField.jl @@ -465,7 +465,7 @@ function residue_field(K::LocalField{S, UnramifiedLocalField}) where {S <: Field Fpt = polynomial_ring(ks, cached = false)[1] g = defining_polynomial(K) f = Fpt([ks(mks(coeff(g, i))) for i=0:degree(K)]) - kk = Native.FiniteField(f)[1] + kk = Native.finite_field(f)[1] bas = basis(K) u = gen(kk) function proj(a::Hecke.LocalFieldElem) diff --git a/src/LocalField/qAdic.jl b/src/LocalField/qAdic.jl index e13e397e70..57c9bf1b0c 100644 --- a/src/LocalField/qAdic.jl +++ b/src/LocalField/qAdic.jl @@ -14,7 +14,7 @@ function residue_field(Q::FlintQadicField) Fpt = polynomial_ring(Fp, cached = false)[1] g = defining_polynomial(Q) #no Conway if parameters are too large! f = Fpt([Fp(lift(coeff(g, i))) for i=0:degree(Q)]) - k = Native.FiniteField(f, "o", cached = false)[1] + k = Native.finite_field(f, "o", cached = false)[1] pro = function(x::qadic) v = valuation(x) v < 0 && error("elt non integral") diff --git a/src/Misc/Plesken.jl b/src/Misc/Plesken.jl index 2c3296705d..068dc7c6b9 100644 --- a/src/Misc/Plesken.jl +++ b/src/Misc/Plesken.jl @@ -78,14 +78,14 @@ end function _presentation_artin_schreier(F, n) p = characteristic(F) Fx, x = polynomial_ring(F, "x", cached = false) - F1, a = FiniteField(x^p-x-1, "a", cached = false, check = false) + F1, a = finite_field(x^p-x-1, "a", cached = false, check = false) F1y, y = polynomial_ring(F1, "y1", cached = false) el = a for i = 2:n pol = y^p-y-el^(p-1) - Frel = FiniteField(pol, "a$i", cached = false, check = false)[1] + Frel = finite_field(pol, "a$i", cached = false, check = false)[1] abs_def_pol = norm(pol) - F1, gF1 = FiniteField(abs_def_pol, "a", check = false, cached = false) + F1, gF1 = finite_field(abs_def_pol, "a", check = false, cached = false) mp = hom(F1, Frel, gen(Frel)) el = mp\(gen(Frel)*el) F1y, y = polynomial_ring(F1, "y1", cached = false) @@ -132,7 +132,7 @@ function _presentation_kummer(F, r::T, n::Int) where T <: Union{ZZRingElem, Int} def_pol1 = Fx() setcoeff!(def_pol1, 0, -pr_root) setcoeff!(def_pol1, r^n, one(F)) - F1, gF1 = FiniteField(def_pol1, "a1", cached = false, check = false) + F1, gF1 = finite_field(def_pol1, "a1", cached = false, check = false) return F1 end @@ -151,7 +151,7 @@ function _presentation_generic(F, r::T, n::Int) where T <: Union{ZZRingElem, Int ind = i end end - F0, gF0 = FiniteField(lF[ind], "a0", cached = false) + F0, gF0 = finite_field(lF[ind], "a0", cached = false) f = degree(F0) Fn = _presentation_kummer(F0, r, n) #Now, I need to take the trace. @@ -163,7 +163,7 @@ function _presentation_generic(F, r::T, n::Int) where T <: Union{ZZRingElem, Int g = g^e t = add!(t, t, g) end - return FiniteField(_minpoly(t, r^n), "a", cached = false, check = false)[1] + return finite_field(_minpoly(t, r^n), "a", cached = false, check = false)[1] end function _find_exponent(f::Int, p::ZZRingElem, r::ZZRingElem, n::Int) diff --git a/src/Misc/Poly.jl b/src/Misc/Poly.jl index bc02a10874..cd017a572d 100644 --- a/src/Misc/Poly.jl +++ b/src/Misc/Poly.jl @@ -882,7 +882,7 @@ specified, return the `n`-th cyclotomic polynomial over the integers. # Examples ```jldoctest -julia> F, _ = FiniteField(5) +julia> F, _ = finite_field(5) (Finite field of characteristic 5, 1) julia> Ft, _ = F["t"] diff --git a/src/Misc/RelFiniteField.jl b/src/Misc/RelFiniteField.jl index 20baff8d85..ce991af02b 100644 --- a/src/Misc/RelFiniteField.jl +++ b/src/Misc/RelFiniteField.jl @@ -547,7 +547,7 @@ end # ################################################################################ -function Native.FiniteField(f::T, s::String = "a" ; cached::Bool = true, check::Bool = true) where T <: Union{fqPolyRepPolyRingElem, FqPolyRepPolyRingElem} +function Native.finite_field(f::T, s::String = "a" ; cached::Bool = true, check::Bool = true) where T <: Union{fqPolyRepPolyRingElem, FqPolyRepPolyRingElem} if check @assert is_irreducible(f) end @@ -556,7 +556,7 @@ function Native.FiniteField(f::T, s::String = "a" ; cached::Bool = true, check:: return F, gen(F) end -function Native.FiniteField(f::PolyElem{T}, s::String = "a" ; cached::Bool = true, check::Bool = true) where T <: RelFinFieldElem +function Native.finite_field(f::PolyElem{T}, s::String = "a" ; cached::Bool = true, check::Bool = true) where T <: RelFinFieldElem if check @assert is_irreducible(f) end @@ -666,7 +666,7 @@ function absolute_field(F::RelFinField{T}; cached::Bool = true) where T <: FinFi end p = _char(F) d = absolute_degree(F) - K, gK = Native.FiniteField(p, d, "a", cached = cached) + K, gK = Native.finite_field(p, d, "a", cached = cached) k, mk = absolute_field(base_field(F)) def_pol_new = map_coefficients(pseudo_inv(mk), defining_polynomial(F)) img_gen_k = roots(K, defining_polynomial(k))[1] diff --git a/src/NumField/NfAbs/Simplify.jl b/src/NumField/NfAbs/Simplify.jl index a6a14d6e41..08404a09cd 100644 --- a/src/NumField/NfAbs/Simplify.jl +++ b/src/NumField/NfAbs/Simplify.jl @@ -139,7 +139,7 @@ function _sieve_primitive_elements(B::Vector{NfAbsNSElem}) Zx = polynomial_ring(FlintZZ, "x", cached = false)[1] pols = [Zx(to_univariate(Globals.Qx, x)) for x in K.pol] p, d = _find_prime(pols) - F = Native.FiniteField(p, d, "w", cached = false)[1] + F = Native.finite_field(p, d, "w", cached = false)[1] Fp = Native.GF(p, cached = false) Fpt = polynomial_ring(Fp, ngens(K))[1] Ft = polynomial_ring(F, "t", cached = false)[1] diff --git a/src/NumFieldOrd/NfOrd/Hensel.jl b/src/NumFieldOrd/NfOrd/Hensel.jl index 5b112e8ffb..220765ee85 100644 --- a/src/NumFieldOrd/NfOrd/Hensel.jl +++ b/src/NumFieldOrd/NfOrd/Hensel.jl @@ -157,7 +157,7 @@ function _roots_hensel(f::Generic.Poly{nf_elem}; lp = factor(gp).fac #set up the mod p data: - #need FiniteField as I need to factor (roots) + #need finite_field as I need to factor (roots) # I want to find a residue field with less roots for gp_factor in keys(lp) deg_p = degree(gp_factor) @@ -425,7 +425,7 @@ function _hensel(f::Generic.Poly{nf_elem}, #later we'll get the HNF matrix for selected powers as well #set up the mod p data: - #need FiniteField as I need to factor (roots) + #need finite_field as I need to factor (roots) rt = roots(fp) diff --git a/src/NumFieldOrd/NfOrd/Ideal/Prime.jl b/src/NumFieldOrd/NfOrd/Ideal/Prime.jl index 660b34e0cf..43ac7ccb20 100644 --- a/src/NumFieldOrd/NfOrd/Ideal/Prime.jl +++ b/src/NumFieldOrd/NfOrd/Ideal/Prime.jl @@ -1395,7 +1395,7 @@ function prime_dec_nonindex(O::NfAbsOrd{NfAbsNS,NfAbsNSElem}, p::IntegerUnion, d =# for x = Base.Iterators.product(fac...) k = lcm([degree(t[1]) for t = x]) - Fq = Native.FiniteField(p, k, "y", cached = false)[1] + Fq = Native.finite_field(p, k, "y", cached = false)[1] Fq2 = residue_ring(Rx, lift(Zx, minpoly(gen(Fq)))) rt = Vector{Vector{elem_type(Fq)}}() RT = [] diff --git a/src/NumFieldOrd/NfOrd/MaxOrd/Polygons.jl b/src/NumFieldOrd/NfOrd/MaxOrd/Polygons.jl index 762872e5ae..f146c5d1aa 100644 --- a/src/NumFieldOrd/NfOrd/MaxOrd/Polygons.jl +++ b/src/NumFieldOrd/NfOrd/MaxOrd/Polygons.jl @@ -307,7 +307,7 @@ Computes the residual polynomial of the side $L$ of the Newton Polygon $N$. function residual_polynomial(N::NewtonPolygon{ZZPolyRingElem}, L::Line) F = GF(N.p, cached = false) Ft = polynomial_ring(F, "t", cached = false)[1] - FF = FiniteField(Ft(N.phi), "a", cached = false)[1] + FF = finite_field(Ft(N.phi), "a", cached = false)[1] return residual_polynomial(FF, L, N.development, N.p) end @@ -407,7 +407,7 @@ function gens_overorder_polygons(O::NfOrd, p::ZZRingElem) isone(m) && continue fac = factor(gg) for (g, m1) in fac - F, a = Native.FiniteField(g, "a", cached = false) + F, a = Native.finite_field(g, "a", cached = false) phi = lift(Zx, g) dev, quos = phi_development_with_quos(Zx(f), phi) N = _newton_polygon(dev, p) @@ -929,7 +929,7 @@ function decomposition_type_polygon(O::NfOrd, p::Union{ZZRingElem, Int}) continue end Nl = filter(x -> slope(x)<0, N.lines) - F, a = Native.FiniteField(g, "a", cached = false) + F, a = Native.finite_field(g, "a", cached = false) pols = dense_poly_type(elem_type(F))[] for ll in Nl rp = residual_polynomial(F, ll, dev, p) diff --git a/src/QuadForm/Quad/NormalForm.jl b/src/QuadForm/Quad/NormalForm.jl index da67460b0e..bea322e5f5 100644 --- a/src/QuadForm/Quad/NormalForm.jl +++ b/src/QuadForm/Quad/NormalForm.jl @@ -58,7 +58,7 @@ function _ispadic_normal_form_odd(G, p) o = identity_matrix(QQ, 1) - F, = FiniteField(p, 1, cached = false) + F, = finite_field(p, 1, cached = false) for i in 1:length(blocks) if all(==(o), blocks[i]) diff --git a/test/AlgAss/AlgAss.jl b/test/AlgAss/AlgAss.jl index 40d69eb191..b4e7d03485 100644 --- a/test/AlgAss/AlgAss.jl +++ b/test/AlgAss/AlgAss.jl @@ -86,7 +86,7 @@ end # Restrict from F_q to F_p Fp = GF(7) - Fq, a = FiniteField(7, 3, "a") + Fq, a = finite_field(7, 3, "a") A = AlgAss(MatrixAlgebra(Fq, 2)) B, BtoA = Hecke.restrict_scalars(A, Fp) @@ -168,7 +168,7 @@ end @testset "Matrix Algebra" begin Fp = GF(7) - Fq, a = FiniteField(7, 2, "a") + Fq, a = finite_field(7, 2, "a") A = AlgAss(MatrixAlgebra(Fq, 3)) B, AtoB = Hecke._as_matrix_algebra(A) diff --git a/test/EllCrv/Finite.jl b/test/EllCrv/Finite.jl index eb2e662942..0710f1508c 100644 --- a/test/EllCrv/Finite.jl +++ b/test/EllCrv/Finite.jl @@ -180,7 +180,7 @@ F = GF(3) Fx, x = F["x"] f = x^6 + 2*x^4 + x^2 + 2*x + 2 - F, a = FiniteField(f) + F, a = finite_field(f) E = EllipticCurve([a^4 + a^3 + 2*a^2 + 2*a, 2*a^5 + 2*a^3 + 2*a^2 + 1]) A, = abelian_group(E) @test elementary_divisors(A) == [26, 26] @@ -192,7 +192,7 @@ F = GF(101) Fx, x = F["x"] f = x^3 + 3*x + 99 - F, a = FiniteField(f) + F, a = finite_field(f) E = EllipticCurve([2*a^2 + 48*a + 27, 89*a^2 + 76*a + 24]) A, = abelian_group(E) @test elementary_divisors(A) == [1031352] diff --git a/test/EllCrv/Isogeny.jl b/test/EllCrv/Isogeny.jl index c67597b9da..35c840ae68 100644 --- a/test/EllCrv/Isogeny.jl +++ b/test/EllCrv/Isogeny.jl @@ -121,7 +121,7 @@ E = EllipticCurve(F, [0, 1, 1, 1, 1]) @test is_kernel_polynomial(E, x + 1) - F, o = FiniteField(47, 2, "o") + F, o = finite_field(47, 2, "o") E = EllipticCurve(F, [0, o]) Fx, x = F["x"] f = x^3 + (7*o + 11)*x^2 + (25*o + 33)*x + 25*o diff --git a/test/GenOrd/MaximalOrder.jl b/test/GenOrd/MaximalOrder.jl index 60d71f047e..7d9b9e2c55 100644 --- a/test/GenOrd/MaximalOrder.jl +++ b/test/GenOrd/MaximalOrder.jl @@ -23,7 +23,7 @@ end end @testset "FldFin" begin - for q = [GF(17), GF(next_prime(ZZRingElem(10)^30)), FiniteField(5, 2)[1], FiniteField(next_prime(ZZRingElem(10)^25), 2, "a", cached = false)[1]] + for q = [GF(17), GF(next_prime(ZZRingElem(10)^30)), finite_field(5, 2)[1], finite_field(next_prime(ZZRingElem(10)^25), 2, "a", cached = false)[1]] qt, t = RationalFunctionField(q, "t", cached = false) qtx, x = polynomial_ring(qt, cached = false) f = x^3+(t+1)^5*(x+1)+(t^2+t+1)^7 diff --git a/test/Misc/FiniteField.jl b/test/Misc/FiniteField.jl index c62b4cd57f..806df87728 100644 --- a/test/Misc/FiniteField.jl +++ b/test/Misc/FiniteField.jl @@ -85,7 +85,7 @@ end @testset "fqPolyRepField" begin for p in [31, 11, 101] - F = FiniteField(p, 2)[1] + F = finite_field(p, 2)[1] G, mG = unit_group(F) #Test generator g = mG(G[1]) @@ -127,9 +127,9 @@ end @testset "FqPolyRepField" begin for p in [31, 11, 101] - _ = FiniteField(ZZRingElem(p), 2, "a")[1] - _ = FiniteField(ZZRingElem(p), 2, 'a')[1] - F = FiniteField(ZZRingElem(p), 2, :a)[1] + _ = finite_field(ZZRingElem(p), 2, "a")[1] + _ = finite_field(ZZRingElem(p), 2, 'a')[1] + F = finite_field(ZZRingElem(p), 2, :a)[1] G, mG = unit_group(F) #Test generator g = mG(G[1]) diff --git a/test/Misc/Poly.jl b/test/Misc/Poly.jl index 92d292e38c..85d1b7af8a 100644 --- a/test/Misc/Poly.jl +++ b/test/Misc/Poly.jl @@ -130,7 +130,7 @@ end @testset "Cyclotomic polynomials" begin listp = Hecke.primes_up_to(50) for i in 1:20 - Fp, _ = FiniteField(rand(listp), cached=false) + Fp, _ = finite_field(rand(listp), cached=false) Fpt, _ = polynomial_ring(Fp, "t", cached=false) chi = @inferred cyclotomic_polynomial(rand(1:100), Fpt) @test is_cyclotomic_polynomial(chi) diff --git a/test/Misc/RelFinField.jl b/test/Misc/RelFinField.jl index bc85bfc5e5..01a6d83977 100644 --- a/test/Misc/RelFinField.jl +++ b/test/Misc/RelFinField.jl @@ -1,9 +1,9 @@ @testset "RelFinField" begin @testset "Basic properties" begin - F = Native.FiniteField(3, 3, cached = false)[1] + F = Native.finite_field(3, 3, cached = false)[1] x = polynomial_ring(F, "x", cached = false)[2] - K, gK = @inferred Native.FiniteField(x^2+1, "a") + K, gK = @inferred Native.finite_field(x^2+1, "a") dp = @inferred defining_polynomial(K) @test dp == x^2+1 @test degree(K) == 2 @@ -15,11 +15,11 @@ end @testset "Promote rule" begin - F, gF = Native.FiniteField(3, 3, cached = false) + F, gF = Native.finite_field(3, 3, cached = false) x = polynomial_ring(F, "x", cached = false)[2] - K, gK = Native.FiniteField(x^2+1, "a") + K, gK = Native.finite_field(x^2+1, "a") Kt, t = K["t"] - L, gL = @inferred Native.FiniteField(t^5+t^4+t^2+1, "b") + L, gL = @inferred Native.finite_field(t^5+t^4+t^2+1, "b") dp = @inferred defining_polynomial(L) el = @inferred gL + gK @test parent(el) == L @@ -29,11 +29,11 @@ end @testset "Basic operations" begin - F, gF = Native.FiniteField(3, 3, cached = false) + F, gF = Native.finite_field(3, 3, cached = false) x = polynomial_ring(F, "x", cached = false)[2] - K, gK = Native.FiniteField(x^2+1, "a") + K, gK = Native.finite_field(x^2+1, "a") Kt, t = K["t"] - L, gL = Native.FiniteField(t^5+t^4+t^2+1, "b") + L, gL = Native.finite_field(t^5+t^4+t^2+1, "b") @inferred gL + gL @inferred gL - gL @inferred gL*gL @@ -48,11 +48,11 @@ end @testset "Norm, Trace, Minpoly" begin - F, gF = Native.FiniteField(3, 3, cached = false) + F, gF = Native.finite_field(3, 3, cached = false) x = polynomial_ring(F, "x", cached = false)[2] - K, gK = Native.FiniteField(x^2+1, "a") + K, gK = Native.finite_field(x^2+1, "a") Kt, t = K["t"] - L, gL = Native.FiniteField(t^5+t^4+t^2+1, "b") + L, gL = Native.finite_field(t^5+t^4+t^2+1, "b") el = @inferred absolute_norm(gL) @test isone(el) el1 = @inferred absolute_tr(gL) @@ -69,20 +69,20 @@ y = gen(Rx) @test g(y+1) == y^5+y^4+y^2+1 - f, o = Native.FiniteField(7, 2, "o"); + f, o = Native.finite_field(7, 2, "o"); fx, x = f["x"]; - F, u = Native.FiniteField(x^3 + o + 4, "u"); + F, u = Native.finite_field(x^3 + o + 4, "u"); c = 3*u + 5*o + 1; @test norm(c) == 2*o @test Hecke.norm_via_powering(c) == 2*o end @testset "Absolute basis and coordinates" begin - F, gF = Native.FiniteField(3, 3, cached = false) + F, gF = Native.finite_field(3, 3, cached = false) x = polynomial_ring(F, "x", cached = false)[2] - K, gK = Native.FiniteField(x^2+1, "a") + K, gK = Native.finite_field(x^2+1, "a") Kt, t = K["t"] - L, gL = Native.FiniteField(t^5+t^4+t^2+1, "b") + L, gL = Native.finite_field(t^5+t^4+t^2+1, "b") B = absolute_basis(L) for i = 1:length(B) v = absolute_coordinates(B[i]) @@ -97,19 +97,19 @@ end @testset "Polynomials" begin - F, gF = Native.FiniteField(3, 3, cached = false) + F, gF = Native.finite_field(3, 3, cached = false) x = polynomial_ring(F, "x", cached = false)[2] - K, gK = Native.FiniteField(x^2+1, "a") + K, gK = Native.finite_field(x^2+1, "a") Kt, t = K["t"] - L, gL = Native.FiniteField(t^5+t^4+t^2+1, "b") + L, gL = Native.finite_field(t^5+t^4+t^2+1, "b") Ly, y = L["y"] @test is_irreducible(y^13+2*y+1) end @testset "Random" begin - F, gF = Native.FiniteField(3, 3, cached = false) + F, gF = Native.finite_field(3, 3, cached = false) x = polynomial_ring(F, "x", cached = false)[2] - K, gK = Native.FiniteField(x^2+1, "a") + K, gK = Native.finite_field(x^2+1, "a") a = @inferred rand(K) @test parent(a) === K end diff --git a/test/Misc/meataxe.jl b/test/Misc/meataxe.jl index fe2883b8cc..f1c98b0915 100644 --- a/test/Misc/meataxe.jl +++ b/test/Misc/meataxe.jl @@ -3,8 +3,8 @@ finite_field_functions = [ n -> GF(n), n -> GF(ZZ(n)), - n -> FiniteField(n, 1, "a")[1], - n -> FiniteField(ZZ(n), 1, "a")[1] + n -> finite_field(n, 1, "a")[1], + n -> finite_field(ZZ(n), 1, "a")[1] ] finite_fields = 3 .|> finite_field_functions infinite_fields = [QQ, number_field(ZZPolyRingElem(ZZRingElem[-1,-1,1]))[1]] diff --git a/test/Misc/stable_subgroups.jl b/test/Misc/stable_subgroups.jl index a549ccd26d..d8375a3b37 100644 --- a/test/Misc/stable_subgroups.jl +++ b/test/Misc/stable_subgroups.jl @@ -2,7 +2,7 @@ @testset "Minimal Submodules" begin - F, a = FiniteField(3,1,"a") + F, a = finite_field(3,1,"a") R = residue_ring(FlintZZ,9) V=abelian_group([3,3,9,9]) diff --git a/test/QuadForm/Quad/PadicLift.jl b/test/QuadForm/Quad/PadicLift.jl index 935b15517c..36937d8907 100644 --- a/test/QuadForm/Quad/PadicLift.jl +++ b/test/QuadForm/Quad/PadicLift.jl @@ -15,7 +15,7 @@ @test 4<=Hecke._min_val(error, 3) end - k = Hecke.Native.FiniteField(2)[1] + k = Hecke.Native.finite_field(2)[1] Y = matrix(k, 3, 3, [0,0,1, 0,0,1, 1,1,0]) b = [k(i) for i in [1, 0, 0]] g = [k(i) for i in [0, 1, 0]]