My Durham Workshop group (@sfitz01,@DanielGreenTripp,@mlodyjesienin) are working on some deformation-theoretic computations, and we noticed that we were unable to work over the coefficient ring QQ[ε]/(ε^2):
Code to reproduce the error:
S,ε = polynomial_ring(QQ,"ε")
S,pi = quo(S,ε^2)
R,(x1,x2,x3) = S["x1","x2","x3"]
intersect(ideal([-ε*x1*x2 + x1*x3 - x2*x3 + x3^2]),ideal([x1^2*x2*x3 - x1*x2^2*x3 + x1*x2*x3^2]))
The error:
julia> intersect(ideal([-ε*x1*x2 + x1*x3 - x2*x3 + x3^2]),ideal([x1^2*x2*x3 - x1*x2^2*x3 + x1*x2*x3^2]))
ERROR: function divrem is not implemented for arguments
EuclideanRingResidueRingElem{QQPolyRingElem}: ε
EuclideanRingResidueRingElem{QQPolyRingElem}: -ε
Stacktrace:
[1] divrem(a::EuclideanRingResidueRingElem{QQPolyRingElem}, b::EuclideanRingResidueRingElem{QQPolyRingElem})
@ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/AqzuZ/src/algorithms/GenericFunctions.jl:50
[2] divrem(a::EuclideanRingResidueRingElem{QQPolyRingElem}, b::EuclideanRingResidueRingElem{QQPolyRingElem})
@ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/AqzuZ/src/AbstractAlgebra.jl:65
[3] gcdx(a::EuclideanRingResidueRingElem{QQPolyRingElem}, b::EuclideanRingResidueRingElem{QQPolyRingElem})
@ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/AqzuZ/src/algorithms/GenericFunctions.jl:306
[4] nemoRingExtGcd(a::Ptr{Nothing}, b::Ptr{Nothing}, s::Ptr{Ptr{Nothing}}, t::Ptr{Ptr{Nothing}}, cf::Ptr{Nothing})
@ Singular.libSingular ~/.julia/packages/Singular/JyB5B/src/libsingular/nemo/Rings.jl:200
[5] id_Intersection
@ ~/.julia/packages/CxxWrap/eWADG/src/CxxWrap.jl:668 [inlined]
[6] intersection(I::Singular.sideal{Singular.spoly{…}}, J::Singular.sideal{Singular.spoly{…}})
@ Singular ~/.julia/packages/Singular/JyB5B/src/ideal/ideal.jl:508
[7] intersect(I::MPolyIdeal{AbstractAlgebra.Generic.MPoly{…}}, Js::MPolyIdeal{AbstractAlgebra.Generic.MPoly{…}})
@ Oscar ~/.julia/dev/Oscar/src/Rings/mpoly-ideals.jl:217
[8] top-level scope
@ REPL[265]:1
Some type information was truncated. Use `show(err)` to see complete types.
edit: Here another example that fails from #4201
R,(x1,x2) = polynomial_ring(QQ,["x1","x2"])
x1//2 == x1/2 # true
phi = hom(R,R,c->c,gens(R))
phi(x1//2) # does not work
phi(x1/2) # works
The error:
julia> R,(x1,x2) = polynomial_ring(QQ,["x1","x2"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x1, x2])
julia> x1//2 == x1/2
true
julia> phi = hom(R,R,c->c,gens(R))
Ring homomorphism
from multivariate polynomial ring in 2 variables over QQ
to multivariate polynomial ring in 2 variables over QQ
defined by
x1 -> x1
x2 -> x2
with map on coefficients
#41
julia> phi(x1//2) # does not work
ERROR: MethodError: no method matching (::QQMPolyRing)(::AbstractAlgebra.Generic.FracFieldElem{QQMPolyRingElem})
Closest candidates are:
(::QQMPolyRing)(::Vector{QQFieldElem}, ::Vector{Vector{Int64}})
@ Nemo ~/.julia/packages/Nemo/pX5Oz/src/flint/fmpq_mpoly.jl:1236
(::QQMPolyRing)(::Vector{Any}, ::Array{Vector{T}, 1}) where T
@ Nemo ~/.julia/packages/Nemo/pX5Oz/src/flint/fmpq_mpoly.jl:1248
(::QQMPolyRing)(::Vector{QQFieldElem}, ::Array{Vector{T}, 1}) where T<:Union{UInt64, ZZRingElem}
@ Nemo ~/.julia/packages/Nemo/pX5Oz/src/flint/fmpq_mpoly.jl:1224
...
Stacktrace:
[1] (::Oscar.MPolyAnyMap{…})(g::AbstractAlgebra.Generic.FracFieldElem{…})
@ Oscar ~/.julia/dev/Oscar/src/Rings/MPolyMap/MPolyRing.jl:179
[2] top-level scope
@ REPL[156]:1
Some type information was truncated. Use `show(err)` to see complete types.
julia> phi(x1/2) # works
1//2*x1
My Durham Workshop group (@sfitz01,@DanielGreenTripp,@mlodyjesienin) are working on some deformation-theoretic computations, and we noticed that we were unable to work over the coefficient ring
QQ[ε]/(ε^2):Code to reproduce the error:
The error:
edit: Here another example that fails from #4201
The error: