mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-12-25 02:05:30 +01:00
use the new reduce for Automorphisms and FPWords
This commit is contained in:
parent
8688d42250
commit
bc1063f0fd
@ -361,20 +361,11 @@ function simplifyperms!(W::Automorphism{N}) where N
|
||||
return reduced
|
||||
end
|
||||
|
||||
function reduce!(W::Automorphism)
|
||||
if length(W) == 0
|
||||
return W
|
||||
elseif length(W.symbols) == 1
|
||||
deleteids!(W)
|
||||
else
|
||||
reduced = false
|
||||
while !reduced
|
||||
reduced = simplifyperms!(W) && freereduce!(W)
|
||||
end
|
||||
function reduce!(w::Automorphism)
|
||||
reduced = false
|
||||
while !reduced
|
||||
reduced = simplifyperms!(Bool, w) && freereduce!(Bool, w)
|
||||
end
|
||||
|
||||
W.modified = true
|
||||
|
||||
return W
|
||||
end
|
||||
|
||||
|
@ -134,17 +134,11 @@ end
|
||||
(*)(s::FPSymbol, W::FPGroupElem) = l_multiply(W, [s])
|
||||
|
||||
function reduce!(W::FPGroupElem)
|
||||
if length(W) < 2
|
||||
deleteat!(W.symbols, findall(x -> x.pow == 0, W.symbols))
|
||||
else
|
||||
reduced = false
|
||||
while !reduced
|
||||
reduced = freereduce!(W) || replace_all!(W, parent(W).rels)
|
||||
end
|
||||
reduced = false
|
||||
while !reduced
|
||||
W = replace(W, parent(W).rels)
|
||||
reduced = freereduce!(Bool, W)
|
||||
end
|
||||
|
||||
W.savedhash = hash(W.symbols, hash(typeof(W)))
|
||||
W.modified = false
|
||||
return W
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user