diff --git a/Project.toml b/Project.toml index 6005da0b02..789ff57296 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "Hecke" uuid = "3e1990a7-5d81-5526-99ce-9ba3ff248f21" -version = "0.22.9" +version = "0.23.0-DEV" [deps] AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d" @@ -28,7 +28,7 @@ GAPExt = "GAP" PolymakeExt = "Polymake" [compat] -AbstractAlgebra = "^0.33.0" +AbstractAlgebra = "^0.34.1" Dates = "1.6" Distributed = "1.6" GAP = "0.9.6, 0.10" @@ -37,7 +37,7 @@ LazyArtifacts = "1.6" Libdl = "1.6" LinearAlgebra = "1.6" Markdown = "1.6" -Nemo = "^0.37.4" +Nemo = "^0.38.1" Pkg = "1.6" Polymake = "0.10, 0.11" Printf = "1.6" diff --git a/docs/src/quad_forms/basics.md b/docs/src/quad_forms/basics.md index 4cd5cef002..de5501d752 100644 --- a/docs/src/quad_forms/basics.md +++ b/docs/src/quad_forms/basics.md @@ -21,7 +21,7 @@ following spaces for the rest of this section: ```@repl 2 using Hecke # hide -K, a = CyclotomicRealSubfield(7); +K, a = cyclotomic_real_subfield(7); Kt, t = K["t"]; E, b = number_field(t^2-a*t+1, "b"); Q = quadratic_space(K, K[0 1; 1 0]) @@ -59,7 +59,7 @@ space $H$: ```@repl 2 using Hecke # hide -K, a = CyclotomicRealSubfield(7); +K, a = cyclotomic_real_subfield(7); Kt, t = K["t"]; E, b = number_field(t^2-a*t+1, "b"); H = hermitian_space(E, 3); @@ -96,7 +96,7 @@ Note that the `is_hermitian` function tests whether the space is non-quadratic. ```@repl 2 using Hecke # hide -K, a = CyclotomicRealSubfield(7); +K, a = cyclotomic_real_subfield(7); Kt, t = K["t"]; E, b = number_field(t^2-a*t+1, "b"); Q = quadratic_space(K, K[0 1; 1 0]); @@ -123,7 +123,7 @@ restrict_scalars(::AbstractSpace, ::QQField, ::FieldElem) ```@repl 2 using Hecke # hide -K, a = CyclotomicRealSubfield(7); +K, a = cyclotomic_real_subfield(7); Kt, t = K["t"]; E, b = number_field(t^2-a*t+1, "b"); Q = quadratic_space(K, K[0 1; 1 0]); @@ -160,7 +160,7 @@ of $O_K$ above $7$, one can get: ```@repl 2 using Hecke # hide -K, a = CyclotomicRealSubfield(7); +K, a = cyclotomic_real_subfield(7); Q = quadratic_space(K, K[0 1; 1 0]); OK = maximal_order(K); p = prime_decomposition(OK, 7)[1][1]; @@ -196,7 +196,7 @@ embed respectively locally or globally into $Q$ or $H$: ```@repl 2 using Hecke # hide -K, a = CyclotomicRealSubfield(7); +K, a = cyclotomic_real_subfield(7); Kt, t = K["t"]; E, b = number_field(t^2-a*t+1, "b"); Q = quadratic_space(K, K[0 1; 1 0]); @@ -247,7 +247,7 @@ orthogonal_projection(::AbstractSpace, ::MatElem) ```@repl 2 using Hecke # hide -K, a = CyclotomicRealSubfield(7); +K, a = cyclotomic_real_subfield(7); Kt, t = K["t"]; Q = quadratic_space(K, K[0 1; 1 0]); orthogonal_complement(Q, matrix(K, 1, 2, [1 0])) @@ -268,7 +268,7 @@ is_isotropic(::AbstractSpace, p) ```@repl 2 using Hecke # hide -K, a = CyclotomicRealSubfield(7); +K, a = cyclotomic_real_subfield(7); Kt, t = K["t"]; E, b = number_field(t^2-a*t+1, "b"); H = hermitian_space(E, 3); @@ -295,7 +295,7 @@ is_locally_hyperbolic(::HermSpace, ::NfOrdIdl) ```@repl 2 using Hecke # hide -K, a = CyclotomicRealSubfield(7); +K, a = cyclotomic_real_subfield(7); Kt, t = K["t"]; E, b = number_field(t^2-a*t+1, "b"); H = hermitian_space(E, 3); diff --git a/docs/src/quad_forms/genusherm.md b/docs/src/quad_forms/genusherm.md index 9055d7b7ad..63f9bc448a 100644 --- a/docs/src/quad_forms/genusherm.md +++ b/docs/src/quad_forms/genusherm.md @@ -473,7 +473,7 @@ hermitian_genera(::Hecke.NfRel, ::Int, ::Dict{InfPlc, Int}, ::Union{Hecke.NfRelO ```@repl 2 using Hecke # hide -K, a = CyclotomicRealSubfield(8, "a"); +K, a = cyclotomic_real_subfield(8, "a"); Kt, t = K["t"]; E, b = number_field(t^2 - a * t + 1); p = prime_decomposition(maximal_order(K), 2)[1][1]; diff --git a/src/LargeField/misc2.jl b/src/LargeField/misc2.jl index c04fbc128f..a4efee0fd4 100644 --- a/src/LargeField/misc2.jl +++ b/src/LargeField/misc2.jl @@ -388,7 +388,7 @@ end #= Qx,x = polynomial_ring(FlintQQ, "a") -K, a = CyclotomicRealSubfield(1024, "a"); +K, a = cyclotomic_real_subfield(1024, "a"); @time fb_int = Hecke.int_fb_max_real(1024, 2^20); h = Hecke.auto_of_maximal_real(K, 3); b = [K(1), a] @@ -398,7 +398,7 @@ fb_int = FactorBase(ZZRingElem[x for x = vcat(fb_int[1], fb_int[2], fb_int[3])]) @time Hecke.basis_rels_5(b, 600, 10, 5, fb_int) Qx,x = polynomial_ring(FlintQQ, "a") -K, a = CyclotomicRealSubfield(512, "a"); +K, a = cyclotomic_real_subfield(512, "a"); @time fb_int = Hecke.int_fb_max_real(512, 2^18); h = Hecke.auto_of_maximal_real(K, 3); b = [K(1), a] diff --git a/src/Misc/Poly.jl b/src/Misc/Poly.jl index 355b5b7f1a..1f937ddbd6 100644 --- a/src/Misc/Poly.jl +++ b/src/Misc/Poly.jl @@ -418,7 +418,7 @@ function n_positive_roots(f::ZZPolyRingElem; multiplicities::Bool = false) if !multiplicities ffp = derivative(ff) g = gcd(ff, ffp) - if isconstant(g) + if is_constant(g) return _n_positive_roots_sf(f) else return n_positive_roots(divexact(ff, g))::Int @@ -446,7 +446,7 @@ function _n_positive_roots_sf(f::ZZPolyRingElem) # Here a = 0 _, f = remove(f, gen(parent(f))) - if isconstant(f) + if is_constant(f) # f = x^n * a, so no positive root return 0 end @@ -465,7 +465,7 @@ function n_real_roots(f::ZZPolyRingElem) ff = Hecke.Globals.Qx(f) ffp = derivative(ff) g = gcd(ff, ffp) - if isconstant(g) + if is_constant(g) return _n_real_roots_sf(f) else return n_real_roots(divexact(ff, g))::Int diff --git a/src/NumField/NfAbs/Cyclotomic.jl b/src/NumField/NfAbs/Cyclotomic.jl index e30b64a522..2fe7fea55a 100644 --- a/src/NumField/NfAbs/Cyclotomic.jl +++ b/src/NumField/NfAbs/Cyclotomic.jl @@ -10,7 +10,7 @@ conductor, return a generating set for the cyclotomic units of $K$. # Examples ```jldoctest -julia> K, a = CyclotomicRealSubfield(7); +julia> K, a = cyclotomic_real_subfield(7); julia> cyclotomic_units_totally_real(K) 3-element Vector{nf_elem}: @@ -150,7 +150,7 @@ function cyclotomic_regulator(n::Int, prec::Int; maximal_totally_real::Bool = fa # If we only care about regulators, this is not a problem, as we # just have to scale appropriately. if is_prime(n) - K, = CyclotomicRealSubfield(n, cached = false) + K, = cyclotomic_real_subfield(n, cached = false) if degree(K) == 1 return regulator(nf_elem[], prec) end @@ -163,7 +163,7 @@ function cyclotomic_regulator(n::Int, prec::Int; maximal_totally_real::Bool = fa end else @assert is_prime_power(n) - K, = CyclotomicRealSubfield(n, cached = false) + K, = cyclotomic_real_subfield(n, cached = false) cyc = _cyclotomic_units_totally_real_prime_power_conductor(K, n, true) # cyc is in K(zeta_n) reg = regulator(cyc[2:end], prec) diff --git a/src/NumField/NfRel/NfRel.jl b/src/NumField/NfRel/NfRel.jl index 1e32782053..9e0c294d7d 100644 --- a/src/NumField/NfRel/NfRel.jl +++ b/src/NumField/NfRel/NfRel.jl @@ -915,7 +915,7 @@ Number field with defining polynomial $ - 1 ``` """ function cyclotomic_field_as_cm_extension(n::Int; cached::Bool = true) - K, a = CyclotomicRealSubfield(n, Symbol("(z_$n + 1//z_$n)"), cached = cached) + K, a = cyclotomic_real_subfield(n, Symbol("(z_$n + 1//z_$n)"), cached = cached) Kt, t = polynomial_ring(K, "t", cached = false) E, b = number_field(t^2-a*t+1, "z_$n", cached = cached) set_attribute!(E, :cyclo, n) diff --git a/test/NfOrd/LinearAlgebra.jl b/test/NfOrd/LinearAlgebra.jl index 5d1b3b7ea7..4a3fd7f41b 100644 --- a/test/NfOrd/LinearAlgebra.jl +++ b/test/NfOrd/LinearAlgebra.jl @@ -179,7 +179,7 @@ @test Hecke._spans_subset_of_pseudohnf(pm, pm, :lowerleft) # issue 1112 - K, a = CyclotomicRealSubfield(8, "a"); + K, a = cyclotomic_real_subfield(8, "a"); Kt, t = K["t"]; E, b = number_field(t^2 - a * t + 1, "b"); V = hermitian_space(E, gram_matrix(root_lattice(:E, 8))); diff --git a/test/NumField/Hilbert.jl b/test/NumField/Hilbert.jl index 84b10c5183..bb5607256f 100644 --- a/test/NumField/Hilbert.jl +++ b/test/NumField/Hilbert.jl @@ -36,7 +36,7 @@ @test quadratic_defect(QQ(1//9),ZZ(3)) == PosInf() # Test where Magma div(x, y) differs from julia div(x, y) (internally) - K, a = CyclotomicRealSubfield(8, "a") # x^2 - 2 + K, a = cyclotomic_real_subfield(8, "a") # x^2 - 2 z = 9278908160780559301//4*a+6561375391013480455//2 w = K(-2) p = prime_decomposition(maximal_order(K), 2)[1][1] diff --git a/test/NumField/NfAbs/Cyclotomic.jl b/test/NumField/NfAbs/Cyclotomic.jl index 93c49fb9f7..5fbd897dcd 100644 --- a/test/NumField/NfAbs/Cyclotomic.jl +++ b/test/NumField/NfAbs/Cyclotomic.jl @@ -1,11 +1,11 @@ @testset "Cyclotomic" begin for q in [7, 7^2, 2^2, 2^3, 2^4] - K, a = CyclotomicRealSubfield(q) + K, a = cyclotomic_real_subfield(q) v = cyclotomic_units_totally_real(K) @test length(v) == degree(K) # = unit rank + 1 end - K, a = CyclotomicRealSubfield(7) + K, a = cyclotomic_real_subfield(7) v = cyclotomic_units_totally_real(K) # Class number of Q(zeta_7)^+ is one, so the cyclotomic units are the units @test overlaps(regulator(maximal_order(K)), regulator(v[2:end])) diff --git a/test/QuadForm/Herm/Genus.jl b/test/QuadForm/Herm/Genus.jl index 31b5d2761d..1a99d8b99b 100644 --- a/test/QuadForm/Herm/Genus.jl +++ b/test/QuadForm/Herm/Genus.jl @@ -421,7 +421,7 @@ # ############################################################################# - K, a = CyclotomicRealSubfield(8, "a") + K, a = cyclotomic_real_subfield(8, "a") Kt, t = polynomial_ring(K, "t") L, b = number_field(t^2 - a * t + 1) @@ -461,7 +461,7 @@ @test (@inferred representative(G[i])) in G[i] end - K, a = CyclotomicRealSubfield(8, "a") + K, a = cyclotomic_real_subfield(8, "a") Kt, t = K["t"] L, b = number_field(t^2 - a * t + 1) p = prime_decomposition(maximal_order(K), 2)[1][1] @@ -486,7 +486,7 @@ @test all(x -> x in Gs, myG) @test all(x -> x in myG, Gs) - K, a = CyclotomicRealSubfield(8, "a") + K, a = cyclotomic_real_subfield(8, "a") Kt, t = K["t"] L, b = number_field(t^2 - a * t + 1) rlp = real_places(K) diff --git a/test/QuadForm/Lattices.jl b/test/QuadForm/Lattices.jl index 3e0145eb0c..90216feb5c 100644 --- a/test/QuadForm/Lattices.jl +++ b/test/QuadForm/Lattices.jl @@ -110,7 +110,7 @@ M = @inferred Hecke.maximal_integral_lattice(V) @test Hecke.genus(M, p) == genus(HermLat, L, p, [(-2, 2, 1, 0), (0, 1, 1, 0)]) - K, a = CyclotomicRealSubfield(8, "a") + K, a = cyclotomic_real_subfield(8, "a") Kt, t = K["t"] E, b = number_field(t^2 - a * t + 1, "b") p = prime_decomposition(maximal_order(K), 2)[1][1] @@ -148,7 +148,7 @@ L = Hecke._to_number_field_lattice(E8) @test L == dual(L) - K, a = CyclotomicRealSubfield(8, "a") + K, a = cyclotomic_real_subfield(8, "a") Kt, t = K["t"] E, b = number_field(t^2 - a * t + 1, "b") V = hermitian_space(E, gram_matrix(root_lattice(:E, 8)))