diff --git a/src/AutGroup.jl b/src/AutGroup.jl index 2fd2185..232d98d 100644 --- a/src/AutGroup.jl +++ b/src/AutGroup.jl @@ -294,7 +294,7 @@ function reduce!(w::Automorphism) while !reduced reduced = simplifyperms!(Bool, w) && freereduce!(Bool, w) end - return W + return w end ############################################################################### diff --git a/test/AutGroup-tests.jl b/test/AutGroup-tests.jl index b4e5a63..7b29949 100644 --- a/test/AutGroup-tests.jl +++ b/test/AutGroup-tests.jl @@ -182,6 +182,15 @@ g_im = g(Groups.domain(A)) @test length.(g_im) == (1,1,1,1) + + g = A(Groups.σ(perm"(1,2)(4)")) + h = A(Groups.σ(perm"(2,3,4)")) + @test g*h isa Groups.Automorphism{4} + f = g*h + Groups + @test Groups.syllablelength(f) == 2 + @test Groups.reduce!(f) isa Groups.Automorphism{4} + @test Groups.syllablelength(f) == 1 end @testset "specific Aut(F4) tests" begin