Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Singular.jl broken, possibly due to new Singular_jll release? #811

Closed
fingolfin opened this issue Jun 27, 2024 · 4 comments
Closed

Singular.jl broken, possibly due to new Singular_jll release? #811

fingolfin opened this issue Jun 27, 2024 · 4 comments
Labels

Comments

@fingolfin
Copy link
Member

The Singular.jl CI tests started to fail. Nothing in Singular.jl changed, but there is a new Singular_jll release which is

sideal.slimgb: Error During Test at /Users/runner/work/Singular.jl/Singular.jl/test/ideal/sideal-test.jl:398
  Test threw exception
  Expression: isequal(B, Ideal(R, 2 * y ^ 2 + 3, x ^ 2 + x * y + 1)) || isequal(B, Ideal(x ^ 2 + x * y + 1, 2 * y ^ 2 + 3))
  MethodError: no method matching Ideal(::spoly{n_Q}, ::spoly{n_Q})
  
  Closest candidates are:
    Ideal(::PolyRing{T}, ::spoly{T}...) where T<:AbstractAlgebra.RingElem
     @ Singular ~/work/Singular.jl/Singular.jl/src/ideal/ideal.jl:1188
  
  Stacktrace:
   [1] macro expansion
     @ ~/work/Singular.jl/Singular.jl/test/ideal/sideal-test.jl:398 [inlined]
   [2] macro expansion
     @ ~/hostedtoolcache/julia/1.10.4/aarch64/share/julia/stdlib/v1.10/Test/src/Test.jl:669 [inlined]
   [3] macro expansion
     @ ~/work/Singular.jl/Singular.jl/test/ideal/sideal-test.jl:398 [inlined]
   [4] macro expansion
     @ ~/hostedtoolcache/julia/1.10.4/aarch64/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
   [5] top-level scope
     @ ~/work/Singular.jl/Singular.jl/test/ideal/sideal-test.jl:384
Test Summary: | Pass  Error  Total  Time
sideal.slimgb |    3      1      4  0.8s
ERROR: LoadError: Some tests did not pass: 3 passed, 0 failed, 1 errored, 0 broken.
in expression starting at /Users/runner/work/Singular.jl/Singular.jl/test/ideal/sideal-test.jl:383
in expression starting at /Users/runner/work/Singular.jl/Singular.jl/test/ideal-test.jl:1
in expression starting at /Users/runner/work/Singular.jl/Singular.jl/test/runtests.jl:17
ERROR: LoadError: Package Singular errored during testing

If I downgrade Singular_jll from v404.0.301 to v404.0.100 it works.

Possible solutions:

  1. we yank that Singular_jll version from the registry, and re-release it with a version number offset that modifies the "minor" (middle) part, i.e. offset 0.1.0 or so
  2. update Singular.jl to deal with the changes, increase the Singular_jll compat to ~404.000.301, and make a quick release
  3. update Singular.jl to use Singular_jll compat =404.000.100` and make a quick release.

@hannes14 I can't judge how hard/easy option 2 would be. Which should we try?

@ederc
Copy link
Member

ederc commented Jun 28, 2024

Maybe use option 3 for a fast fix, I'm not sure how fast option 2 can be done.

@benlorenz
Copy link
Member

benlorenz commented Jun 28, 2024

Option 3 might not work in all cases because new jll + old Singular.jl will still be a valid resolution for the package manager and not much different from old jll + new Singular.jl.

I think the call isequal(B, Ideal(x ^ 2 + x * y + 1, 2 * y ^ 2 + 3)) was also invalid before the update (missing the R argument), the main issue seems to be that this is not equal anymore:

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Singular polynomial ring (QQ),(x,y),(dp(2),C), spoly{n_Q}[x, y])

julia> I = Ideal(R, x^2 + x*y + 1, 2y^2 + 3)
Singular ideal over Singular polynomial ring (QQ),(x,y),(dp(2),C) with generators (x^2 + x*y + 1, 2*y^2 + 3)

julia> B = slimgb(I, complete_reduction=false)
Singular ideal over Singular polynomial ring (QQ),(x,y),(dp(2),C) with generators (y^2 + 3//2, x^2 + x*y + 1)

julia> isequal(B, Ideal(R, 2 * y ^ 2 + 3, x ^ 2 + x * y + 1))
false

Before the update the coefficients in B were not normalized like that:

julia> B = slimgb(I, complete_reduction=false)
Singular ideal over Singular polynomial ring (QQ),(x,y),(dp(2),C) with generators (2*y^2 + 3, x^2 + x*y + 1)

julia> isequal(B, Ideal(R, 2 * y ^ 2 + 3, x ^ 2 + x * y + 1))
true

And this normalization issue looks very similar to the doctest failure in Oscar (e.g. in #3889): https://github.com/oscar-system/Oscar.jl/actions/runs/9704350563/job/26795722745?pr=3889#step:8:3878

│ Evaluated output:
│ 
│ Gröbner basis with elements
│ 1 -> x*y - 3*x
│ 2 -> y^3 - 6*x^2
│ 3 -> x^3 - 9//2*x
│ with respect to the ordering
│ degrevlex([x, y])
│ 
│ Expected output:
│ 
│ Gröbner basis with elements
│ 1 -> x*y - 3*x
│ 2 -> y^3 - 6*x^2
│ 3 -> 2*x^3 - 9*x
│ with respect to the ordering
│ degrevlex([x, y])

Also it looks like the booktests are getting stuck during algebraic-geometry/zariski.jlcon now, maybe this is also related but I haven't really looked into it.

@hannes14
Copy link
Member

I vote for option 2, as now there are fixes to the option handling in libsingular: resetting options must be done after resetting the ring

@fingolfin
Copy link
Member Author

This was resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants