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

GaloisCohomology: ERROR: Cannot promote to common finite field (doctest, julia 1.11) #4047

Closed
benlorenz opened this issue Aug 27, 2024 · 9 comments · Fixed by #4054
Closed
Assignees
Labels
bug Something isn't working

Comments

@benlorenz
Copy link
Member

Since this morning all runs of Run tests / doctest (1.11-nightly, ubuntu-latest) are failing in the experimental/GModule/src/GaloisCohomology.jl:1610-1632 doctest.
For example a re-run on master:
https://github.com/oscar-system/Oscar.jl/actions/runs/10560179378/job/29298281640#step:8:4424
The same happened on several different PRs, e.g:
https://github.com/oscar-system/Oscar.jl/actions/runs/10575052818/job/29302018540?pr=3996#step:8:4395
https://github.com/oscar-system/Oscar.jl/actions/runs/10567160335/job/29291853079#step:8:4391

Error output:

Error: doctest failure in ~/work/Oscar.jl/Oscar.jl/experimental/GModule/src/GaloisCohomology.jl:1610-1632

```jldoctest
julia> G = SL(2,5)
SL(2,5)

julia> T = character_table(G);

julia> R = gmodule(T[9])
G-module for G acting on vector space of dimension 6 over abelian closure of Q

julia> S = gmodule(CyclotomicField, R)
G-module for G acting on vector space of dimension 6 over cyclotomic field of order 5

julia> B, mB = relative_brauer_group(base_ring(S), character_field(S));

julia> B
Relative Brauer group for cyclotomic field of order 5 over number field of degree 1 over QQ

julia> b = B(S)
Element of relative Brauer group of number field of degree 1 over QQ
  <2, 2> -> 1//2 + Z
  <5, 5> -> 0 + Z
  Complex embedding of number field -> 1//2 + Z
```

Subexpression:

b = B(S)

Evaluated output:

ERROR: Cannot promote to common finite field
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] _promote(a::FqFieldElem, b::FqFieldElem)
    @ Nemo ~/.julia/packages/Nemo/QNyoV/src/flint/fq_default_extended.jl:889
  [3] *(x::FqFieldElem, y::FqFieldElem)
    @ Nemo ~/.julia/packages/Nemo/QNyoV/src/flint/fq_default.jl:443
  [4] dot(x::FqFieldElem, y::FqFieldElem)
    @ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/zhruP/src/NCRings.jl:294
  [5] dot(x::Vector{FqFieldElem}, y::Vector{FqFieldElem})
    @ LinearAlgebra /opt/hostedtoolcache/julia/1.11-nightly/x64/share/julia/stdlib/v1.11/LinearAlgebra/src/generic.jl:894
  [6] frobenius_equation(X::Hecke.ArtinSchreierSolveCtx{FqMatrix, Vector{FqFieldElem}}, c::FqFieldElem)
    @ Hecke ~/.julia/packages/Hecke/LCgP9/src/LocalField/neq.jl:515
  [7] frobenius_equation2(c::Hecke.LocalFieldElem{Hecke.LocalFieldElem{QadicFieldElem, Hecke.EisensteinLocalField}, Hecke.UnramifiedLocalField}, F::Hecke.LocalField{QadicFieldElem, Hecke.EisensteinLocalField}; frobenius::Hecke.MapEvalCtx, start::Nothing)
    @ Hecke ~/.julia/packages/Hecke/LCgP9/src/LocalField/neq.jl:664
  [8] (::Hecke.var"#5238#5239"{Hecke.LocalField{QadicFieldElem, Hecke.EisensteinLocalField}, Int64, Hecke.LocalField{Hecke.LocalFieldElem{QadicFieldElem, Hecke.EisensteinLocalField}, Hecke.UnramifiedLocalField}})()
    @ Hecke ~/.julia/packages/Hecke/LCgP9/src/LocalField/neq.jl:649
  [9] with_precision(f::Hecke.var"#5238#5239"{Hecke.LocalField{QadicFieldElem, Hecke.EisensteinLocalField}, Int64, Hecke.LocalField{Hecke.LocalFieldElem{QadicFieldElem, Hecke.EisensteinLocalField}, Hecke.UnramifiedLocalField}}, K::QadicField, n::Int64)
    @ Nemo ~/.julia/packages/Nemo/QNyoV/src/flint/qadic.jl:969
 [10] setprecision(f::Function, K::QadicField, n::Int64)
    @ Nemo ~/.julia/packages/Nemo/QNyoV/src/flint/qadic.jl:977
 [11] setprecision(f::Function, K::Hecke.LocalField{QadicFieldElem, Hecke.EisensteinLocalField}, n::Int64)
    @ Hecke ~/.julia/packages/Hecke/LCgP9/src/LocalField/LocalField.jl:403
 [12] setprecision(f::Function, K::Hecke.LocalField{Hecke.LocalFieldElem{QadicFieldElem, Hecke.EisensteinLocalField}, Hecke.UnramifiedLocalField}, n::Int64)
    @ Hecke ~/.julia/packages/Hecke/LCgP9/src/LocalField/LocalField.jl:403
 [13] frobenius_equation(c::Hecke.LocalFieldElem{Hecke.LocalFieldElem{QadicFieldElem, Hecke.EisensteinLocalField}, Hecke.UnramifiedLocalField}, F::Hecke.LocalField{QadicFieldElem, Hecke.EisensteinLocalField}; frobenius::Hecke.MapEvalCtx)
    @ Hecke ~/.julia/packages/Hecke/LCgP9/src/LocalField/neq.jl:620
 [14] local_fundamental_class_serre(mKL::Hecke.LocalFieldMor{Hecke.LocalField{QadicFieldElem, Hecke.EisensteinLocalField}, Hecke.LocalField{QadicFieldElem, Hecke.EisensteinLocalField}, Hecke.MapDataFromLocalField{Hecke.LocalFieldElem{QadicFieldElem, Hecke.EisensteinLocalField}, Hecke.MapDataFromQadicField{Hecke.LocalFieldElem{QadicFieldElem, Hecke.EisensteinLocalField}}}, Hecke.MapDataFromLocalField{Hecke.LocalFieldElem{QadicFieldElem, Hecke.EisensteinLocalField}, Hecke.MapDataFromQadicField{Hecke.LocalFieldElem{QadicFieldElem, Hecke.EisensteinLocalField}}}, Hecke.LocalFieldElem{QadicFieldElem, Hecke.EisensteinLocalField}})
    @ Hecke ~/.julia/packages/Hecke/LCgP9/src/LocalField/neq.jl:873
 [15] local_index(CC::Vector{Oscar.GrpCoh.CoChain{2, PermGroupElem, Oscar.GrpCoh.MultGrpElem{AbsSimpleNumFieldElem}}}, P::AbsSimpleNumFieldOrderIdeal, mG::AbstractAlgebra.Generic.CompositeMap{PermGroup, Hecke.NfMorSet{AbsSimpleNumField}}; B::Oscar.GaloisCohomology_Mod.RelativeBrauerGroup, index_only::Bool)
    @ Oscar.GaloisCohomology_Mod ~/work/Oscar.jl/Oscar.jl/experimental/GModule/src/GaloisCohomology.jl:1365
 [16] local_index
    @ ~/work/Oscar.jl/Oscar.jl/experimental/GModule/src/GaloisCohomology.jl:1300 [inlined]
 [17] local_index(CC::Oscar.GrpCoh.CoChain{2, PermGroupElem, Oscar.GrpCoh.MultGrpElem{AbsSimpleNumFieldElem}}, P::AbsSimpleNumFieldOrderIdeal, mG::AbstractAlgebra.Generic.CompositeMap{PermGroup, Hecke.NfMorSet{AbsSimpleNumField}}; B::Oscar.GaloisCohomology_Mod.RelativeBrauerGroup, index_only::Bool)
    @ Oscar.GaloisCohomology_Mod ~/work/Oscar.jl/Oscar.jl/experimental/GModule/src/GaloisCohomology.jl:1228
 [18] (::Oscar.GaloisCohomology_Mod.RelativeBrauerGroup)(CC::Oscar.GrpCoh.CoChain{2, PermGroupElem, Oscar.GrpCoh.MultGrpElem{AbsSimpleNumFieldElem}})
    @ Oscar.GaloisCohomology_Mod ~/work/Oscar.jl/Oscar.jl/experimental/GModule/src/GaloisCohomology.jl:1575
 [19] (::Oscar.GaloisCohomology_Mod.var"#cocycle_to_elem#291")(C::Oscar.GrpCoh.CoChain{2, PermGroupElem, Oscar.GrpCoh.MultGrpElem{AbsSimpleNumFieldElem}})
    @ Oscar.GaloisCohomology_Mod ~/work/Oscar.jl/Oscar.jl/experimental/GModule/src/GaloisCohomology.jl:1722
 [20] (::Oscar.GaloisCohomology_Mod.var"#276#293"{Oscar.GaloisCohomology_Mod.var"#cocycle_to_elem#291"})(y::Oscar.GrpCoh.CoChain{2, PermGroupElem, Oscar.GrpCoh.MultGrpElem{AbsSimpleNumFieldElem}})
    @ Oscar.GaloisCohomology_Mod ~/work/Oscar.jl/Oscar.jl/experimental/GModule/src/GaloisCohomology.jl:1728
 [21] preimage(f::MapFromFunc{Oscar.GaloisCohomology_Mod.RelativeBrauerGroup, Oscar.GrpCoh.AllCoChains{2, PermGroupElem, Oscar.GrpCoh.MultGrpElem{AbsSimpleNumFieldElem}}}, y::Oscar.GrpCoh.CoChain{2, PermGroupElem, Oscar.GrpCoh.MultGrpElem{AbsSimpleNumFieldElem}})
    @ Hecke ~/.julia/packages/Hecke/LCgP9/src/Map/MapType.jl:202
 [22] (::Oscar.GaloisCohomology_Mod.RelativeBrauerGroup)(M::GModule{MatrixGroup{FqFieldElem, FqMatrix}, AbstractAlgebra.Generic.FreeModule{AbsSimpleNumFieldElem}})
    @ Oscar.GaloisCohomology_Mod ~/work/Oscar.jl/Oscar.jl/experimental/GModule/src/GaloisCohomology.jl:1735
 [23] top-level scope
    @ none:1

I don't think we had any releases of our dependencies and I did not see any differences for the package version between the first run on master
https://github.com/oscar-system/Oscar.jl/actions/runs/10560179378/job/29253105967
and the rerun
https://github.com/oscar-system/Oscar.jl/actions/runs/10560179378/job/29298281640

Only the julia version changed from 1.11.0-rc2.60 (0e423987803) to 1.11.0-rc3 (616e45539db) but but the only difference between those two is the version name since 0e423987803 is the merge of the rc3 backports.

I was unable to reproduce this locally.

cc: @Sequenzer

@benlorenz benlorenz added the bug Something isn't working label Aug 27, 2024
@thofma
Copy link
Collaborator

thofma commented Aug 27, 2024

We had new releases for Nemo and AA yesterday, but it seems to not be the cause, as the versions agree in both runs.

@thofma
Copy link
Collaborator

thofma commented Aug 27, 2024

With the help of @benlorenz I could reproduce it locally. I don't quite now why it started to happen now, but it seems to come down to something like the following:

julia> K, a = quadratic_field(5);

julia> P = prime_decomposition(maximal_order(K), 5)[1][1];

julia> C, mC = completion(K, P);

julia> K, mK = residue_field(C);

julia> X = Hecke.ArtinSchreierSolveCtx(K, 5);

julia> Hecke.frobenius_equation(X, K(1))
ERROR: Cannot promote to common finite field
Stacktrace:

@fieker: This should work, right?

@benlorenz Do you have both and rc2/rc3 around? If so, can you try if this also throws an error? (I don't know why it should work, but since the julia version change is our only hint so far, we should try it.)

@fieker
Copy link
Contributor

fieker commented Aug 28, 2024 via email

@benlorenz
Copy link
Member Author

@benlorenz Do you have both and rc2/rc3 around? If so, can you try if this also throws an error? (I don't know why it should work, but since the julia version change is our only hint so far, we should try it.)

This code seems to fail for rc3, rc2 and also 1.10.4.

@thofma
Copy link
Collaborator

thofma commented Aug 28, 2024

Thanks for checking. I am working on a fix.

@thofma thofma self-assigned this Aug 28, 2024
@thofma
Copy link
Collaborator

thofma commented Aug 28, 2024

Should be fixed with Nemocas/Nemo.jl#1845

@lgoettgens
Copy link
Member

Nemocas/Nemo.jl#1845 is now available in CI as Nemo v0.46.2. I restarted the same CI job as in the initial comment to see if the fix works: https://github.com/oscar-system/Oscar.jl/actions/runs/10560179378/job/29379752468

@thofma
Copy link
Collaborator

thofma commented Aug 28, 2024

Seems to be fixed, see for example https://github.com/oscar-system/Oscar.jl/actions/runs/10600630264.

@thofma thofma closed this as completed Aug 28, 2024
@thofma
Copy link
Collaborator

thofma commented Aug 28, 2024

Maybe we should bump the Nemo version in the Project.toml for good measure?

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

Successfully merging a pull request may close this issue.

4 participants