Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to latest AA, Nemo #1294

Merged
merged 1 commit into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -28,7 +28,7 @@ GAPExt = "GAP"
PolymakeExt = "Polymake"

[compat]
AbstractAlgebra = "^0.33.0"
AbstractAlgebra = "^0.34.4"
Dates = "1.6"
Distributed = "1.6"
GAP = "0.9.6, 0.10"
Expand All @@ -37,7 +37,7 @@ LazyArtifacts = "1.6"
Libdl = "1.6"
LinearAlgebra = "1.6"
Markdown = "1.6"
Nemo = "^0.37.4"
Nemo = "^0.38.2"
Pkg = "1.6"
Polymake = "0.10, 0.11"
Printf = "1.6"
Expand Down
18 changes: 9 additions & 9 deletions docs/src/quad_forms/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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]);
Expand All @@ -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]);
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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]);
Expand Down Expand Up @@ -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]))
Expand All @@ -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);
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion docs/src/quad_forms/genusherm.md
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
4 changes: 2 additions & 2 deletions src/LargeField/misc2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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]
Expand Down
6 changes: 3 additions & 3 deletions src/Misc/Poly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/NumField/NfAbs/Cyclotomic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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}:
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/NumField/NfRel/NfRel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/NfOrd/LinearAlgebra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
Expand Down
2 changes: 1 addition & 1 deletion test/NumField/Hilbert.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions test/NumField/NfAbs/Cyclotomic.jl
Original file line number Diff line number Diff line change
@@ -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]))
Expand Down
6 changes: 3 additions & 3 deletions test/QuadForm/Herm/Genus.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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]
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions test/QuadForm/Lattices.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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)))
Expand Down
Loading