Hi
I’m attempting to use a library in Julia (grobcov.lib), which expects an ideal of polynomials over a polynomial ring, for example QQ["a", "b"]["x", "y"]
. My problem is how to construct such a ring in Singular. I’ve tried:
julia> R, (a, b) = polynomial_ring(QQ, ["a", "b"])
(Singular polynomial ring (QQ),(a,b),(dp(2),C), spoly{n_Q}[a, b])
julia> S, (x, y) = polynomial_ring(R, ["x", "y"])
(Singular polynomial ring (Coeffs(23)),(x,y),(dp(2),C), spoly{Singular.n_RingElem{spoly{n_Q}}}[x, y])
However, this gives problems, when I try to construct polynomials in this ring:
julia> a*x
ERROR: Unable to coerce polynomial
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] (::PolyRing{Singular.n_RingElem{spoly{n_Q}}})(p::spoly{n_Q})
@ Singular ~/.julia/packages/Singular/N0xXX/src/poly/poly.jl:1562
[3] try_promote
@ ~/.julia/packages/AbstractAlgebra/KwfqS/src/NCRings.jl:43 [inlined]
[4] promote(x::spoly{n_Q}, y::spoly{Singular.n_RingElem{spoly{n_Q}}})
@ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/KwfqS/src/NCRings.jl:50
[5] *(x::spoly{n_Q}, y::spoly{Singular.n_RingElem{spoly{n_Q}}})
@ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/KwfqS/src/NCRings.jl:76
[6] top-level scope
@ REPL[31]:1
Similar error occur if I try to use a MPolyBuildCtx. Note, that I need the resulting ring to be a Singular polynomial ring, since I need to pass it to a Singular Library function, which only accepts Singular rings (see https://oscar-system.github.io/Singular.jl/stable/caller/).
Does anyone know how to get around this problem? Thanks in advance.
Bests, Andreas