Skip to content

Commit

Permalink
Bump compat of AA and Nemo (#1703)
Browse files Browse the repository at this point in the history
* Set version to 0.35.0-DEV

* Bump compat of AA and Nemo

* Replace some more `FlintZZ` usage
  • Loading branch information
lgoettgens authored Dec 15, 2024
1 parent 3627d1f commit e905f2d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
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.34.9"
version = "0.35.0-DEV"

[deps]
AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d"
Expand Down Expand Up @@ -28,7 +28,7 @@ GAPExt = "GAP"
PolymakeExt = "Polymake"

[compat]
AbstractAlgebra = "^0.43.10"
AbstractAlgebra = "^0.44.0"
Dates = "1.6"
Distributed = "1.6"
GAP = "0.9.6, 0.10, 0.11, 0.12"
Expand All @@ -37,7 +37,7 @@ LazyArtifacts = "1.6"
Libdl = "1.6"
LinearAlgebra = "1.6"
Markdown = "1.6"
Nemo = "^0.47.2"
Nemo = "^0.48.0"
Pkg = "1.6"
Polymake = "0.10, 0.11"
Printf = "1.6"
Expand Down
22 changes: 11 additions & 11 deletions src/NumField/NfAbs/MultDep.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function syzygies_sunits_mod_units(A::Vector{AbsSimpleNumFieldElem}; use_ge::Boo
cp = coprime_base(A)
end
sort!(cp, lt = (a,b) -> norm(a) > norm(b))
M = sparse_matrix(FlintZZ)
M = sparse_matrix(ZZ)
for a = A
T = Tuple{Int, ZZRingElem}[]
for i = 1:length(cp)
Expand All @@ -42,7 +42,7 @@ function syzygies_sunits_mod_units(A::Vector{AbsSimpleNumFieldElem}; use_ge::Boo
end
# isone(I) && break
end
push!(M, sparse_row(FlintZZ, T))
push!(M, sparse_row(ZZ, T))
end
h, t = Hecke.hnf_with_transform(matrix(M))
h = h[1:rank(h), :]
Expand Down Expand Up @@ -85,7 +85,7 @@ function *(O1::AbsNumFieldOrder, O2::AbsNumFieldOrder)
b2 = basis(O2, k)
p = [x*y for (x,y) in Base.Iterators.ProductIterator((b1, b2))]
d = reduce(lcm, [denominator(x) for x = p])
M = zero_matrix(FlintZZ, n*n, n)
M = zero_matrix(ZZ, n*n, n)
z = ZZRingElem()
for i = 1:n*n
a = p[i]*d
Expand Down Expand Up @@ -276,7 +276,7 @@ function syzygies_units_mod_tor(A::Vector{FacElem{AbsSimpleNumFieldElem, AbsSimp
@vprint :qAdic 1 "dependent unit found, looking for relation\n"
s = QQFieldElem[]
for x in k[1, :]
@vtime :qAdic 1 y = lift_reco(FlintQQ, x, reco = true)
@vtime :qAdic 1 y = lift_reco(QQ, x, reco = true)
if y === nothing
prec *= 2
@vprint :qAdic 1 "increase prec to ", prec
Expand All @@ -289,7 +289,7 @@ function syzygies_units_mod_tor(A::Vector{FacElem{AbsSimpleNumFieldElem, AbsSimp
continue
end
d = reduce(lcm, map(denominator, s))
gamma = ZZRingElem[FlintZZ(x*d)::ZZRingElem for x = s]
gamma = ZZRingElem[ZZ(x*d)::ZZRingElem for x = s]
@assert reduce(gcd, gamma) == 1 # should be a primitive relation
if !verify_gamma(push!(copy(u), a), gamma, ZZRingElem(p)^prec)
prec *= 2
Expand Down Expand Up @@ -334,15 +334,15 @@ function syzygies_units_mod_tor(A::Vector{FacElem{AbsSimpleNumFieldElem, AbsSimp
=#

for i=1:length(uu)-1
append!(uu[i][2], zeros(FlintZZ, length(uu[end][2])-length(uu[i][2])))
append!(uu[i][2], zeros(ZZ, length(uu[end][2])-length(uu[i][2])))
end
if length(uu) == 0 #all torsion
return [], A
else
U = matrix(FlintZZ, length(uu), length(uu[end][2]), reduce(vcat, [x[2] for x = uu]))
U = matrix(ZZ, length(uu), length(uu[end][2]), reduce(vcat, [x[2] for x = uu]))
U = hcat(U[:, 1:length(u)], U[:, r+1:ncols(U)])
end

U = saturate(U)

_, U = hnf_with_transform(transpose(U))
Expand Down Expand Up @@ -420,7 +420,7 @@ function lift_reco(::QQField, a::PadicFieldElem; reco::Bool = false)
fl, c, d = rational_reconstruction(u, prime(R, N-v))
!fl && return nothing

x = FlintQQ(c, d)
x = QQ(c, d)
if v < 0
return x//prime(R, -v)
else
Expand Down Expand Up @@ -562,7 +562,7 @@ function Hecke.multiplicative_group(A::Vector{AbsSimpleNumFieldElem}; use_ge::Bo
@vprint :qAdic 1 "looking for relation\n"
s = QQFieldElem[]
for x in k[1, :]
@vtime :qAdic 1 y = lift_reco(FlintQQ, x, reco = true)
@vtime :qAdic 1 y = lift_reco(QQ, x, reco = true)
if y === nothing
prec *= 2
@vprint :qAdic 1 "increase prec to ", prec
Expand All @@ -575,7 +575,7 @@ function Hecke.multiplicative_group(A::Vector{AbsSimpleNumFieldElem}; use_ge::Bo
continue
end
d = reduce(lcm, map(denominator, s))
gamma = ZZRingElem[FlintZZ(x*d)::ZZRingElem for x = s]
gamma = ZZRingElem[ZZ(x*d)::ZZRingElem for x = s]
@assert reduce(gcd, gamma) == 1 # should be a primitive relation
if !verify_gamma(push!(copy(g2), a), gamma, prime(base_ring(log_mat), prec))
prec *= 2
Expand Down

0 comments on commit e905f2d

Please sign in to comment.