Skip to content

Commit

Permalink
improve isomorphism(FPGroup, G, on_gens = true) (#3617)
Browse files Browse the repository at this point in the history
improve `isomorphism(FPGroup, G)` in the situation that the
generators of G form a pcgs, for example if `gens(G)` is the
tail of the defining pcgs of the full pc group that contains
`G`. (Perhaps this should be supported also in GAP.)
  • Loading branch information
ThomasBreuer authored Apr 22, 2024
1 parent 24849e3 commit 8301b1c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Groups/homomorphisms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,19 @@ function isomorphism(::Type{FPGroup}, G::GAPGroup; on_gens::Bool=false)
f = GAP.Globals.GroupHomomorphismByImages(G.X, GAP.Globals.FreeGroup(0), GAP.Obj([]), GAP.Obj([]))
GAP.Globals.SetIsBijective(f, true)
else
# The computations are easy if `Ggens` is a pcgs,
# otherwise GAP will call `CoKernel`.
if GAP.Globals.HasFamilyPcgs(G.X)
pcgs = GAP.Globals.InducedPcgsWrtFamilyPcgs(G.X)
if pcgs == Ggens
# `pcgs` fits *and* is an object in `GAP.Globals.IsPcgs`,
# for which a special `GAPWrap.IsomorphismFpGroupByGenerators`
# method is applicable.
# (Currently the alternative is a cokernel computation.
# It might be useful to improve this on the GAP side.)
Ggens = pcgs
end
end
f = GAPWrap.IsomorphismFpGroupByGenerators(G.X, Ggens)
end
else
Expand Down

0 comments on commit 8301b1c

Please sign in to comment.