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 primary decomposition & does not terminate on a principal ideal #3905

Open
simonbrandhorst opened this issue Jul 3, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@simonbrandhorst
Copy link
Collaborator

simonbrandhorst commented Jul 3, 2024

Describe the bug
Let K be a number field (e.g. a cyclotomic field)

  1. Primary decomposition does not terminate after 12 hours for a principal ideal (f) < K[x,y,t]
    (but factor(f) terminates immediately)

  2. Primary decomposition throws an error for K a number field and J an ideal over K(t)[x,y]

To Reproduce

using Oscar
F, a = cyclotomic_field(7,:a)
P,x = polynomial_ring(F,:x)
g = x^3 - x^2 - 2*x + 1
w = roots(g)[1]
f = -x^3 + (127961567541885//2*a^5 + 230578777287775//2*a^4 + 230578777287775//2*a^3 + 127961567541885//2*a^2 - 455586040332045//16)*x + y^2 + (3242437110294043228*a^5 + 5842669785012830924*a^4 + 5842669785012830924*a^3 + 3242437110294043228*a^2 - 1443020268154487519)*t^7 + 9351999235365594180359//8*a^5 + 16851720327423257592547//8*a^4 + 16851720327423257592547//8*a^3 + 9351999235365594180359//8*a^2 - 16648124833698322506703//32
-x^3 + (127961567541885//2*a^5 + 230578777287775//2*a^4 + 230578777287775//2*a^3 + 127961567541885//2*a^2 - 455586040332045//16)*x + y^2 + (3242437110294043228*a^5 + 5842669785012830924*a^4 + 5842669785012830924*a^3 + 3242437110294043228*a^2 - 1443020268154487519)*t^7 + 9351999235365594180359//8*a^5 + 16851720327423257592547//8*a^4 + 16851720327423257592547//8*a^3 + 9351999235365594180359//8*a^2 - 16648124833698322506703//32
I = ideal(f)
factor(f) # works in seconds
primary_decomposition(I) # keeps running for hours

The second case:

using Oscar
# Julia code
F, a = cyclotomic_field(7,:a)
P,x = polynomial_ring(F,:x)
f = x^3 - x^2 - 2*x + 1
w = roots(f)[1]
#F,w = number_field(f,:w)
Ft, t = polynomial_ring(F,:t)
FFt = fraction_field(Ft)
E1 = elliptic_curve(FFt,[0,0,0, (-230578777287775//2*w^2+127961567541885//2*w+4144846476936445//16), ((-5842669785012830924*w^2+3242437110294043228*w+13128359838180149367)*t^7-16851720327423257592547//8*w^2+9351999235365594180359//8*w+151461887453084383247079//32)])
julia> J = ideal(equation(E1))
Ideal generated by
  -x^3 + (127961567541885//2*a^5 + 230578777287775//2*a^4 + 230578777287775//2*a^3 + 127
  961567541885//2*a^2 - 455586040332045//16)*x + y^2 + (3242437110294043228*a^5 + 584266
  9785012830924*a^4 + 5842669785012830924*a^3 + 3242437110294043228*a^2 - 14430202681544
  87519)*t^7 + 9351999235365594180359//8*a^5 + 16851720327423257592547//8*a^4 + 16851720
  327423257592547//8*a^3 + 9351999235365594180359//8*a^2 - 16648124833698322506703//32

julia> primary_decomposition(J)
ERROR: Unexpected case in prepareQuotientring. Please inform the authors
leaving primdec.lib::prepareQuotientring (0)
leaving primdec.lib::decomp_i (3361)
leaving primdec.lib::primdecGTZ_i (5677)

Stacktrace:
  [1] call_singular_library_procedure
    @ ~/.julia/packages/CxxWrap/5IZvn/src/CxxWrap.jl:624 [inlined]
  [2] low_level_caller_rng(lib::String, name::String, ring::Singular.PolyRing{…}, args::Singular.sideal{…})
    @ Singular ~/.julia/packages/Singular/YQAWd/src/caller.jl:379
  [3] primdecGTZ(ring::Singular.PolyRing{Singular.n_FieldElem{…}}, args::Singular.sideal{Singular.spoly{…}})

Expected behavior
The function should work and terminate as described in the docu :-).

System (please complete the following information):

OSCAR version 1.2.0-DEV - #sb/EnriquesAut, d92758d3a2 -- 2024-07-03 09:53:15 +0000
  combining:
    AbstractAlgebra.jl   v0.41.9
    GAP.jl               v0.10.4
    Hecke.jl             v0.32.3 - #master, 0cf400dfaa -- 2024-06-13 08:05:41 +0200
    Nemo.jl              v0.45.5
    Polymake.jl          v0.11.18
    Singular.jl          v0.23.2
  building on:
    FLINT_jll               v300.100.300+0
    GAP_jll                 v400.1200.200+9
    Singular_jll            v404.0.100+0
    libpolymake_julia_jll   v0.12.0+0
    libsingular_julia_jll   v0.45.1+0
    polymake_jll            v400.1200.1+0
See `]st -m` for a full list of dependencies.

Julia Version 1.10.2
Commit bd47eca2c8a (2024-03-01 10:14 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 20 × 13th Gen Intel(R) Core(TM) i7-1370P
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, goldmont)
Threads: 15 default, 0 interactive, 1 GC (on 20 virtual cores)
Environment:
  JULIA_NUM_GC_THREADS = 1
  JULIA_NUM_THREADS = 15
Official https://julialang.org/ release

Additional context
Add any other context about the problem here.

@simonbrandhorst simonbrandhorst added the bug Something isn't working label Jul 3, 2024
@simonbrandhorst
Copy link
Collaborator Author

cc: @wdecker @hannes14

@thofma
Copy link
Collaborator

thofma commented Jul 3, 2024

Can you complete the code for the second case?

@simonbrandhorst
Copy link
Collaborator Author

oops got distracted with computing ray class groups. Will do.

@fieker
Copy link
Contributor

fieker commented Jul 3, 2024 via email

@simonbrandhorst
Copy link
Collaborator Author

simonbrandhorst commented Jul 3, 2024

See section 2.0.3. K3 class fields
in
https://doi.org/10.1016/j.jnt.2022.04.013

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

3 participants