diff --git a/docs/src/DeveloperDocumentation/caching.md b/docs/src/DeveloperDocumentation/caching.md index 00db05dcb431..220c6344e3d8 100644 --- a/docs/src/DeveloperDocumentation/caching.md +++ b/docs/src/DeveloperDocumentation/caching.md @@ -96,9 +96,9 @@ like `cyclotomic_polynomial` ``` module Globals using Hecke - const Qx, _ = polynomial_ring(FlintQQ, :x, cached = false) - const Zx, _ = polynomial_ring(FlintZZ, :x, cached = false) - const Zxy, _ = polynomial_ring(FlintZZ, [:x, :y], cached = false) + const Qx, _ = polynomial_ring(QQ, :x, cached = false) + const Zx, _ = polynomial_ring(ZZ, :x, cached = false) + const Zxy, _ = polynomial_ring(ZZ, [:x, :y], cached = false) end ``` You can use these in your own code as well, or imitate this pattern if convenient. diff --git a/experimental/QuadFormAndIsom/test/runtests.jl b/experimental/QuadFormAndIsom/test/runtests.jl index 766594875221..26e1ba69a901 100644 --- a/experimental/QuadFormAndIsom/test/runtests.jl +++ b/experimental/QuadFormAndIsom/test/runtests.jl @@ -48,7 +48,7 @@ end @test evaluate(minimal_polynomial(Vf), -1) == 0 @test evaluate(characteristic_polynomial(Vf), 0) == 1 - G = matrix(FlintQQ, 6, 6 ,[3, 1, -1, 1, 0, 0, 1, 3, 1, 1, 1, 1, -1, 1, 3, 0, 0, 1, 1, 1, 0, 4, 2, 2, 0, 1, 0, 2, 4, 2, 0, 1, 1, 2, 2, 4]) + G = matrix(QQ, 6, 6 ,[3, 1, -1, 1, 0, 0, 1, 3, 1, 1, 1, 1, -1, 1, 3, 0, 0, 1, 1, 1, 0, 4, 2, 2, 0, 1, 0, 2, 4, 2, 0, 1, 1, 2, 2, 4]) V = quadratic_space(QQ, G) f = matrix(QQ, 6, 6, [1 0 0 0 0 0; 0 0 -1 0 0 0; -1 1 -1 0 0 0; 0 0 0 1 0 -1; 0 0 0 0 0 -1; 0 0 0 0 1 -1]) Vf = @inferred quadratic_space_with_isometry(V, f) @@ -386,8 +386,8 @@ end @test length(reps) == 1 ## Odd case - B = matrix(FlintQQ, 5, 5 ,[1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]); - G = matrix(FlintQQ, 5, 5 ,[3, 1, 0, 0, 0, 1, 3, 1, 1, -1, 0, 1, 3, 0, 0, 0, 1, 0, 3, 0, 0, -1, 0, 0, 3]); + B = matrix(QQ, 5, 5 ,[1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]); + G = matrix(QQ, 5, 5 ,[3, 1, 0, 0, 0, 1, 3, 1, 1, -1, 0, 1, 3, 0, 0, 0, 1, 0, 3, 0, 0, -1, 0, 0, 3]); L = integer_lattice(B, gram = G); k = lattice_in_same_ambient_space(L, B[2:2, :]) N = orthogonal_submodule(L, k) diff --git a/src/NumberTheory/GaloisGrp/GaloisGrp.jl b/src/NumberTheory/GaloisGrp/GaloisGrp.jl index 8e3ef37c81ac..7b5246099f7e 100644 --- a/src/NumberTheory/GaloisGrp/GaloisGrp.jl +++ b/src/NumberTheory/GaloisGrp/GaloisGrp.jl @@ -579,7 +579,7 @@ end function Nemo.roots_upper_bound(f::ZZMPolyRingElem, t::Int = 0) @assert nvars(parent(f)) == 2 - Qs, s = rational_function_field(FlintQQ, "t", cached = false) + Qs, s = rational_function_field(QQ, "t", cached = false) Qsx, x = polynomial_ring(Qs, cached = false) F = evaluate(f, [x, Qsx(s)]) dis = numerator(discriminant(F)) diff --git a/src/NumberTheory/GaloisGrp/Qt.jl b/src/NumberTheory/GaloisGrp/Qt.jl index 2b69cc4c8ef9..ad9791b87fba 100644 --- a/src/NumberTheory/GaloisGrp/Qt.jl +++ b/src/NumberTheory/GaloisGrp/Qt.jl @@ -88,7 +88,7 @@ for analysis of the denominator and the infinite valuations function _galois_init(F::Generic.FunctionField{QQFieldElem}; tStart::Int = -1) f = defining_polynomial(F) @assert is_monic(f) - Zxy, (x, y) = polynomial_ring(FlintZZ, 2, cached = false) + Zxy, (x, y) = polynomial_ring(ZZ, 2, cached = false) ff = Zxy() d = lcm(map(denominator, coefficients(f))) df = f*d @@ -101,7 +101,7 @@ function _galois_init(F::Generic.FunctionField{QQFieldElem}; tStart::Int = -1) for i=0:degree(f) c = coeff(df, i) if !iszero(c) - ff += map_coefficients(FlintZZ, numerator(c))(y)*x^i + ff += map_coefficients(ZZ, numerator(c))(y)*x^i end end _subfields(F, ff, tStart = tStart) diff --git a/src/NumberTheory/NmbThy.jl b/src/NumberTheory/NmbThy.jl index 7f8921b85823..2cffd1ff3d00 100644 --- a/src/NumberTheory/NmbThy.jl +++ b/src/NumberTheory/NmbThy.jl @@ -89,7 +89,7 @@ function norm_equation_fac_elem(R::AbsNumFieldOrder, k::ZZRingElem; abs::Bool = S = Tuple{Vector{Tuple{Hecke.ideal_type(R), Int}}, Vector{ZZMatrix}}[] for (p, k) = lp.fac P = prime_decomposition(R, p) - s = solve_non_negative(matrix(FlintZZ, 1, length(P), [degree(x[1]) for x = P]), matrix(FlintZZ, 1, 1, [k])) + s = solve_non_negative(matrix(ZZ, 1, length(P), [degree(x[1]) for x = P]), matrix(ZZ, 1, 1, [k])) push!(S, (P, ZZMatrix[view(s, i:i, 1:ncols(s)) for i=1:nrows(s)])) end sol = FacElem{AbsSimpleNumFieldElem, AbsSimpleNumField}[] @@ -144,10 +144,10 @@ function norm_equation_fac_elem(R::Hecke.RelNumFieldOrder{AbsSimpleNumFieldElem, q, mms = snf(q) mq = mq*inv(mms) - C = vcat([matrix(FlintZZ, 1, ngens(q), [valuation(mS(preimage(mq, q[i])), p) for i=1:ngens(q)]) for p = keys(lp)]) + C = vcat([matrix(ZZ, 1, ngens(q), [valuation(mS(preimage(mq, q[i])), p) for i=1:ngens(q)]) for p = keys(lp)]) - A = vcat([matrix(FlintZZ, 1, ngens(q), [valuation(norm(mkK, mS(preimage(mq, g))), p) for g in gens(q)]) for p = keys(la)]) - b = matrix(FlintZZ, length(la), 1, [valuation(a, p) for p = keys(la)]) + A = vcat([matrix(ZZ, 1, ngens(q), [valuation(norm(mkK, mS(preimage(mq, g))), p) for g in gens(q)]) for p = keys(la)]) + b = matrix(ZZ, length(la), 1, [valuation(a, p) for p = keys(la)]) so = solve_mixed(A, b, C) u, mu = Hecke.unit_group_fac_elem(parent(a)) @@ -189,16 +189,16 @@ function is_irreducible(a::AbsNumFieldOrderElem{AbsSimpleNumField,AbsSimpleNumFi # if this is possible, then a is not irreducible as a # is then ms(Ax) * ms(Ay) and neither is trivial. - I = identity_matrix(FlintZZ, length(S)) + I = identity_matrix(ZZ, length(S)) A = hcat(I, I) #so A*(x|y) = x+y = sol is the 1. condition C = cat(V, V, dims=(1,2)) # C(x|y) >=0 iff Cx >=0 and Cy >=0 #Cx <> 0 iff (1,..1)*Cx >= 1 - one = matrix(FlintZZ, 1, length(S), [1 for p = S]) - zer = matrix(FlintZZ, 1, length(S), [0 for p = S]) + one = matrix(ZZ, 1, length(S), [1 for p = S]) + zer = matrix(ZZ, 1, length(S), [0 for p = S]) C = vcat(C, hcat(one, zer), hcat(zer, one)) - d = matrix(FlintZZ, 2*length(S)+2, 1, [0 for i = 1:2*length(S) + 2]) + d = matrix(ZZ, 2*length(S)+2, 1, [0 for i = 1:2*length(S) + 2]) d[end-1, 1] = 1 d[end, 1] = 1 pt = solve_mixed(A, sol, C, d) diff --git a/src/PolyhedralGeometry/solving_integrally.jl b/src/PolyhedralGeometry/solving_integrally.jl index 7818e280a53e..4659cf58a221 100644 --- a/src/PolyhedralGeometry/solving_integrally.jl +++ b/src/PolyhedralGeometry/solving_integrally.jl @@ -49,11 +49,11 @@ Note that the output can be permuted, hence we sort it. ```jldoctest julia> A = ZZMatrix([1 1]); -julia> b = zero_matrix(FlintZZ, 1,1); b[1,1]=7; +julia> b = zero_matrix(ZZ, 1,1); b[1,1]=7; julia> C = ZZMatrix([1 0; 0 1]); -julia> d = zero_matrix(FlintZZ,2,1); d[1,1]=2; d[2,1]=3; +julia> d = zero_matrix(ZZ,2,1); d[1,1]=2; d[2,1]=3; julia> sortslices(Matrix{BigInt}(solve_mixed(A, b, C, d)), dims=1) 3×2 Matrix{BigInt}: @@ -101,7 +101,7 @@ Note that the output can be permuted, hence we sort it. ```jldoctest julia> A = ZZMatrix([1 1]); -julia> b = zero_matrix(FlintZZ, 1,1); b[1,1]=3; +julia> b = zero_matrix(ZZ, 1,1); b[1,1]=3; julia> C = ZZMatrix([1 0; 0 1]); @@ -131,9 +131,9 @@ julia> for x in it """ solve_mixed( as::Type{T}, A::ZZMatrix, b::ZZMatrix, C::ZZMatrix; permit_unbounded=false -) where {T} = solve_mixed(T, A, b, C, zero_matrix(FlintZZ, nrows(C), 1); permit_unbounded) +) where {T} = solve_mixed(T, A, b, C, zero_matrix(ZZ, nrows(C), 1); permit_unbounded) solve_mixed(A::ZZMatrix, b::ZZMatrix, C::ZZMatrix; permit_unbounded=false) = - solve_mixed(ZZMatrix, A, b, C, zero_matrix(FlintZZ, nrows(C), 1); permit_unbounded) + solve_mixed(ZZMatrix, A, b, C, zero_matrix(ZZ, nrows(C), 1); permit_unbounded) @doc raw""" solve_ineq(as::Type{T}, A::ZZMatrix, b::ZZMatrix) where {T} @@ -151,7 +151,7 @@ Note that the output can be permuted, hence we sort it. ```jldoctest julia> A = ZZMatrix([1 0; 0 1; -1 0; 0 -1]); -julia> b = zero_matrix(FlintZZ, 4,1); b[1,1]=1; b[2,1]=1; b[3,1]=0; b[4,1]=0; +julia> b = zero_matrix(ZZ, 4,1); b[1,1]=1; b[2,1]=1; b[3,1]=0; b[4,1]=0; julia> sortslices(Matrix{BigInt}(solve_ineq(A, b)), dims=1) 4×2 Matrix{BigInt}: @@ -173,8 +173,8 @@ SubObjectIterator{PointVector{ZZRingElem}} solve_ineq(as::Type{T}, A::ZZMatrix, b::ZZMatrix; permit_unbounded=false) where {T} = solve_mixed( T, - zero_matrix(FlintZZ, 0, ncols(A)), - zero_matrix(FlintZZ, 0, 1), + zero_matrix(ZZ, 0, ncols(A)), + zero_matrix(ZZ, 0, 1), -A, -b; permit_unbounded, @@ -198,7 +198,7 @@ Note that the output can be permuted, hence we sort it. ```jldoctest julia> A = ZZMatrix([1 1]); -julia> b = zero_matrix(FlintZZ, 1,1); b[1,1]=3; +julia> b = zero_matrix(ZZ, 1,1); b[1,1]=3; julia> sortslices(Matrix{BigInt}(solve_non_negative(A, b)), dims=1) 4×2 Matrix{BigInt}: @@ -219,6 +219,6 @@ SubObjectIterator{PointVector{ZZRingElem}} """ solve_non_negative( as::Type{T}, A::ZZMatrix, b::ZZMatrix; permit_unbounded=false -) where {T} = solve_mixed(T, A, b, identity_matrix(FlintZZ, ncols(A)); permit_unbounded) +) where {T} = solve_mixed(T, A, b, identity_matrix(ZZ, ncols(A)); permit_unbounded) solve_non_negative(A::ZZMatrix, b::ZZMatrix; permit_unbounded=false) = solve_non_negative(ZZMatrix, A, b; permit_unbounded) diff --git a/src/Rings/NumberField.jl b/src/Rings/NumberField.jl index 4f3e651d85ef..85a3e0c8549f 100644 --- a/src/Rings/NumberField.jl +++ b/src/Rings/NumberField.jl @@ -138,7 +138,7 @@ parent(a::NfNSGenElem) = a.parent Hecke.data(a::NfNSGenElem) = a.f -base_field(K::NfNSGen{QQFieldElem, QQMPolyRingElem}) = FlintQQ +base_field(K::NfNSGen{QQFieldElem, QQMPolyRingElem}) = QQ base_field(K::NfNSGen) = base_ring(polynomial_ring(K)) @@ -616,7 +616,7 @@ end function basis_matrix(v::Vector{NfNSGenElem{QQFieldElem, QQMPolyRingElem}}, ::Type{Hecke.FakeFmpqMat}) d = degree(parent(v[1])) - z = zero_matrix(FlintQQ, length(v), d) + z = zero_matrix(QQ, length(v), d) for i in 1:length(v) elem_to_mat_row!(z, i, v[i]) end diff --git a/src/Rings/binomial_ideals.jl b/src/Rings/binomial_ideals.jl index c9dd600ef8eb..1cfa6e0d0bfb 100644 --- a/src/Rings/binomial_ideals.jl +++ b/src/Rings/binomial_ideals.jl @@ -393,7 +393,7 @@ function (Chi::PartialCharacter)(b::ZZMatrix) end function (Chi::PartialCharacter)(b::Vector{ZZRingElem}) - return Chi(matrix(FlintZZ, 1, length(b), b)) + return Chi(matrix(ZZ, 1, length(b), b)) end function have_same_domain(P::PartialCharacter, Q::PartialCharacter) @@ -482,7 +482,7 @@ function ideal_from_character(P::PartialCharacter, R::MPolyRing) @assert ncols(P.A) == nvars(R) #test if the domain of the partial character is the zero lattice - if isone(nrows(P.A)) && have_same_span(P.A, zero_matrix(FlintZZ, 1, ncols(P.A))) + if isone(nrows(P.A)) && have_same_span(P.A, zero_matrix(ZZ, 1, ncols(P.A))) return ideal(R, zero(R)) end @@ -582,7 +582,7 @@ function partial_character_from_ideal(I::MPolyIdeal, R::MPolyRing) Delta = cell[2] #cell variables if isempty(Delta) - return partial_character(zero_matrix(FlintZZ, 1, nvars(R)), [one(QQAb)], Set{Int64}()) + return partial_character(zero_matrix(ZZ, 1, nvars(R)), [one(QQAb)], Set{Int64}()) end #now consider the case where Delta is not empty @@ -598,12 +598,12 @@ function partial_character_from_ideal(I::MPolyIdeal, R::MPolyRing) end QQAbcl, = abelian_closure(QQ) if iszero(J) - return partial_character(zero_matrix(FlintZZ, 1, nvars(R)), [one(QQAbcl)], Set{Int64}()) + return partial_character(zero_matrix(ZZ, 1, nvars(R)), [one(QQAbcl)], Set{Int64}()) end #now case if J \neq 0 #let ts be a list of minimal binomial generators for J gb = groebner_basis(J, complete_reduction = true) - vs = zero_matrix(FlintZZ, 0, nvars(R)) + vs = zero_matrix(ZZ, 0, nvars(R)) images = QQAbFieldElem{AbsSimpleNumFieldElem}[] for t in gb #TODO: Once tail will be available, use it. @@ -612,7 +612,7 @@ function partial_character_from_ideal(I::MPolyIdeal, R::MPolyRing) u = exponent_vector(lm, 1) v = exponent_vector(tl, 1) #now test if we need the vector uv - uv = matrix(FlintZZ, 1, nvars(R), Int[u[j]-v[j] for j =1:length(u)]) #this is the vector of u-v + uv = matrix(ZZ, 1, nvars(R), Int[u[j]-v[j] for j =1:length(u)]) #this is the vector of u-v #TODO: It can be done better by saving the hnf... if !can_solve(vs, uv, side = :left)[1] push!(images, -QQAbcl(AbstractAlgebra.leading_coefficient(tl))) @@ -1162,7 +1162,7 @@ function birth_death_ideal(m::Int, n::Int) R = Matrix{QQMPolyRingElem}(undef, m, n+1) D = Matrix{QQMPolyRingElem}(undef, m+1, m) L = Matrix{QQMPolyRingElem}(undef, m+1, n+1) - Qxy, gQxy = polynomial_ring(FlintQQ, length(U)+length(R)+length(D)+length(L); cached = false) + Qxy, gQxy = polynomial_ring(QQ, length(U)+length(R)+length(D)+length(L); cached = false) pols = Vector{elem_type(Qxy)}(undef, 4*n*m) ind = 1 for i = 1:m+1 diff --git a/src/Rings/hilbert.jl b/src/Rings/hilbert.jl index 26acdd148b69..cce1b152d364 100644 --- a/src/Rings/hilbert.jl +++ b/src/Rings/hilbert.jl @@ -934,9 +934,9 @@ end # # Transpose while converting: # ncols = length(W); # nrows = length(W[1]); -# A = zero_matrix(FlintZZ, nrows,ncols); +# A = zero_matrix(ZZ, nrows,ncols); # for i in 1:nrows for j in 1:ncols A[i,j] = W[j][i]; end; end; -# b = zero_matrix(FlintZZ, nrows,1); +# b = zero_matrix(ZZ, nrows,1); # try # solve_non_negative(A, b); # any non-zero soln gives rise to infinitely many, which triggers an exception # catch e diff --git a/src/Rings/mpoly-graded.jl b/src/Rings/mpoly-graded.jl index a6a2ffcd5cad..c6ed7d739a1a 100644 --- a/src/Rings/mpoly-graded.jl +++ b/src/Rings/mpoly-graded.jl @@ -1239,7 +1239,7 @@ function monomial_basis(W::MPolyDecRing, d::FinGenAbGroupElem) k, im = kernel(h) #need the positive elements in there... #Ax = b, Cx >= 0 - C = identity_matrix(FlintZZ, ngens(W)) + C = identity_matrix(ZZ, ngens(W)) A = reduce(vcat, [x.coeff for x = W.d]) k = solve_mixed(transpose(A), transpose(d.coeff), C) for ee = 1:nrows(k) diff --git a/test/AlgebraicGeometry/Surfaces/K3Auto.jl b/test/AlgebraicGeometry/Surfaces/K3Auto.jl index 0e637c52ff02..035c3f2ecee2 100644 --- a/test/AlgebraicGeometry/Surfaces/K3Auto.jl +++ b/test/AlgebraicGeometry/Surfaces/K3Auto.jl @@ -1,6 +1,6 @@ @testset "elliptic fibrations" begin - B = matrix(FlintQQ, 16, 16 ,[2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3//2, 1//2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1//2, 3//2, 3//2, 1//2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1//2, 3//2, 0, 1//2, 1//2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1//2, 1//2, 1//2, 0, 1//2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1//2, 1, 1//2, 0, 1//2, 0, 0, 1//2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1//2, 0, 1//2, 0, 3//5, 1//10]); - G = matrix(FlintQQ, 16, 16 ,[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -170]); NS = integer_lattice(B, gram = G); V = ambient_space(NS) f = QQFieldElem[2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] @@ -23,12 +23,12 @@ end @testset "walls of chamber" begin S = integer_lattice(gram=QQ[-2 1 0 0; 1 -2 1 1; 0 1 -2 1; 0 1 1 -2]) # fix an embedding - B = matrix(FlintQQ, 10, 10 ,[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1//3, 2//3, 1//3, 2//3, 2//3, 2//3, 1//3, 1//3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]); - G = matrix(FlintQQ, 10, 10 ,[-2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, -2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, -2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, -1, 1, -1, -1, -1, 0, 0, 0, 0, -1, -2, 1, -1, 0, -1, 0, 0, 0, 0, 1, 1, -2, 0, 0, 1, 0, 0, 0, 0, -1, -1, 0, -2, -1, -1, 0, 0, 0, 0, -1, 0, 0, -1, -2, -1, 0, 0, 0, 0, -1, -1, 1, -1, -1, -2]); + B = matrix(QQ, 10, 10 ,[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1//3, 2//3, 1//3, 2//3, 2//3, 2//3, 1//3, 1//3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]); + G = matrix(QQ, 10, 10 ,[-2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, -2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, -2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, -1, 1, -1, -1, -1, 0, 0, 0, 0, -1, -2, 1, -1, 0, -1, 0, 0, 0, 0, 1, 1, -2, 0, 0, 1, 0, 0, 0, 0, -1, -1, 0, -2, -1, -1, 0, 0, 0, 0, -1, 0, 0, -1, -2, -1, 0, 0, 0, 0, -1, -1, 1, -1, -1, -2]); L = integer_lattice(B, gram = G); - B = matrix(FlintQQ, 4, 10 ,[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0]); - G = matrix(FlintQQ, 10, 10 ,[-2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, -2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, -2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, -1, 1, -1, -1, -1, 0, 0, 0, 0, -1, -2, 1, -1, 0, -1, 0, 0, 0, 0, 1, 1, -2, 0, 0, 1, 0, 0, 0, 0, -1, -1, 0, -2, -1, -1, 0, 0, 0, 0, -1, 0, 0, -1, -2, -1, 0, 0, 0, 0, -1, -1, 1, -1, -1, -2]); + B = matrix(QQ, 4, 10 ,[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0]); + G = matrix(QQ, 10, 10 ,[-2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, -2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, -2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, -1, 1, -1, -1, -1, 0, 0, 0, 0, -1, -2, 1, -1, 0, -1, 0, 0, 0, 0, 1, 1, -2, 0, 0, 1, 0, 0, 0, 0, -1, -1, 0, -2, -1, -1, 0, 0, 0, 0, -1, 0, 0, -1, -2, -1, 0, 0, 0, 0, -1, -1, 1, -1, -1, -2]); S = integer_lattice(B, gram = G); weyl = QQ[31 61 52 71 5 -6 5 -2 -7 8] @@ -171,11 +171,11 @@ end end @testset "weyl_vector_non_degenerate" begin - B = matrix(FlintQQ, 10, 10 ,[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0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, 0, 0, -1, 0, 0, -1, -2, -1, 0, 0, 0, 0, -1, -1, 1, -1, -1, -2]); L = integer_lattice(B, gram = G); - B = matrix(FlintQQ, 4, 10 ,[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0]); - G = matrix(FlintQQ, 10, 10 ,[-2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, -2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, -2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, -1, 1, -1, -1, -1, 0, 0, 0, 0, -1, -2, 1, -1, 0, -1, 0, 0, 0, 0, 1, 1, -2, 0, 0, 1, 0, 0, 0, 0, -1, -1, 0, -2, -1, -1, 0, 0, 0, 0, -1, 0, 0, -1, -2, -1, 0, 0, 0, 0, -1, -1, 1, -1, -1, -2]); + B = matrix(QQ, 4, 10 ,[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0]); + G = matrix(QQ, 10, 10 ,[-2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, -2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, -2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, -1, 1, -1, -1, -1, 0, 0, 0, 0, -1, -2, 1, -1, 0, -1, 0, 0, 0, 0, 1, 1, -2, 0, 0, 1, 0, 0, 0, 0, -1, -1, 0, -2, -1, -1, 0, 0, 0, 0, -1, 0, 0, -1, -2, -1, 0, 0, 0, 0, -1, -1, 1, -1, -1, -2]); S = integer_lattice(B, gram = G); u = QQ[90 157 218//3 346//3 -7//3 13//3 16//3 -11//3 -1//3 32//3] weyl = QQ[90 157 218//3 346//3 -7//3 13//3 16//3 -11//3 -1//3 32//3] diff --git a/test/Groups/matrixgroups.jl b/test/Groups/matrixgroups.jl index 5cc046652da0..61ca115ce1c7 100644 --- a/test/Groups/matrixgroups.jl +++ b/test/Groups/matrixgroups.jl @@ -752,7 +752,7 @@ end # L = lattice(q, QQ[0 0; 0 0], isbasis=false) # @test order(isometry_group(L)) == 1 - Qx, x = polynomial_ring(FlintQQ, :x, cached = false) + Qx, x = polynomial_ring(QQ, :x, cached = false) f = x^2-2; K, a = number_field(f) D = matrix(K, 3, 3, [2, 0, 0, 0, 1, 0, 0, 0, 7436]); diff --git a/test/PolyhedralGeometry/solve_integrally.jl b/test/PolyhedralGeometry/solve_integrally.jl index b4acc42344e2..a592f39ae6e4 100644 --- a/test/PolyhedralGeometry/solve_integrally.jl +++ b/test/PolyhedralGeometry/solve_integrally.jl @@ -1,10 +1,10 @@ @testset "solve_integrally" begin @testset "solve_mixed" begin A = ZZMatrix([1 1]) - b = zero_matrix(FlintZZ, 1, 1) + b = zero_matrix(ZZ, 1, 1) b[1, 1] = 7 C = ZZMatrix([1 0; 0 1]) - d = zero_matrix(FlintZZ, 2, 1) + d = zero_matrix(ZZ, 2, 1) d[1, 1] = 2 d[2, 1] = 3 S0 = solve_mixed(A, b, C, d) @@ -30,7 +30,7 @@ @testset "solve_ineq" begin A = ZZMatrix([1 0; 0 1; -1 0; 0 -1]) - b = zero_matrix(FlintZZ, 4, 1) + b = zero_matrix(ZZ, 4, 1) b[1, 1] = 1 b[2, 1] = 1 b[3, 1] = 0 @@ -48,7 +48,7 @@ @testset "solve_non_negative" begin A = ZZMatrix([1 1]) - b = zero_matrix(FlintZZ, 1, 1) + b = zero_matrix(ZZ, 1, 1) b[1, 1] = 3 S0 = solve_non_negative(A, b) S1 = solve_non_negative(ZZMatrix, A, b) diff --git a/test/Rings/NumberField.jl b/test/Rings/NumberField.jl index 6776c019aa79..9beb6682e3c2 100644 --- a/test/Rings/NumberField.jl +++ b/test/Rings/NumberField.jl @@ -1,14 +1,14 @@ @testset "Number field" begin - Qx, x = FlintQQ[:x] + Qx, x = QQ[:x] k, _ = number_field(x^2 + 1) ku, u = k[:u1, :u2] Ik = ideal(ku, [u[1]^3 + u[2]^3 - 3, u[1]^5 + u[2]^5 - 5]) - Qy, y = FlintQQ[:y1, :y2] + Qy, y = QQ[:y1, :y2] IQ = ideal(Qy, [y[1]^3 + y[2]^3 - 3, y[1]^5 + y[2]^5 - 5]) - for (Bk, Pk, I) in [(k, ku, Ik), (FlintQQ, Qy, IQ)] + for (Bk, Pk, I) in [(k, ku, Ik), (QQ, Qy, IQ)] gg = gens(Pk) @test_throws ErrorException number_field(ideal([gg[1]])) K, = @inferred number_field(I, [:a1, :a2]) @@ -180,7 +180,7 @@ end # denominator - if Bk === FlintQQ + if Bk === QQ b = rand(K, -2:2) d = @inferred denominator(b) @test d isa ZZRingElem @@ -203,7 +203,7 @@ end # basis matrix - if Bk == FlintQQ + if Bk == QQ for i in 1:10 BB = [rand(K, -2:2) for j in 1:rand(1:10)] M = @inferred basis_matrix(BB, Hecke.FakeFmpqMat) @@ -226,7 +226,7 @@ @test b * B[n] == sum(M[n, m] * B[m] for m in 1:length(B)) end - if Bk == FlintQQ + if Bk == QQ M, d = @inferred representation_matrix_q(b) @test nrows(M) == degree(K) @test ncols(M) == degree(K) @@ -243,7 +243,7 @@ c = rand(-10:10) end b = b//c - MM = zero_matrix(FlintZZ, nrows(M), ncols(M)) + MM = zero_matrix(ZZ, nrows(M), ncols(M)) dd = ZZRingElem() j = rand(1:nrows(MM)) Oscar.Hecke.elem_to_mat_row!(MM, j, dd, b) @@ -318,7 +318,7 @@ end # simple extension - if Bk == FlintQQ + if Bk == QQ Ks, KstoK = simple_extension(K, simplify = true) else Ks, KstoK = simple_extension(K) @@ -332,7 +332,7 @@ @test KstoK(b + c) == KstoK(b) + KstoK(c) @test KstoK(b * c) == KstoK(b) * KstoK(c) - if Bk == FlintQQ + if Bk == QQ @test KstoK\(KstoK(b)) == b b = rand(K, -10:10) c = rand(K, -10:10) diff --git a/test/Rings/binomial-ideals.jl b/test/Rings/binomial-ideals.jl index 12390df54231..15aeca65fc6f 100644 --- a/test/Rings/binomial-ideals.jl +++ b/test/Rings/binomial-ideals.jl @@ -6,7 +6,7 @@ @test is_binomial(f) J = ideal(R, [x^2-y^3, z^2]) @test is_binomial(J) - Qxy, (x, y, z, t) = polynomial_ring(FlintQQ, 4) + Qxy, (x, y, z, t) = polynomial_ring(QQ, 4) I = ideal(elem_type(Qxy)[x*y, z*t^2-t^3, z^2-y^2]) @test Oscar.is_binomial(I) @test Oscar.is_unital(I) @@ -24,7 +24,7 @@ @test is_cellular(I)[1] I = ideal(R, [x[1]*x[4]^2-x[2]*x[5]^2, x[1]^3*x[3]^3-x[2]^4*x[4]^2, x[2]*x[4]^8-x[3]^3*x[5]^6]) @test !is_cellular(I)[1] - Qxy, (x, y, z, t) = polynomial_ring(FlintQQ, 4) + Qxy, (x, y, z, t) = polynomial_ring(QQ, 4) I = ideal(elem_type(Qxy)[x*y, z*t^2-t^3, z^2-y^2]) @test !Oscar.is_cellular(I)[1] lI = Oscar.cellular_decomposition(I) @@ -44,7 +44,7 @@ end @testset "Binomial primary decomposition" begin - Qxy, (x, y, z, t) = polynomial_ring(FlintQQ, 4) + Qxy, (x, y, z, t) = polynomial_ring(QQ, 4) I = ideal(elem_type(Qxy)[x*y, z*t^2-t^3, z^2-y^2]) lP = Oscar.binomial_primary_decomposition(I)