diff --git a/Project.toml b/Project.toml index 502fb136e7..56a156eb32 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "Hecke" uuid = "3e1990a7-5d81-5526-99ce-9ba3ff248f21" -version = "0.31.4" +version = "0.31.5" [deps] AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d" @@ -37,7 +37,7 @@ LazyArtifacts = "1.6" Libdl = "1.6" LinearAlgebra = "1.6" Markdown = "1.6" -Nemo = "^0.44.0" +Nemo = "^0.45.0" Pkg = "1.6" Polymake = "0.10, 0.11" Printf = "1.6" diff --git a/src/AlgAss/radical.jl b/src/AlgAss/radical.jl index 79f4079d2b..44650736e8 100644 --- a/src/AlgAss/radical.jl +++ b/src/AlgAss/radical.jl @@ -366,7 +366,7 @@ function _lift!(A::zzModMatrix, B::fpMatrix, Mtemp) end function _lift!(A::zzModMatrix, B::FpMatrix, Mtemp::ZZMatrix) - ccall((:fmpz_mod_mat_get_fmpz_mat, libflint), Cvoid, (Ref{ZZMatrix}, Ref{FpMatrix}), Mtemp, B) + ccall((:fmpz_mod_mat_get_fmpz_mat, libflint), Cvoid, (Ref{ZZMatrix}, Ref{FpMatrix}, Ref{Nemo.fmpz_mod_ctx_struct}), Mtemp, B, base_ring(B).ninv) ccall((:fmpz_mat_get_nmod_mat, libflint), Cvoid, (Ref{zzModMatrix}, Ref{ZZMatrix}), A, Mtemp) return A end diff --git a/src/Hecke.jl b/src/Hecke.jl index f33cfef526..f666abad49 100644 --- a/src/Hecke.jl +++ b/src/Hecke.jl @@ -391,8 +391,11 @@ _get_attributes(G::Map{<:Any, <:Any, HeckeMap, <:Any}) = _get_attributes(G.heade _get_attributes!(G::Map{<:Any, <:Any, HeckeMap, <:Any}) = _get_attributes!(G.header) _is_attribute_storing_type(::Type{Map{<:Any, <:Any, HeckeMap, <:Any}}) = true -import Nemo: libflint, libantic, libarb #to be able to reference libraries by full path - #to avoid calling the "wrong" copy +import Nemo: libflint #to be able to reference libraries by full path + #to avoid calling the "wrong" copy + +const libantic = libflint +const libarb = libflint ################################################################################ # diff --git a/src/Misc/Arb.jl b/src/Misc/Arb.jl index dc8244f3ed..96e623ecd0 100644 --- a/src/Misc/Arb.jl +++ b/src/Misc/Arb.jl @@ -62,7 +62,7 @@ function abs_upper_bound(::Type{ZZRingElem}, x::ArbFieldElem) ccall((:arb_get_abs_ubound_arf, libarb), Nothing, (Ref{arf_struct}, Ref{ArbFieldElem}, Int), tarf, x, 64) - if ccall((:arf_is_nan, Nemo.libarb), Bool, (Ref{arf_struct}, ), tarf) + if ccall((:arf_is_nan, libarb), Bool, (Ref{arf_struct}, ), tarf) throw(Base.InexactError(:abs_upper_bound, x, ZZRingElem)) end diff --git a/src/Misc/FiniteField.jl b/src/Misc/FiniteField.jl index 4a2392d031..ee7e57ee3d 100644 --- a/src/Misc/FiniteField.jl +++ b/src/Misc/FiniteField.jl @@ -4,7 +4,7 @@ function _reduce(a::fqPolyRepFieldElem) if a.length < 2*degree(A) ccall((:fq_nmod_reduce, libflint), Nothing, (Ref{fqPolyRepFieldElem}, Ref{fqPolyRepField}), a, A) else - ccall((:nmod_poly_rem, libflint), Nothing, (Ref{fqPolyRepFieldElem}, Ref{fqPolyRepFieldElem}, Ref{Nothing}, Ref{Nothing}), a, a, pointer_from_objref(A)+6*sizeof(Int) + 2*sizeof(Ptr{Nothing}), pointer_from_objref(A)+sizeof(ZZRingElem)) + ccall((:nmod_poly_rem, libflint), Nothing, (Ref{fqPolyRepFieldElem}, Ref{fqPolyRepFieldElem}, Ref{Nothing}, Ref{Nothing}), a, a, pointer_from_objref(A)+6*sizeof(Int) + sizeof(Ptr{Nothing}), pointer_from_objref(A)+sizeof(ZZRingElem)) end end diff --git a/src/Misc/Matrix.jl b/src/Misc/Matrix.jl index 1822733979..981968021f 100644 --- a/src/Misc/Matrix.jl +++ b/src/Misc/Matrix.jl @@ -982,7 +982,7 @@ function invmod(M::ZZMatrix, d::ZZRingElem) for i = 1:nrows(M) S[i, i+nrows(M)] = 1 end - ccall((:fmpz_mod_mat_howell_form, libflint), Nothing, (Ref{ZZModMatrix}, ), S) + ccall((:fmpz_mod_mat_howell_form, libflint), Nothing, (Ref{ZZModMatrix}, Ref{Nemo.fmpz_mod_ctx_struct}), S, R.ninv) iM = S[1:nrows(M), nrows(M)+1:ncols(S)] #@assert iM*MR == identity_matrix(R, nrows(M)) return lift(iM) diff --git a/src/Misc/Poly.jl b/src/Misc/Poly.jl index e1c0654ea8..395c88e66f 100644 --- a/src/Misc/Poly.jl +++ b/src/Misc/Poly.jl @@ -48,7 +48,7 @@ end function _inv_compose_mod(z::ZZModPolyRingElem) r = reverse(z) - ccall((:fmpz_mod_poly_inv_series_newton, libflint), Nothing, + ccall((:fmpz_mod_poly_inv_series, libflint), Nothing, (Ref{ZZModPolyRingElem}, Ref{ZZModPolyRingElem}, Int, Ref{fmpz_mod_ctx_struct}), r, r, length(r), z.parent.base_ring.ninv) return r end diff --git a/src/ModAlgAss/MeatAxe.jl b/src/ModAlgAss/MeatAxe.jl index af5987699c..90b7ac790b 100644 --- a/src/ModAlgAss/MeatAxe.jl +++ b/src/ModAlgAss/MeatAxe.jl @@ -1176,11 +1176,9 @@ function powermod(f::Zmodn_poly, e::ZZRingElem, g::Zmodn_poly) if fits(Int, e) return powermod(f, Int(e), g) else - _e = BigInt() z = parent(f)() - ccall((:fmpz_get_mpz, libflint), Nothing, (Ref{BigInt}, Ref{ZZRingElem}), _e, e) - ccall((:nmod_poly_powmod_mpz_binexp, libflint), Nothing, - (Ref{Zmodn_poly}, Ref{Zmodn_poly}, Ref{BigInt}, Ref{Zmodn_poly}), + ccall((:nmod_poly_powmod_fmpz_binexp, libflint), Nothing, + (Ref{Zmodn_poly}, Ref{Zmodn_poly}, Ref{ZZRingElem}, Ref{Zmodn_poly}), z, f, e, g) return z end