Is_unit and is_nilpotent (with tests) #3904
Annotations
3 errors
Run julia-actions/julia-docdeploy@v1:
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/NCRings.jl:161
[2] is_unit(f::AbstractAlgebra.Generic.Poly{EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}})
@ AbstractAlgebra ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/NCPoly.jl:804
[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:1572
[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/NCRings.jl:161
[2] is_unit(f::AbstractAlgebra.Generic.Poly{EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}})
@ AbstractAlgebra ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/NCPoly.jl:804
[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:1572
[4] valuation(a::AbstractAlgebra.Generic.Poly{EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}}, b::AbstractAlgebra.Generic.Poly{EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}})
@ AbstractAlgebra ~/w
|
Run julia-actions/julia-docdeploy@v1:
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/NCRings.jl:161
[2] is_unit(f::AbstractAlgebra.Generic.Poly{EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}})
@ AbstractAlgebra ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/NCPoly.jl:804
[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:1572
[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/NCRings.jl:161
[2] is_unit(f::AbstractAlgebra.Generic.Poly{EuclideanRingResidueRingElem{AbstractAlgebra.Generic.Poly{Rational{BigInt}}}})
@ AbstractAlgebra ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/NCPoly.jl:804
[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:1572
[4] top-level scope
@ none:1
|
Run julia-actions/julia-docdeploy@v1
Process completed with exit code 1.
|
Loading