Skip to content

Commit

Permalink
call GAP's ImagesRepresentative instead of Image (oscar-system#3649)
Browse files Browse the repository at this point in the history
The point is that the mapping on the GAP side may be not single-valued.
(For example, it can be an "inverse" of an epimorphism.)

Oscar uses `preimage` with the meaning of GAP's `PreImagesRepresentative`,
thus `ImagesRepresentative` should be used in the other direction.
In the same way as
  • Loading branch information
ThomasBreuer authored Apr 29, 2024
1 parent e623c10 commit 8e076d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/GAP/wrappers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ GAP.@wrap HasSize(x::Any)::Bool
GAP.@wrap Identity(x::GapObj)::GapObj
GAP.@wrap Image(x::Any)::GapObj
GAP.@wrap Image(x::Any, y::Any)::GapObj
GAP.@wrap ImagesRepresentative(x::GapObj, y::Any)::GAP.Obj
GAP.@wrap ImmutableMatrix(x::GapObj, y::GapObj, z::Bool)::GapObj
GAP.@wrap IndependentGeneratorExponents(x::Any, y::Any)::GapObj
GAP.@wrap Indeterminate(x::GapObj)::GapObj
Expand Down
4 changes: 2 additions & 2 deletions src/Groups/homomorphisms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ Base.:^(x::GAPGroupElem,f::GAPGroupHomomorphism) = image(f,x)
Return `f`(`x`).
"""
function image(f::GAPGroupHomomorphism, x::GAPGroupElem)
return group_element(codomain(f), GAPWrap.Image(f.map,x.X))
return group_element(codomain(f), GAPWrap.ImagesRepresentative(f.map, x.X))
end

"""
Expand Down Expand Up @@ -1109,7 +1109,7 @@ function apply_automorphism(f::GAPGroupElem{AutomorphismGroup{T}}, x::GAPGroupEl
if check
@assert A.G == G || x.X in A.G.X "Not in the domain of f!" #TODO Do we really need the IN check?
end
return typeof(x)(G, GAPWrap.Image(f.X,x.X))
return typeof(x)(G, GAPWrap.ImagesRepresentative(f.X, x.X))
end

Base.:*(f::GAPGroupElem{AutomorphismGroup{T}}, g::GAPGroupHomomorphism) where T = hom(f)*g
Expand Down

0 comments on commit 8e076d8

Please sign in to comment.