oscar-system / Oscar.jl

A comprehensive open source computer algebra system for computations in algebra, geometry, and number theory.
https://www.oscar-system.org
Other
342 stars 125 forks source link

Ideal membership seems broken #3034

Closed HechtiDerLachs closed 10 months ago

HechtiDerLachs commented 10 months ago

Try this

kk = GF(29)
S, x = graded_polynomial_ring(kk, 3)
I = ideal(S, elem_type(S)[])
x[1] in I

I get

ERROR: MethodError: no method matching (::Singular.N_ZpField)(::fpFieldElem)
Closest candidates are:
  (::Singular.N_ZpField)() at ~/.julia/packages/Singular/JuGcU/src/number/n_Zp.jl:291
  (::Ring)(::Singular.n_RingElem{Singular.RingElemWrapper{S, T}}) where {S, T} at ~/.julia/packages/Singular/JuGcU/src/number/n_unknown.jl:379
  (::Field)(::Singular.n_FieldElem{Singular.FieldElemWrapper{S, T}}) where {S, T} at ~/.julia/packages/Singular/JuGcU/src/number/n_unknown.jl:387
  ...
Stacktrace:
 [1] (::Singular.PolyRing{Singular.n_Zp})(f::MPolyDecRingElem{fpFieldElem, fpMPolyRingElem})
   @ Singular ~/.julia/packages/Singular/JuGcU/src/poly/poly.jl:1548
 [2] macro expansion
   @ ./show.jl:1047 [inlined]
 [3] ideal_membership(f::MPolyDecRingElem{fpFieldElem, fpMPolyRingElem}, I::MPolyIdeal{MPolyDecRingElem{fpFieldElem, fpMPolyRingElem}}; ordering::MonomialOrdering{MPolyDecRing{fpFieldElem, fpMPolyRing}})
   @ Oscar ~/Kaiserslautern/neuer_Oscar_Klon/Oscar.jl/src/Rings/mpoly-ideals.jl:1062
 [4] ideal_membership(f::MPolyDecRingElem{fpFieldElem, fpMPolyRingElem}, I::MPolyIdeal{MPolyDecRingElem{fpFieldElem, fpMPolyRingElem}})
   @ Oscar ~/Kaiserslautern/neuer_Oscar_Klon/Oscar.jl/src/Rings/mpoly-ideals.jl:1057
 [5] in(f::MPolyDecRingElem{fpFieldElem, fpMPolyRingElem}, I::MPolyIdeal{MPolyDecRingElem{fpFieldElem, fpMPolyRingElem}})
   @ Oscar ~/Kaiserslautern/neuer_Oscar_Klon/Oscar.jl/src/Rings/mpoly-ideals.jl:1065
 [6] top-level scope
   @ REPL[42]:1

Ideal membership should work for these kind of rings. It seems that there is a bug in the translation to the singular side for coefficients in GF(29)?

fingolfin commented 10 months ago

It does seem to work for me, though...

ederc commented 10 months ago

Works for me, too.

HechtiDerLachs commented 10 months ago

Yes, for me too, in the end. Sorry.