Oscar.jl icon indicating copy to clipboard operation
Oscar.jl copied to clipboard

Normalization returns a corrupted ring

Open simonbrandhorst opened this issue 11 months ago • 0 comments

Describe the bug Using the output of normalisation results in bugs. It looks to me like something is going wrong with wrapping the singular output. @wdecker @jankoboehm Edit: The pecularity of this example is that the input is already normal. For a non-normal example it seem to work. Thus this is a corner case that is not caught somehow.

To Reproduce

using Oscar
julia> P,(a,b) = polynomial_ring(QQ,[:a,:b])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[a, b])

julia> I = ideal(P,a^2-b);

julia> Q = normalization(quo(P,I)[1])[1][1];

julia> R = base_ring(Q);

julia> J = ideal(R, R[1])
Ideal generated by
  x

julia> base_ring(J) === base_ring(modulus(Q))
true

julia> saturation(modulus(Q),J)
ERROR: Incompatible ideals
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] check_parent
   @ ~/.julia/packages/Singular/N0xXX/src/ideal/ideal.jl:261 [inlined]
 [3] saturation(I::Singular.sideal{Singular.spoly{Singular.n_Q}}, J::Singular.sideal{Singular.spoly{Singular.n_Q}})
   @ Singular ~/.julia/packages/Singular/N0xXX/src/ideal/ideal.jl:602
 [4] saturation(I::MPolyIdeal{QQMPolyRingElem}, J::MPolyIdeal{QQMPolyRingElem})
   @ Oscar ~/.julia/dev/Oscar/src/Rings/mpoly-ideals.jl:343
 [5] top-level scope
   @ REPL[314]:1

julia> saturation(ideal(base_ring(Q),gens(modulus(Q))),J) # curiously this works
Ideal generated by
  x^2 - y


Expected behavior This should work.

System (please complete the following information): Please paste the output of Oscar.versioninfo(full=true) below. If this does not work, please paste the output of Julia's versioninfo() and your Oscar version.

julia> Oscar.versioninfo(full=true)
ulia> Oscar.versioninfo(full=true)

OSCAR version 1.1.0-DEV - #sb/EnriquesAut, 328c741432 -- 2024-03-01 14:08:32 +0100
  combining:
    AbstractAlgebra.jl   v0.40.1
    GAP.jl               v0.10.3
    Hecke.jl             v0.30.0 - #master, 6599c41e23 -- 2024-02-29 19:02:54 +0100
    Nemo.jl              v0.43.1
    Polymake.jl          v0.11.14
    Singular.jl          v0.22.4
  building on:
    Antic_jll               v0.201.500+0
    Arb_jll                 v200.2300.0+0
    Calcium_jll             v0.401.100+0
    FLINT_jll               v200.900.9+0
    GAP_jll                 v400.1200.200+9
    Singular_jll            v403.214.1400+0
    libpolymake_julia_jll   v0.11.4+0
    libsingular_julia_jll   v0.43.0+0
    polymake_jll            v400.1100.1+0
See `]st -m` for a full list of dependencies.

Julia Version 1.8.2
Commit 36034abf260 (2022-09-29 15:21 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 8 × Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, skylake)
  Threads: 1 on 8 virtual cores
Official https://julialang.org/ release
...

simonbrandhorst avatar Mar 04 '24 16:03 simonbrandhorst