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

Bug in msolve call in last versions #68

Closed
rprebet opened this issue Jul 24, 2024 · 1 comment
Closed

Bug in msolve call in last versions #68

rprebet opened this issue Jul 24, 2024 · 1 comment

Comments

@rprebet
Copy link
Contributor

rprebet commented Jul 24, 2024

There's a problem when running msolve from the last versions of AlgebraicSolving.jl with the following polynomial system. in the following sense: the lifting of the parametrization does not terminate in a reasonable time.
Its seems that the main difference with the previous versions is the version of msolve_jll that is used: v0.6.5+0 vs v0.600.700+0.

Indeed, when executing directly the binary of msolve on this system this takes 0.02s.

Regarding the different version this code:

  • does not work for downloaded releases >=v0.4.15 and the current repository , which use msolve_jll v0.600.700+0 from the output;
  • works for downloaded releases v0.4.13 and v0.4.14, which use msolve_jll v0.6.5+0 from the output;
using Pkg
Pkg.activate("AlgebraicSolving.jl")
using AlgebraicSolving

R,(x1,x2,x3,x4) = polynomial_ring(QQ, ["x1","x2","x3","x4"])

F = [
x1^4 - 8*x1^3*x2 - 32*x1^3*x3 + 36*x1^3*x4 + 26*x1^2*x2^2 + 152*x1^2*x2*x3 - 204*x1^2*x2*x4 + 586*x1^2*x3^2 - 996*x1^2*x3*x4 + 524*x1^2*x4^2 - 20*x1^2 - 40*x1*x2^3 - 256*x1*x2^2*x3 + 420*x1*x2^2*x4 - 1704*x1*x2*x3^2 + 3072*x1*x2*x3*x4 - 1880*x1*x2*x4^2 + 80*x1*x2 - 5280*x1*x3^3 + 12660*x1*x3^2*x4 - 10760*x1*x3*x4^2 + 320*x1*x3 + 3600*x1*x4^3 - 360*x1*x4 + 25*x2^4 + 120*x2^3*x3 - 300*x2^3*x4 + 1794*x2^2*x3^2 - 2820*x2^2*x3*x4 + 1900*x2^2*x4^2 - 100*x2^2 + 3960*x2*x3^3 - 14940*x2*x3^2*x4 + 15000*x2*x3*x4^2 - 240*x2*x3 - 6000*x2*x4^3 + 600*x2*x4 + 27225*x3^4 - 69300*x3^3*x4 + 77100*x3^2*x4^2 - 3300*x3^2 - 42000*x3*x4^3 + 4200*x3*x4 + 10000*x4^4 - 1964*x4^2 + 64,
-32*x1^3 + 152*x1^2*x2 + 1172*x1^2*x3 - 996*x1^2*x4 - 256*x1*x2^2 - 3408*x1*x2*x3 + 3072*x1*x2*x4 - 15840*x1*x3^2 + 25320*x1*x3*x4 - 10760*x1*x4^2 + 320*x1 + 120*x2^3 + 3588*x2^2*x3 - 2820*x2^2*x4 + 11880*x2*x3^2 - 29880*x2*x3*x4 + 15000*x2*x4^2 - 240*x2 + 108900*x3^3 - 207900*x3^2*x4 + 154200*x3*x4^2 - 6600*x3 - 42000*x4^3 + 4200*x4,
36*x1^3 - 204*x1^2*x2 - 996*x1^2*x3 + 1048*x1^2*x4 + 420*x1*x2^2 + 3072*x1*x2*x3 - 3760*x1*x2*x4 + 12660*x1*x3^2 - 21520*x1*x3*x4 + 10800*x1*x4^2 - 360*x1 - 300*x2^3 - 2820*x2^2*x3 + 3800*x2^2*x4 - 14940*x2*x3^2 + 30000*x2*x3*x4 - 18000*x2*x4^2 + 600*x2 - 69300*x3^3 + 154200*x3^2*x4 - 126000*x3*x4^2 + 4200*x3 + 40000*x4^3 - 3928*x4,
-10320*x1^5 + 112080*x1^4*x2 + 330240*x1^4*x3 - 459120*x1^4*x4 - 504480*x1^3*x2^2 - 2513280*x1^3*x2*x3 + 3868800*x1^3*x2*x4 - 6047520*x1^3*x3^2 + 13081920*x1^3*x3*x4 - 8561280*x1^3*x4^2 + 206400*x1^3 + 1180320*x1^2*x2^3 + 7128960*x1^2*x2^2*x3 - 12634080*x1^2*x2^2*x4 + 34884000*x1^2*x2*x3^2 - 74420160*x1^2*x2*x3*x4 + 52740480*x1^2*x2*x4^2 - 1416000*x1^2*x2 + 54489600*x1^2*x3^3 - 181984800*x1^2*x3^2*x4 + 198292800*x1^2*x3*x4^2 - 3302400*x1^2*x3 - 83054400*x1^2*x4^3 + 5382816*x1^2*x4 - 1438800*x1*x2^4 - 8795520*x1*x2^3*x3 + 18998400*x1*x2^3*x4 - 68816160*x1*x2^2*x3^2 + 142213440*x1*x2^2*x3*x4 - 111897600*x1*x2^2*x4^2 + 3393600*x1*x2^2 - 196732800*x1*x2*x3^3 + 677174400*x1*x2*x3^2*x4 - 741542400*x1*x2*x3*x4^2 + 11923200*x1*x2*x3 + 332880000*x1*x2*x4^3 - 23581824*x1*x2*x4 - 280962000*x1*x3^4 + 1177704000*x1*x3^3*x4 - 1904688000*x1*x3^2*x4^2 + 34056000*x1*x3^2 + 1376016000*x1*x3*x4^3 - 69095040*x1*x3*x4 - 418560000*x1*x4^4 + 50352960*x1*x4^2 - 1032000*x1 + 738000*x2^5 + 3542400*x2^4*x3 - 11046000*x2^4*x4 + 52958880*x2^3*x3^2 - 93758400*x2^3*x3*x4 + 82368000*x2^3*x4^2 - 2952000*x2^3 + 116899200*x2^2*x3^3 - 598183200*x2^2*x3^2*x4 + 689832000*x2^2*x3*x4^2 - 7084800*x2^2*x3 - 343560000*x2^2*x4^3 + 26213664*x2^2*x4 + 803682000*x2*x3^4 - 2392632000*x2*x3^3*x4 + 3584736000*x2*x3^2*x4^2 - 97416000*x2*x3^2 - 2553840000*x2*x3*x4^3 + 143297280*x2*x3*x4 + 820800000*x2*x4^4 - 109448640*x2*x4^2 + 2952000*x2 - 2384910000*x3^4*x4 + 6070680000*x3^3*x4^2 - 6753960000*x3^2*x4^3 + 265557600*x3^2*x4 + 3679200000*x3*x4^4 - 337982400*x3*x4^2 - 876000000*x4^5 + 164097600*x4^3 - 8284800*x4,
2320*x1^5 - 34160*x1^4*x2 + 13360*x1^4*x3 + 83520*x1^4*x4 + 185120*x1^3*x2^2 + 151040*x1^3*x2*x3 - 1034880*x1^3*x2*x4 - 1443680*x1^3*x3^2 + 842880*x1^3*x3*x4 + 1215680*x1^3*x4^2 - 48704*x1^3 - 498400*x1^2*x2^3 - 687520*x1^2*x2^2*x3 + 4156800*x1^2*x2^2*x4 + 220320*x1^2*x2*x3^2 + 4794240*x1^2*x2*x3*x4 - 12536000*x1^2*x2*x4^2 + 508544*x1^2*x2 + 39084000*x1^2*x3^3 - 57878400*x1^2*x3^2*x4 + 20939200*x1^2*x3*x4^2 - 925216*x1^2*x3 + 8352000*x1^2*x4^3 - 835200*x1^2*x4 + 682000*x1*x2^4 + 768000*x1*x2^3*x3 - 7248000*x1*x2^3*x4 + 8318880*x1*x2^2*x3^2 - 17673600*x1*x2^2*x3*x4 + 33736000*x1*x2^2*x4^2 - 1498432*x1*x2^2 - 57715200*x1*x2*x3^3 + 36950400*x1*x2*x3^2*x4 + 37968000*x1*x2*x3*x4^2 + 1213824*x1*x2*x3 - 70080000*x1*x2*x4^3 + 7008000*x1*x2*x4 - 399366000*x1*x3^4 + 948240000*x1*x3^3*x4 - 763704000*x1*x3^2*x4^2 + 19235520*x1*x3^2 + 217920000*x1*x3*x4^3 - 21792000*x1*x3*x4 + 23200000*x1*x4^4 - 3865280*x1*x4^2 + 255040*x1 - 390000*x2^5 + 318000*x2^4*x3 + 4680000*x2^4*x4 - 17474400*x2^3*x3^2 + 17712000*x2^3*x3*x4 - 29640000*x2^3*x4^2 + 1568640*x2^3 + 95378400*x2^2*x3^3 - 13968000*x2^2*x3^2*x4 - 67560000*x2^2*x3*x4^2 - 4757664*x2^2*x3 + 93600000*x2^2*x4^3 - 9360000*x2^2*x4 - 77814000*x2*x3^4 - 227664000*x2*x3^3*x4 + 111240000*x2*x3^2*x4^2 + 31311360*x2*x3^2 + 129600000*x2*x3*x4^3 - 12960000*x2*x3*x4 - 156000000*x2*x4^4 + 30120000*x2*x4^2 - 1577280*x2 + 2384910000*x3^5 - 6070680000*x3^4*x4 + 6753960000*x3^3*x4^2 - 281239200*x3^3 - 3679200000*x3^2*x4^3 + 367920000*x3^2*x4 + 876000000*x3*x4^4 - 186302400*x3*x4^2 + 8284800*x3 + 6048000*x4^3,
236240*x1^4 - 1858880*x1^3*x2 - 7984640*x1^3*x3 + 8982720*x1^3*x4 + 5973280*x1^2*x2^2 + 37430400*x1^2*x2*x3 - 50343360*x1^2*x2*x4 + 149618400*x1^2*x3^2 - 256171200*x1^2*x3*x4 + 135051200*x1^2*x4^2 - 3154016*x1^2 - 9115200*x1*x2^3 - 62787840*x1*x2^2*x3 + 103060800*x1*x2^2*x4 - 425160000*x1*x2*x3^2 + 778492800*x1*x2*x3*x4 - 480336000*x1*x2*x4^2 + 12397824*x1*x2 - 1387584000*x1*x3^3 + 3327048000*x1*x3^2*x4 - 2827728000*x1*x3*x4^2 + 53783040*x1*x3 + 946080000*x1*x4^3 - 61248960*x1*x4 + 5682000*x2^4 + 29404800*x2^3*x3 - 73512000*x2^3*x4 + 442159200*x2^2*x3^2 - 703800000*x2^2*x3*x4 + 481560000*x2^2*x4^2 - 15485664*x2^2 + 1040688000*x2*x3^3 - 3926232000*x2*x3^2*x4 + 3942000000*x2*x3*x4^2 - 40337280*x2*x3 - 1576800000*x2*x4^3 + 102968640*x2*x4 + 7154730000*x3^4 - 18212040000*x3^3*x4 + 20261880000*x3^2*x4^2 - 554637600*x3^2 - 11037600000*x3*x4^3 + 705902400*x3*x4 + 2628000000*x4^4 - 339297600*x4^2 + 8284800
]

real_solutions(AlgebraicSolving.Ideal(F), info_level=2)

Here is the output after ~1min of execution: output.txt

@rprebet rprebet closed this as not planned Won't fix, can't repro, duplicate, stale Jul 24, 2024
@rprebet rprebet reopened this Jul 24, 2024
@rprebet
Copy link
Contributor Author

rprebet commented Jul 24, 2024

I ended up noticing that this problem seems to have been very recently raised in for msolve in issue #156 and also solved in PR #156 of the github repo.

I imagine that a new release of msolve with this (important) bug-fix is planned and the corresponding new version of msolve_jll would follow. Since I can generate many polynomial systems triggering this bug, I think this will be very appreciated.

@rprebet rprebet closed this as completed Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant