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

Call GapObj instead of accessing chi.values (for group characters) or f.map (for group homomorphisms) #3681

Merged
merged 7 commits into from
May 14, 2024
4 changes: 2 additions & 2 deletions experimental/GModule/GModule.jl
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ function Oscar.natural_character(C::GModule{<:Any, <:AbstractAlgebra.FPModule{<:

vals = [GAP.Globals.BrauerCharacterValue(GAP.Obj(map(h, matrix(action(C, representative(x)))))) for x in ccl]

return Oscar.class_function(modtbl, GAPWrap.ClassFunction(Oscar.GAPTable(modtbl), Oscar.GapObj(vals)))
return Oscar.class_function(modtbl, GAPWrap.ClassFunction(GapObj(modtbl), GapObj(vals)))
end

function Oscar.sub(C::GModule{<:Any, <:AbstractAlgebra.FPModule{T}}, m::MatElem{T}) where {T <: FinFieldElem}
Expand Down Expand Up @@ -1528,7 +1528,7 @@ function Oscar.gmodule(::Type{FinGenAbGroup}, C::GModule{T, <:AbstractAlgebra.FP
end

function Oscar.gmodule(chi::Oscar.GAPGroupClassFunction)
f = GAP.Globals.IrreducibleAffordingRepresentation(chi.values)
f = GAP.Globals.IrreducibleAffordingRepresentation(GapObj(chi))
K = abelian_closure(QQ)[1]
g = GAP.Globals.List(GAP.Globals.GeneratorsOfGroup(GapObj(group(chi))), f)
z = map(x->matrix(map(y->map(K, y), g[x])), 1:GAP.Globals.Size(g))
Expand Down
2 changes: 1 addition & 1 deletion experimental/OrthogonalDiscriminants/src/theoretical.jl
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ function od_from_p_subgroup(chi::GAPGroupClassFunction, p::Int,
end

fus = filter(i -> pi[i] != 0, 1:number_of_conjugacy_classes(tbl))
res = Oscar.GAPWrap.ELMS_LIST(chi.values, GAP.GapObj(fus))
res = Oscar.GAPWrap.ELMS_LIST(GapObj(chi), GapObj(fus))

if l != 0
# possible shortcut:
Expand Down
12 changes: 6 additions & 6 deletions experimental/OrthogonalDiscriminants/src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ function possible_permutation_characters_from_sylow_subgroup(tbl::Oscar.GAPGroup
pos != nothing && return [induced_cyclic(tbl, [pos])[1]]

# Do we have the table of marks?
tom = GAP.Globals.TableOfMarks(Oscar.GAPTable(tbl))
tom = GAP.Globals.TableOfMarks(GapObj(tbl))
if tom != GAP.Globals.fail
pos = findfirst(x -> x == q, Vector{Int}(GAP.Globals.OrdersTom(tom)))
return [Oscar.class_function(tbl, GAP.Globals.PermCharsTom(Oscar.GAPTable(tbl), tom)[pos])]
return [Oscar.class_function(tbl, GAP.Globals.PermCharsTom(GapObj(tbl), tom)[pos])]
end

# Does the table have a nontrivial 'p'-core
Expand Down Expand Up @@ -193,7 +193,7 @@ function possible_permutation_characters_from_sylow_subgroup(tbl::Oscar.GAPGroup
for i in npos
pi[i] = index
end
pi = GAP.Globals.ClassFunction(Oscar.GAPTable(s), GapObj(pi, true))
pi = GAP.Globals.ClassFunction(GapObj(s), GapObj(pi, true))
return [Oscar.class_function(s, pi)^tbl]
else
# Try to recurse.
Expand All @@ -216,11 +216,11 @@ function possible_permutation_characters_from_sylow_subgroup(tbl::Oscar.GAPGroup
if cand != nothing
extcand = []
for pi in cand
pi = GAP.Globals.CompositionMaps(pi.values,
pi = GAP.Globals.CompositionMaps(GapObj(pi),
GAP.Globals.InverseMap(GapObj(fus)))
union!(extcand, [Oscar.class_function(tbl, x) for x in
GAP.Globals.PermChars(Oscar.GAPTable(tbl),
GAP.GapObj(Dict(:torso => pi), true))])
GAP.Globals.PermChars(GapObj(tbl),
GapObj(Dict(:torso => pi), true))])
end
if candlist == nothing
candlist = extcand
Expand Down
4 changes: 2 additions & 2 deletions experimental/SymmetricIntersections/src/representations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ end
Given a class function `chi` on a group `G`, return whether `chi` defines a
character of `G` (over its codomain).
"""
is_character(chi::Oscar.GAPGroupClassFunction) = GG.IsCharacter(GAPTable(parent(chi)), chi.values)::Bool
is_character(chi::Oscar.GAPGroupClassFunction) = GG.IsCharacter(GapObj(parent(chi)), GapObj(chi))::Bool

@doc raw"""
is_constituent(chi::T, nu::T) where T <: Oscar.GAPGroupClassFunction -> Bool
Expand Down Expand Up @@ -502,7 +502,7 @@ function irreducible_affording_representation(RR::RepRing{S, T}, chi::Oscar.GAPG
H = generators_underlying_group(RR)

# the GAP function which we rely on
rep = GG.IrreducibleAffordingRepresentation(chi.values)::GAP.GapObj
rep = GG.IrreducibleAffordingRepresentation(GapObj(chi))::GAP.GapObj

# we compute certain images than we will convert then.
# we use them then to construct the mapping in
Expand Down
14 changes: 14 additions & 0 deletions src/GAP/oscar_to_gap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,17 @@ function GAP.julia_to_gap(

return gapset
end

## TODO: remove the following once GAP.jl has it
## (This will be the case when the change from
## https://github.com/oscar-system/GAP.jl/pull/989
## will be available.)
using JSON3

function GAP.julia_to_gap(
obj::JSON3.Array,
recursion_dict::IdDict{Any,Any} = IdDict();
recursive::Bool = false)

return GAP.julia_to_gap(copy(obj), recursion_dict; recursive)
end
Loading
Loading