Consider this:
julia> Singular.QQ(5) == 5
true
julia> Singular.QQ(5) == Nemo.ZZ(5)
true
julia> Singular.QQ(5) == Nemo.QQ(5)
false
Ooops!
The latter is of course quite bad and misleading. The cause is a problematic fallback in AbstractAlgbebra:
function ==(x::NCRingElem, y::NCRingElem)
fl, u, v = try_promote(x, y)
if fl
return u == v
else
return false
end
end
We should address that there (and indeed, we tried that last year and it fizzled out, but we probably should get back to that. See Nemocas/AbstractAlgebra.jl#1853, Nemocas/AbstractAlgebra.jl#1854, Nemocas/AbstractAlgebra.jl#1873)
But of course in the meantime, we also should add suitable comparison methods in Singular.jl
CC @fieker @hannes14