Skip to content

Commit

Permalink
improve isomorphism(FPGroup, abelian_group(...)) (#3572)
Browse files Browse the repository at this point in the history
Use known information instead of checking it.
  • Loading branch information
ThomasBreuer authored Apr 9, 2024
1 parent 1e61377 commit 05ec2fa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Groups/homomorphisms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -736,8 +736,9 @@ function isomorphism(::Type{FPGroup}, A::FinGenAbGroup)
s = vcat(elem_type(G)[i*j*inv(i)*inv(j) for i = gens(G) for j = gens(G) if i != j],
elem_type(G)[prod([gen(G, i)^R[j,i] for i=1:ngens(A) if !iszero(R[j,i])], init = one(G)) for j=1:nrows(R)])
F, mF = quo(G, s)
@assert is_finite(A) == is_finite(F)
is_finite(A) && @assert order(A) == order(F)
set_is_abelian(F, true)
set_is_finite(F, is_finite(A))
is_finite(A) && set_order(F, order(A))
return MapFromFunc(
A, F,
y->F([i => y[i] for i=1:ngens(A)]),
Expand Down

0 comments on commit 05ec2fa

Please sign in to comment.