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

Sometimes Singular creates unknown coefficient fields, which make Oscar unhappy #3088

Closed
thofma opened this issue Dec 8, 2023 · 6 comments
Closed
Labels
bug Something isn't working

Comments

@thofma
Copy link
Collaborator

thofma commented Dec 8, 2023

Best illustrated with an example:

julia> Qx, x = QQ["x"]; K, = number_field([x - 1, x^2 + 2], cached = false); # or any complicated field that translates into a generic `N_Field`

julia> R, = polynomial_ring(K, 2);

julia> I = ideal(R, [gen(R, 1)]);

julia> S, = quo(R, I);

julia> Oscar.singular_poly_ring(R) |> coefficient_ring |> typeof
Singular.N_Field{NfAbsNSElem}

julia> Oscar.singular_poly_ring(S) |> coefficient_ring |> typeof
Singular.N_UnknownSingularCoefficientRing

This happens, because for the construction of the Singular quotient ring we go via:

r.SQR = Singular.create_ring_from_singular_ring(Singular.libSingular.rQuotientRing(SG.ptr, base_ring(SG).ptr))

(this is the Singular quotient ring, of which the coefficient_ring is of the N_Unknown[...] type.

As a consequence, on the Singular side we don't have the identical coefficient ring, which yields problems like #3080.

This is ultimately a Singular.jl issue, but I guess here the issue gets more attention. I think the discussion in oscar-system/Singular.jl#187 (comment) and oscar-system/Singular.jl#336 is relevant.

One option is ditch the generic N_Field interface and just refuse to do anything with coefficient rings that cannot be handled by native Singular coefficient fields. In most cases we can transform the input to the appropriate type. For the rest we will throw a "sorry, can't do this" error. This is a rather drastic solution, but maybe the only realistic one given our manpower?

Any thoughts @fieker @fingolfin @hannes14?

@thofma
Copy link
Collaborator Author

thofma commented Dec 28, 2023

Here is another simple example. Lots of things are broken for prime fields of large characteristic:

julia> F = GF(next_prime(ZZ(2)^100))
Finite field of characteristic 1267650600228229401496703205653

julia> Fx, (x, y) = F["x", "y"];

julia> I = ideal(Fx, [x, y]);

julia> Q, = quo(Fx, I);

julia> J = ideal(Q, [Q(x)]);

julia> Q(x) in J
ERROR: MethodError: no method matching (::Singular.N_UnknownSingularCoefficientRing)(::FpFieldElem)

@HechtiDerLachs
Copy link
Collaborator

Is there any progress on this issue. The workarounds in #3173 only cause other troubles and it seems that I will never get the tests to run there.

@fieker
Copy link
Contributor

fieker commented Feb 28, 2024

it should be, as of last Wedesday(??) be fixed. We confirm and close.
Thanks @hannes14

@fieker
Copy link
Contributor

fieker commented Feb 28, 2024

update: still open(ish), but making progress

@hannes14
Copy link
Member

Status: fixed with master branch of Oscar, not fixed with released version of Oscar

@lgoettgens
Copy link
Member

I can confirm the fix on e86fe09.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants