You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Testing containment with in gives an error for matrix groups (over number fields) if the order of the group is known.
To Reproduce
julia> K, a = cyclotomic_field(12, "a")
(Cyclotomic field of order 12, a)
julia> K, a = cyclotomic_field(12, "a");
julia> G = matrix_group([K[a^2 0; 0 inv(a^2)], K[0 -1; 1 0]]);
julia> M = K[a^3 0; 0 a^-3];
julia> M in G
false
julia> order(G)
12
julia> M in G
ERROR: Error thrown by GAP: Error, ArgumentError: Element not in the group in
GAP_jl._apply( julia_obj, args ) at /home/johannes/.julia/packages/GAP/bMh5a/pkg/JuliaInterface/gap/calls.gi:15 called from
map!.fun( elm ) at /home/johannes/.julia/artifacts/553ff06be6f5ceb880f85c7905595c81d539bbf7/share/gap/lib/mapprep.gi:616 called from
ImagesRepresentative( nice, elm ) at /home/johannes/.julia/artifacts/553ff06be6f5ceb880f85c7905595c81d539bbf7/share/gap/lib/grpnice.gi:240 called from
<function "in by nice monomorphism">( <arguments> )
called from read-eval loop at *defin*:0
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] ThrowObserver(depth::Int32)
@ GAP ~/.julia/packages/GAP/bMh5a/src/GAP.jl:101
[3] _call_gap_func
@ ~/.julia/packages/GAP/bMh5a/src/ccalls.jl:356 [inlined]
[4] (::GapObj)(a1::GapObj, a2::GapObj)
@ GAP ~/.julia/packages/GAP/bMh5a/src/ccalls.jl:321
[5] IN(x::GapObj, y::GapObj)
@ GAP.Wrappers ~/.julia/packages/GAP/bMh5a/src/wrappers.jl:25
[6] in
@ ~/.julia/packages/GAP/bMh5a/src/adapter.jl:364 [inlined]
[7] lies_in(x::AbstractAlgebra.Generic.MatSpaceElem{…}, G::MatrixGroup{…}, x_gap::Nothing)
@ Oscar ~/.julia/dev/Oscar/src/Groups/matrices/MatGrp.jl:293
[8] in(x::AbstractAlgebra.Generic.MatSpaceElem{…}, G::MatrixGroup{…})
@ Oscar ~/.julia/dev/Oscar/src/Groups/matrices/MatGrp.jl:296
[9] top-level scope
@ REPL[8]:1
Some type information was truncated. Use `show(err)` to see complete types.
System (please complete the following information):
julia> Oscar.versioninfo(full=true)
OSCAR version 1.3.0-DEV - #master, 8fc7969f37 -- 2025-02-08 18:29:40 +0000
combining:
AbstractAlgebra.jl v0.44.5
GAP.jl v0.13.1
Hecke.jl v0.35.9
Nemo.jl v0.48.2
Polymake.jl v0.11.25
Singular.jl v0.24.1
building on:
FLINT_jll v300.100.301+0
GAP_jll v400.1400.3+0
Singular_jll v404.1.700+0
libpolymake_julia_jll v0.13.1+0
libsingular_julia_jll v0.46.1+0
polymake_jll v400.1300.2+0
See `]st -m` for a full list of dependencies.
Julia Version 1.11.3
Commit d63adeda50d (2025-01-21 19:42 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 16 × 12th Gen Intel(R) Core(TM) i5-1250P
WORD_SIZE: 64
LLVM: libLLVM-16.0.6 (ORCJIT, alderlake)
Threads: 1 default, 0 interactive, 1 GC (on 16 virtual cores)
Environment:
JULIA_EDITOR = vim
Official https://julialang.org/ release
Additional context
There is no issue if I revert #4525.
The text was updated successfully, but these errors were encountered:
InstallMethod( \in,
"by nice monomorphism",
IsElmsColls,
[ IsMultiplicativeElementWithInverse,
IsGroup and IsHandledByNiceMonomorphism ],
0,
function( elm, G )
local nice, img;
if HasGeneratorsOfGroup(G) and elm in GeneratorsOfGroup(G) thenreturntrue;
fi;
nice := NiceMonomorphism( G );
img := ImagesRepresentative( nice, elm:actioncanfail:=true ); # <-- error happens herereturn img<>failand img in NiceObject( G )
and PreImagesRepresentative( nice, img ) = elm;
end );
I marked the critical line: we invoke the nice monomorphism with an option that is meant to instruct it to return fail if the input is not in the target group, instead of raising an error.
My guess is that the maps introduced in PR #4525 don't respect this:
img =function(x)
returnGp(_reduce(matrix(x), OtoFq))
end...# map from Gap_G to Gap_Gp
fun = x ->GapObj(img(G(preimage_matrix(risoG, x); check=false)))
I do see check=false in the second map, but it calls img which doesn't do this. If I insert check=false there, it all works, but I suspect this isn't what we want in general.
The analysis is correct.
However, #4640 tries to solve the problem by avoiding the calls that require check=false:
For GAP, the map in question deals with matrices, embedding them into groups and then unpacking these group elements is in fact not needed.
Describe the bug
Testing containment with
in
gives an error for matrix groups (over number fields) if the order of the group is known.To Reproduce
System (please complete the following information):
Additional context
There is no issue if I revert #4525.
The text was updated successfully, but these errors were encountered: