Skip to content

Is_unit and is_nilpotent (with tests) #3898

Is_unit and is_nilpotent (with tests)

Is_unit and is_nilpotent (with tests) #3898

Triggered via pull request December 18, 2024 11:25
Status Failure
Total duration 16m 30s
Artifacts

CI.yml

on: pull_request
Matrix: test
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 1 notice
test (1.10, macOS-latest)
Process completed with exit code 1.
test (1.10, ubuntu-latest)
Process completed with exit code 1.
test (1.6, ubuntu-latest)
Process completed with exit code 1.
test (nightly, ubuntu-latest)
Process completed with exit code 1.
test (1.10, windows-latest)
Process completed with exit code 1.
test (1.11, ubuntu-latest)
Process completed with exit code 1.
Documentation: docs/src/ncpolynomial.md#L205
doctest failure in src/ncpolynomial.md:205-248 ```jldoctest julia> R = matrix_ring(ZZ, 2) Matrix ring of degree 2 over integers julia> S, x = polynomial_ring(R, :x) (Univariate polynomial ring in x over matrix ring, x) julia> T, y = polynomial_ring(S, :y) (Univariate polynomial ring in y over S, y) julia> a = zero(T) 0 julia> b = one(T) 1 julia> c = BigInt(1)*y^2 + BigInt(1) y^2 + 1 julia> d = x*y^2 + (x + 1)*y + 3 x*y^2 + (x + 1)*y + [3 0; 0 3] julia> f = leading_coefficient(d) x julia> y = gen(T) y julia> g = is_gen(y) true julia> m = is_unit(b) true julia> n = degree(d) 2 julia> is_term(2y^2) true julia> is_monomial(y^2) true ``` Subexpression: m = is_unit(b) Evaluated output: ERROR: MethodError: no method matching is_domain_type(::Type{AbstractAlgebra.Generic.NCPoly{AbstractAlgebra.Generic.MatRingElem{BigInt}}}) Closest candidates are: is_domain_type(!Matched::Type{AbstractAlgebra.Generic.SparsePoly{T}}) where T<:RingElement @ AbstractAlgebra ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/generic/SparsePoly.jl:17 is_domain_type(!Matched::Type{AbstractAlgebra.GFElem{T}}) where T<:Integer @ AbstractAlgebra ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/julia/GF.jl:25 is_domain_type(!Matched::Type{T}) where T<:AbstractAlgebra.ResFieldElem @ AbstractAlgebra ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/ResidueField.jl:19 ... Stacktrace: [1] is_unit(f::AbstractAlgebra.Generic.NCPoly{AbstractAlgebra.Generic.NCPoly{AbstractAlgebra.Generic.MatRingElem{BigInt}}}) @ AbstractAlgebra ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/NCPoly.jl:800 [2] top-level scope @ none:1 Expected output: true diff = Warning: Diff output requires color. trueERROR: MethodError: no method matching is_domain_type(::Type{AbstractAlgebra.Generic.NCPoly{AbstractAlgebra.Generic.MatRingElem{BigInt}}}) Closest candidates are: is_domain_type(!Matched::Type{AbstractAlgebra.Generic.SparsePoly{T}}) where T<:RingElement @ AbstractAlgebra ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/generic/SparsePoly.jl:17 is_domain_type(!Matched::Type{AbstractAlgebra.GFElem{T}}) where T<:Integer @ AbstractAlgebra ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/julia/GF.jl:25 is_domain_type(!Matched::Type{T}) where T<:AbstractAlgebra.ResFieldElem @ AbstractAlgebra ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/ResidueField.jl:19 ... Stacktrace: [1] is_unit(f::AbstractAlgebra.Generic.NCPoly{AbstractAlgebra.Generic.NCPoly{AbstractAlgebra.Generic.MatRingElem{BigInt}}}) @ AbstractAlgebra ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/NCPoly.jl:800 [2] top-level scope @ none:1
Documentation: docs/src/polynomial.md#L282
doctest failure in src/polynomial.md:282-338 ```jldoctest julia> R, x = polynomial_ring(QQ, :x) (Univariate polynomial ring in x over rationals, x) julia> S, = residue_ring(R, x^3 + 3x + 1); julia> T, y = polynomial_ring(S, :y) (Univariate polynomial ring in y over S, y) julia> f = (3*x^2 + x + 2)*y + x^2 + 1 (3*x^2 + x + 2)*y + x^2 + 1 julia> g = (5*x^2 + 2*x + 1)*y^2 + 2x*y + x + 1 (5*x^2 + 2*x + 1)*y^2 + 2*x*y + x + 1 julia> h = (3*x^3 + 2*x^2 + x + 7)*y^5 + 2x*y + 1 (2*x^2 - 8*x + 4)*y^5 + 2*x*y + 1 julia> invmod(f, g) (707//3530*x^2 + 2151//1765*x + 123//3530)*y - 178//1765*x^2 - 551//3530*x + 698//1765 julia> mulmod(f, g, h) (-30*x^2 - 43*x - 9)*y^3 + (-7*x^2 - 23*x - 7)*y^2 + (4*x^2 - 10*x - 3)*y + x^2 - 2*x julia> powermod(f, 3, h) (69*x^2 + 243*x + 79)*y^3 + (78*x^2 + 180*x + 63)*y^2 + (27*x^2 + 42*x + 18)*y + 3*x^2 + 3*x + 2 julia> h = mod(f, g) (3*x^2 + x + 2)*y + x^2 + 1 julia> q, r = divrem(f, g) (0, (3*x^2 + x + 2)*y + x^2 + 1) julia> div(g, f) (-5//11*x^2 + 2//11*x + 6//11)*y - 13//121*x^2 - 3//11*x - 78//121 julia> d = gcd(f*h, g*h) y + 1//11*x^2 + 6//11 julia> k = gcdinv(f, h) (y + 1//11*x^2 + 6//11, 0) julia> m = lcm(f, h) (-14*x^2 - 23*x - 2)*y - 4*x^2 - 5*x + 1 julia> flag, q = divides(g^2, g) (true, (5*x^2 + 2*x + 1)*y^2 + 2*x*y + x + 1) julia> valuation(3g^3, g) == 3 true julia> val, q = remove(5g^3, g) (3, 5) julia> r, s, t = gcdx(g, h) (1, 311//3530*x^2 - 2419//3530*x + 947//1765, (707//3530*x^2 + 2151//1765*x + 123//3530)*y - 178//1765*x^2 - 551//3530*x + 698//1765) ``` Subexpression: valuation(3g^3, g) == 3 Evaluated output: ERROR: function is_nilpotent is not implemented for argument EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}: 2*x Stacktrace: [1] is_nilpotent(a::EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}) @ AbstractAlgebra ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/Rings.jl:108 [2] is_unit(f::AbstractAlgebra.Generic.Poly{EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}}) @ AbstractAlgebra ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/Poly.jl:242 [3] remove(z::AbstractAlgebra.Generic.Poly{EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}}, p::AbstractAlgebra.Generic.Poly{EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}}) @ AbstractAlgebra ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/Poly.jl:1604 [4] valuation(a::AbstractAlgebra.Generic.Poly{EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}}, b::AbstractAlgebra.Generic.Poly{EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}}) @ AbstractAlgebra ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/algorithms/GenericFunctions.jl:192 [5] top-level scope @ none:1 Expected output: true diff = Warning: Diff output requires color. trueERROR: function is_nilpotent is not implemented for argument EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}: 2*x Stacktrace: [1] is_nilpotent(a::EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}) @ AbstractAlgebra ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/Rings.jl:108 [2] is_unit(f::AbstractAlgebra.Generic.Poly{EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}}) @ AbstractAlgebra ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/Poly.jl:242 [3] remove(z::AbstractAlgebra.Generic.Poly{EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}}, p::AbstractAlgebra.Generic.Poly{EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}}) @ AbstractAlgebra ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/Poly.jl:1604 [4] valuation(a::AbstractAlgebra.Generic.Poly{EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}}, b::AbstractAlgebra.Generic.Poly{EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}}) @ AbstractAlgebra ~/work/Abst
Documentation: docs/src/polynomial.md#L282
doctest failure in src/polynomial.md:282-338 ```jldoctest julia> R, x = polynomial_ring(QQ, :x) (Univariate polynomial ring in x over rationals, x) julia> S, = residue_ring(R, x^3 + 3x + 1); julia> T, y = polynomial_ring(S, :y) (Univariate polynomial ring in y over S, y) julia> f = (3*x^2 + x + 2)*y + x^2 + 1 (3*x^2 + x + 2)*y + x^2 + 1 julia> g = (5*x^2 + 2*x + 1)*y^2 + 2x*y + x + 1 (5*x^2 + 2*x + 1)*y^2 + 2*x*y + x + 1 julia> h = (3*x^3 + 2*x^2 + x + 7)*y^5 + 2x*y + 1 (2*x^2 - 8*x + 4)*y^5 + 2*x*y + 1 julia> invmod(f, g) (707//3530*x^2 + 2151//1765*x + 123//3530)*y - 178//1765*x^2 - 551//3530*x + 698//1765 julia> mulmod(f, g, h) (-30*x^2 - 43*x - 9)*y^3 + (-7*x^2 - 23*x - 7)*y^2 + (4*x^2 - 10*x - 3)*y + x^2 - 2*x julia> powermod(f, 3, h) (69*x^2 + 243*x + 79)*y^3 + (78*x^2 + 180*x + 63)*y^2 + (27*x^2 + 42*x + 18)*y + 3*x^2 + 3*x + 2 julia> h = mod(f, g) (3*x^2 + x + 2)*y + x^2 + 1 julia> q, r = divrem(f, g) (0, (3*x^2 + x + 2)*y + x^2 + 1) julia> div(g, f) (-5//11*x^2 + 2//11*x + 6//11)*y - 13//121*x^2 - 3//11*x - 78//121 julia> d = gcd(f*h, g*h) y + 1//11*x^2 + 6//11 julia> k = gcdinv(f, h) (y + 1//11*x^2 + 6//11, 0) julia> m = lcm(f, h) (-14*x^2 - 23*x - 2)*y - 4*x^2 - 5*x + 1 julia> flag, q = divides(g^2, g) (true, (5*x^2 + 2*x + 1)*y^2 + 2*x*y + x + 1) julia> valuation(3g^3, g) == 3 true julia> val, q = remove(5g^3, g) (3, 5) julia> r, s, t = gcdx(g, h) (1, 311//3530*x^2 - 2419//3530*x + 947//1765, (707//3530*x^2 + 2151//1765*x + 123//3530)*y - 178//1765*x^2 - 551//3530*x + 698//1765) ``` Subexpression: val, q = remove(5g^3, g) Evaluated output: ERROR: function is_nilpotent is not implemented for argument EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}: 2*x Stacktrace: [1] is_nilpotent(a::EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}) @ AbstractAlgebra ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/Rings.jl:108 [2] is_unit(f::AbstractAlgebra.Generic.Poly{EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}}) @ AbstractAlgebra ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/Poly.jl:242 [3] remove(z::AbstractAlgebra.Generic.Poly{EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}}, p::AbstractAlgebra.Generic.Poly{EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}}) @ AbstractAlgebra ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/Poly.jl:1604 [4] top-level scope @ none:1 Expected output: (3, 5) diff = Warning: Diff output requires color. (3, 5)ERROR: function is_nilpotent is not implemented for argument EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}: 2*x Stacktrace: [1] is_nilpotent(a::EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}) @ AbstractAlgebra ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/Rings.jl:108 [2] is_unit(f::AbstractAlgebra.Generic.Poly{EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}}) @ AbstractAlgebra ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/Poly.jl:242 [3] remove(z::AbstractAlgebra.Generic.Poly{EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}}, p::AbstractAlgebra.Generic.Poly{EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}}) @ AbstractAlgebra ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/Poly.jl:1604 [4] top-level scope @ none:1
Documentation
Process completed with exit code 1.
test (1.6, ubuntu-latest)
[setup-julia] If you are testing 1.6 as a Long Term Support (lts) version, consider using the new "lts" version specifier instead of "1.6" explicitly, which will automatically resolve the current lts.