PermGroup is iterable in AbstractAlgebra master

This commit is contained in:
kalmarek 2018-09-21 18:10:34 +02:00
parent 0286ca7c4d
commit e28c296bce
3 changed files with 4 additions and 2 deletions

View File

@ -165,7 +165,7 @@ function AutGroup(G::FreeGroup; special=false)
if !special
flips = [flip_autsymbol(i) for i in 1:n]
syms = [perm_autsymbol(p) for p in elements(PermutationGroup(n))][2:end]
syms = [perm_autsymbol(p) for p in PermutationGroup(n)][2:end]
append!(S, [flips; syms])

View File

@ -11,6 +11,8 @@ import Base: inv, reduce, *, ^, power_by_squaring
import Base: findfirst, findnext
import Base: deepcopy_internal
export elements
using LinearAlgebra
using Markdown

View File

@ -202,7 +202,7 @@ matrix_repr(g::WreathProductElem) = Any[matrix_repr(g.p) g.n]
function elements(G::WreathProduct)
Nelts = collect(elements(G.N))
Pelts = collect(elements(G.P))
Pelts = collect(G.P)
return (WreathProductElem(n, p, false) for n in Nelts, p in Pelts)
end