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

galthy.jl / van_hoeij: must never be zero #4170

Open
benlorenz opened this issue Oct 1, 2024 · 0 comments
Open

galthy.jl / van_hoeij: must never be zero #4170

benlorenz opened this issue Oct 1, 2024 · 0 comments
Labels
bug Something isn't working topic: number theory

Comments

@benlorenz
Copy link
Member

benlorenz commented Oct 1, 2024

Describe the bug
Rare error must never be zero in test/NumberTheory/galthy.jl:109 in our CI, e.g.:
https://github.com/oscar-system/Oscar.jl/actions/runs/10960677682/job/30435848700#step:9:7123.
The issue might be in fixed_field or somewhere in Hecke?

To Reproduce
After trying some seeds I found that this code reproduces the error (on three different linux computers with julia 1.10.5 and an M1 mac with julia 1.10.4):

julia> R, s = QQ[:s];
julia> K, q = number_field(s^2 - 2, "q");
julia> Kw, w = polynomial_ring(K, :w);
julia> f = w^16 - 32*w^14 - 192*w^12 + 22720*w^10 + 23104*w^8 - 2580480*w^6 + 41287680*w^4 + 106168320*w^2 + 84934656;
julia> g, s = galois_group(f);
julia> ss = map(representative, subgroup_classes(g));
julia> H = ss[1000];

julia> Oscar.randseed!(15290);

julia> f = fixed_field(s, H)
ERROR: must never be zero
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] van_hoeij(f::AbstractAlgebra.Generic.Poly{AbsSimpleNumFieldElem}, P::AbsSimpleNumFieldOrderIdeal; prec_scale::Int64)
    @ Hecke ~/.julia/packages/Hecke/7wI0D/src/NumField/NfAbs/PolyFact.jl:759
  [3] van_hoeij(f::AbstractAlgebra.Generic.Poly{AbsSimpleNumFieldElem}, P::AbsSimpleNumFieldOrderIdeal)
    @ Hecke ~/.julia/packages/Hecke/7wI0D/src/NumField/NfAbs/PolyFact.jl:541
  [4] factor_new(f::AbstractAlgebra.Generic.Poly{AbsSimpleNumFieldElem})
    @ Hecke ~/.julia/packages/Hecke/7wI0D/src/NumField/NfAbs/PolyFact.jl:307
  [5] _factor(f::AbstractAlgebra.Generic.Poly{AbsSimpleNumFieldElem}; algo::Symbol)
    @ Hecke ~/.julia/packages/Hecke/7wI0D/src/NumField/NfAbs/Elem.jl:354
  [6] _factor
    @ ~/.julia/packages/Hecke/7wI0D/src/NumField/NfAbs/Elem.jl:346 [inlined]
  [7] is_irreducible
    @ ~/.julia/packages/Hecke/7wI0D/src/NumField/NfAbs/Elem.jl:418 [inlined]
  [8] number_field(f::AbstractAlgebra.Generic.Poly{AbsSimpleNumFieldElem}, S::String; cached::Bool, check::Bool)
    @ Hecke ~/.julia/packages/Hecke/7wI0D/src/NumField/NfRel/NfRel.jl:187
  [9] number_field
    @ ~/.julia/packages/Hecke/7wI0D/src/NumField/NfRel/NfRel.jl:185 [inlined]
 [10] #extension_field#305
    @ ~/software/polymake/julia/Oscar.jl/src/NumberTheory/GaloisGrp/GaloisGrp.jl:2220 [inlined]
 [11] extension_field
    @ ~/software/polymake/julia/Oscar.jl/src/NumberTheory/GaloisGrp/GaloisGrp.jl:2219 [inlined]
 [12] fixed_field(GC::Oscar.GaloisGrp.GaloisCtx{Hecke.vanHoeijCtx}, U::PermGroup, extra::Int64)
    @ Oscar.GaloisGrp ~/software/polymake/julia/Oscar.jl/src/NumberTheory/GaloisGrp/GaloisGrp.jl:2374
 [13] fixed_field(GC::Oscar.GaloisGrp.GaloisCtx{Hecke.vanHoeijCtx}, U::PermGroup)
    @ Oscar.GaloisGrp ~/software/polymake/julia/Oscar.jl/src/NumberTheory/GaloisGrp/GaloisGrp.jl:2339
 [14] top-level scope
    @ REPL[10]:1

When setting a different seed the code runs without errors (usually).

Expected behavior
No error.

System (please complete the following information):

julia> Oscar.versioninfo(full=true)
OSCAR version 1.2.0-DEV - #master, 2fe164e918 -- 2024-09-30 18:04:55 +0200
  combining:
    AbstractAlgebra.jl   v0.43.2
    GAP.jl               v0.12.0
    Hecke.jl             v0.34.4
    Nemo.jl              v0.47.1
    Polymake.jl          v0.11.21
    Singular.jl          v0.23.8
  building on:
    FLINT_jll               v300.100.300+0
    GAP_jll                 v400.1300.102+2
    Singular_jll            v404.0.606+0
    libpolymake_julia_jll   v0.12.1+0
    libsingular_julia_jll   v0.45.5+0
    polymake_jll            v400.1200.1+0
See `]st -m` for a full list of dependencies.

Julia Version 1.10.5
Commit 6f3fdf7b362 (2024-08-27 14:19 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 8 × 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, tigerlake)
Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores)
Environment:
  JULIA_NUM_PRECOMPILE_TASKS = 3
Official https://julialang.org/ release
@benlorenz benlorenz added bug Something isn't working topic: number theory labels Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working topic: number theory
Projects
None yet
Development

No branches or pull requests

1 participant