-
Notifications
You must be signed in to change notification settings - Fork 120
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
segmentation fault primary decomposition over number field #557
Comments
Seems to be a Singular issue. Here is how to reproduce it using only julia> using Singular
julia> T, t = Singular.Nemo.PolynomialRing(Singular.Nemo.QQ, "t")
(Univariate Polynomial Ring in t over Rational Field, t)
julia> K, a = Singular.Nemo.NumberField(t^2 + 1, "a")
(Number field over Rational Field with defining polynomial t^2 + 1, a)
julia> R, (y, z) = Singular.PolynomialRing(K, ["y", "z"])
(Singular Polynomial Ring (Coeffs(17)),(y,z),(dp(2),C), spoly{Singular.n_unknown{Nemo.nf_elem}}[y, z])
julia> p = z^2+1
z^2 + 1
julia> q = z^3+2
z^3 + 2
julia> I = Singular.Ideal(R, p*q^2, y-z^2)
Singular Ideal over Singular Polynomial Ring (Coeffs(17)),(y,z),(dp(2),C) with generators (z^8 + z^6 + 4*z^5 + 4*z^3 + 4*z^2 + 4, -z^2 + y)
julia> Singular.LibPrimdec.primdecGTZ(R, I)
signal (11): Speicherzugriffsfehler
in expression starting at REPL[16]:1
unknown function (ip: (nil))
Allocations: 25972479 (Pool: 25965025; Big: 7454); GC: 28
[1] 30623 segmentation fault (core dumped) julia @tthsqe12 Any idea? On a related note, do you know why we don't create a Singular number field when doing computations with number fields @tthsqe12? Why is |
In Singular itself you get:
|
Well, of course it crashes in singular. Singular is going to get the |
Isn't there the generic fields functionality? |
Singular's library procedures are not coded with generic field functionality in mind. |
Makes sense. There is no primary decomposition for generic fields without more primitives. |
S o what can we do? |
I discussed the fix with @tthsqe12. He will take care. |
Do you already have code for this @joschmitt? Going back and forth between Singular and Nemo number fields? |
Not yet. The plan is to start with this on Wednesday (assuming nobody else is faster or insists on doing it themselves). |
The coefficients in Singular have an array of function pointers to define their behaviour. |
@joschmitt I insist on doing this myself in singular.jl tmr (Tuesday). It is a low-level operation that should try to be "efficient". |
Sure. |
So the fixed version probably outputs an output isomorphic to the singular output: julia> T, t = PolynomialRing(QQ, "t");
julia> K, a = NumberField(t^2 + 1, "a");
julia> R, (y, z) = PolynomialRing(K, ["y", "z"]);
julia> p = z^2+1;
julia> q = z^3+2;
julia> I = ideal(R, [p*q^2, y-z^2]);
julia> L = primary_decomposition(I)
3-element Vector{Tuple{MPolyIdeal{AbstractAlgebra.Generic.MPoly{nf_elem}}, MPolyIdeal{AbstractAlgebra.Generic.MPoly{nf_elem}}}}:
(ideal generated by: -y + z^2, y^3 + 4*y*z + 4, ideal generated by: -y + z^2, y*z + 2, y^2 + 2*z)
(ideal generated by: z - a, y + 1, ideal generated by: z - a, y + 1)
(ideal generated by: z + a, y + 1, ideal generated by: z + a, y + 1) |
The text was updated successfully, but these errors were encountered: