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

`minimal_primes` fails where it shouldn't #3773

Open HechtiDerLachs opened 4 months ago

HechtiDerLachs commented 4 months ago

The following ideal is passed to Singular after expansion of the coefficient field of the principal ideal generated by this irreducible polynomial (already posted on #3711) .

The expectation is that the computation should finish in short time.

R, (a, b, x, y, z) = QQ[:a, :b, :x, :y, :z]
g = QQMPolyRingElem[-x^3 + x*z^8 - x + y^2, a^8 + 1, -a^6 + a^4 - a^2 + b^2]
J = ideal(R, g)
minimal_primes(J)

@afkafkafk13 observed that the order of the variables probably plays a decisive role. Hence I include another version here for convenience. It also does not finish for me.

R, (x, y, z, a, b) = QQ[:x, :y, :z, :a, :b]
g = QQMPolyRingElem[-x^3 + x*z^8 - x + y^2, a^8 + 1, -a^6 + a^4 - a^2 + b^2]
J = ideal(R, g)
minimal_primes(J)

For me the stacktrace when aborting is

julia> minimal_primes(J)
^CERROR: InterruptException:
Stacktrace:
 [1] call_singular_library_procedure
   @ ~/.julia/packages/CxxWrap/5IZvn/src/CxxWrap.jl:624 [inlined]
 [2] low_level_caller_rng(lib::String, name::String, ring::Singular.PolyRing{…}, args::Singular.sideal{…})
   @ Singular ~/.julia/packages/Singular/C3EMh/src/caller.jl:379
 [3] minAssGTZ(ring::Singular.PolyRing{Singular.n_Q}, args::Singular.sideal{Singular.spoly{Singular.n_Q}})
   @ Singular.LibPrimdec ~/.julia/packages/Singular/C3EMh/src/Meta.jl:45
 [4] minimal_primes(I::MPolyIdeal{QQMPolyRingElem}; algorithm::Symbol, cache::Bool)
   @ Oscar ~/Kaiserslautern/neuer_Oscar_Klon/Oscar.jl/src/Rings/mpoly-ideals.jl:1079
 [5] minimal_primes(I::MPolyIdeal{QQMPolyRingElem})
   @ Oscar ~/Kaiserslautern/neuer_Oscar_Klon/Oscar.jl/src/Rings/mpoly-ideals.jl:1067
 [6] top-level scope
   @ REPL[28]:1
Some type information was truncated. Use `show(err)` to see complete types.

I am wondering whether this suffers from similar problems as discussed on #3711. But @fingolfin already remarked that this might not be the case.

joschmitt commented 4 months ago

Regarding the possible connection to #3711: I just tried these with Singular.jl 0.23.2 and they didn't finish after 3 minutes.

HechtiDerLachs commented 4 months ago

Yes, similar observations were made by @wdecker . Thanks for trying on your machine, too.

afkafkafk13 commented 4 months ago

Have you tried it with b before a in the list of variables?