Skip to content

Commit

Permalink
Update to AA 0.34, Nemo 0.38
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Nov 23, 2023
1 parent 42f9f17 commit 25c12c4
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ lib4ti2_jll = "1493ae25-0f90-5c0e-a06c-8c5077d6d66f"
libsingular_julia_jll = "ae4fbd8f-ecdb-54f8-bbce-35570499b30e"

[compat]
AbstractAlgebra = "0.33"
AbstractAlgebra = "0.34"
BinaryWrappers = "~0.1.1"
CxxWrap = "0.14"
Libdl = "1.6"
LinearAlgebra = "1.6"
Nemo = "0.33.0, 0.34.0, 0.35.0, 0.36.0, 0.37.0"
Nemo = "0.38"
Pidfile = "1.3"
Pkg = "1.6"
Random = "1.6"
Expand Down
2 changes: 1 addition & 1 deletion src/MessyHacks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ let zero_parameter_types = [
AbstractAlgebra.Generic.LaurentSeriesRing =>
AbstractAlgebra.Generic.LaurentSeriesRingElem,
AbstractAlgebra.Generic.FracField =>
AbstractAlgebra.Generic.Frac
AbstractAlgebra.Generic.FracFieldElem
]

for (A, B) in zero_parameter_types
Expand Down
2 changes: 1 addition & 1 deletion src/number/n_GF.jl
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ desired behaviour, one can pass `false` for the optional `cached` parameter.
"""
function FiniteField(p::Int, n::Int, S::VarName; cached=true)
p >= 2^8 && throw(DomainError(p, "p must be < 256"))
!Nemo.isprime(Nemo.ZZRingElem(p)) && throw(DomainError(p, "p must be prime"))
!Nemo.is_prime(Nemo.ZZRingElem(p)) && throw(DomainError(p, "p must be prime"))
(n*log(p) >= 20*log(2) || p^n >= 2^16) &&
throw(DomainError("p^n must be < 2^16"))
par = N_GField(p, n, Symbol(S), cached)
Expand Down
2 changes: 1 addition & 1 deletion src/number/n_Zp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ function Fp(a::Int; cached=true)
a == 0 && throw(DivideError(a))
a < 0 && throw(DomainError(a, "prime must be positive"))
a > 2^29 && throw(DomainError(a, "prime must be <= 2^29"))
!Nemo.isprime(Nemo.ZZRingElem(a)) && throw(DomainError(a, "characteristic must be prime"))
!Nemo.is_prime(Nemo.ZZRingElem(a)) && throw(DomainError(a, "characteristic must be prime"))

return N_ZpField(a, cached)
end
Expand Down
16 changes: 8 additions & 8 deletions test/libsingular/nemo-test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ end
end

@testset "Nemo.fqPolyRepFieldElem" begin
F, _ = Nemo.FiniteField(Nemo.next_prime(fld(typemax(Int),2)), 2, "a")
F, _ = Nemo.finite_field(Nemo.next_prime(fld(typemax(Int),2)), 2, "a")
R, _ = polynomial_ring(F, ["x", "y"])
@test R isa Singular.PolyRing{Singular.n_FieldElem{Nemo.fqPolyRepFieldElem}}

F, a = Nemo.FiniteField(7, 2, "a")
F, a = Nemo.finite_field(7, 2, "a")

R, (x, y) = polynomial_ring(F, ["x", "y"])

Expand Down Expand Up @@ -162,11 +162,11 @@ end
end

@testset "Nemo.FqPolyRepFieldElem" begin
F, _ = Nemo.FiniteField(Nemo.next_prime(Nemo.ZZ(10)^50), 2, "a")
F, _ = Nemo.finite_field(Nemo.next_prime(Nemo.ZZ(10)^50), 2, "a")
R, _ = polynomial_ring(F, ["x", "y"])
@test R isa Singular.PolyRing{Singular.n_FieldElem{Nemo.FqPolyRepFieldElem}}

F, a = Nemo.FiniteField(Nemo.ZZ(7), 2, "a")
F, a = Nemo.finite_field(Nemo.ZZ(7), 2, "a")

R, (x, y) = polynomial_ring(F, ["x", "y"])

Expand Down Expand Up @@ -443,8 +443,8 @@ end
f3 = x^2 + 2x + 1

f1c = [c for c in coefficients(f1)]
@test f1c[1] isa Singular.n_FieldElem{AbstractAlgebra.Generic.Frac{Nemo.ZZRingElem}}
@test U(f1c[1]) isa AbstractAlgebra.Generic.Frac{Nemo.ZZRingElem}
@test f1c[1] isa Singular.n_FieldElem{AbstractAlgebra.Generic.FracFieldElem{Nemo.ZZRingElem}}
@test U(f1c[1]) isa AbstractAlgebra.Generic.FracFieldElem{Nemo.ZZRingElem}
@test !isempty(string(f1c[1]))
@test leading_coefficient(f1) == f1c[1]
@test f1 + 2 == 2 + f1
Expand Down Expand Up @@ -478,8 +478,8 @@ end
f3 = x^2 + 2x + 1

f1c = [c for c in coefficients(f1)]
@test f1c[1] isa Singular.n_FieldElem{AbstractAlgebra.Generic.Frac{Nemo.ZZRingElem}}
@test U(f1c[1]) isa AbstractAlgebra.Generic.Frac{Nemo.ZZRingElem}
@test f1c[1] isa Singular.n_FieldElem{AbstractAlgebra.Generic.FracFieldElem{Nemo.ZZRingElem}}
@test U(f1c[1]) isa AbstractAlgebra.Generic.FracFieldElem{Nemo.ZZRingElem}
@test !isempty(string(f1c[1]))
@test leading_coefficient(f1) == f1c[1]
@test f1 + 2 == 2 + f1
Expand Down

0 comments on commit 25c12c4

Please sign in to comment.