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
338 stars 122 forks source link

`sres` does not work with Oscar's `free_resolution`, Gröbner bases in `free_resolution` #2501

Closed RafaelDavidMohr closed 5 months ago

RafaelDavidMohr commented 1 year ago

Describe the bug

If one adds the lines

elseif algorithm == :sres
    res = Singular.sres(singular_kernel_entry, length)

to free_resolution in UngradedModules.jl then Oscar produces a wrong free resolution: The problem is that Singular changes the cokernel representation of the Module it's computing a free resolution for. @wdecker also asked to use this issue as a reminder that it is not ensured that we have a Gröbner basis for the quotient of the cokernel representation in the free_resolution code, this should be changed.

To Reproduce

using Oscar
R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]);
A = R[x; y];
B = R[x^2; x*y; y^2; z^4];
M = SubquoModule(A,B);
fr = free_resolution(M, algorithm = :sres)
all(iszero, homology(fr.C)) # gives false

If you check where the homology is not zero, then you can see it happens precisely where Singular's free resolution is glued to the cokernel representation of M computed on the Oscar side.

System (please complete the following information):

julia> Oscar.versioninfo(full=true)
OSCAR version 0.12.2-DEV
  combining:
    AbstractAlgebra.jl   v0.30.9
    GAP.jl               v0.9.7
    Hecke.jl             v0.18.14
    Nemo.jl              v0.34.7
    Polymake.jl          v0.10.0
    Singular.jl          v0.18.6 - #master, d437eeb5 -- 2023-06-26 11:47:48 +0200
  building on:
    Antic_jll               v0.201.500+0
    Arb_jll                 v200.2300.0+0
    Calcium_jll             v0.401.100+0
    FLINT_jll               v200.900.6+0
    GAP_jll                 v400.1200.200+2
    Singular_jll            v403.203.202+0
    libpolymake_julia_jll   v0.10.0+0
    libsingular_julia_jll   v0.34.0+0
    polymake_jll            v400.1000.0+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 × 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, tigerlake)
  Threads: 1 on 8 virtual cores
Official https://julialang.org/ release
jankoboehm commented 1 year ago

Should be resolved by PR #2634. We have fixed fres, which is preferable to sres, and do not supply sres any more.

fingolfin commented 5 months ago

PR #2634 has been merged long since. So is this issue resolved then? Or not? @RafaelDavidMohr could you comment?

ederc commented 5 months ago

At some point we made the decision, that we only support the following algorithms: :fres, :mres, and :nres. Since :fres is an optimized version, :sres is not needed.

For all three available algorithmic options free_resolution computes the above given example correctly (homology is all zero), thus the issue does no longer exist.