mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-11-19 06:30:29 +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
|
return reduced
|
||||||
end
|
end
|
||||||
|
|
||||||
function reduce!(W::Automorphism)
|
function reduce!(w::Automorphism)
|
||||||
if length(W) == 0
|
reduced = false
|
||||||
return W
|
while !reduced
|
||||||
elseif length(W.symbols) == 1
|
reduced = simplifyperms!(Bool, w) && freereduce!(Bool, w)
|
||||||
deleteids!(W)
|
|
||||||
else
|
|
||||||
reduced = false
|
|
||||||
while !reduced
|
|
||||||
reduced = simplifyperms!(W) && freereduce!(W)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
W.modified = true
|
|
||||||
|
|
||||||
return W
|
return W
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -134,17 +134,11 @@ end
|
|||||||
(*)(s::FPSymbol, W::FPGroupElem) = l_multiply(W, [s])
|
(*)(s::FPSymbol, W::FPGroupElem) = l_multiply(W, [s])
|
||||||
|
|
||||||
function reduce!(W::FPGroupElem)
|
function reduce!(W::FPGroupElem)
|
||||||
if length(W) < 2
|
reduced = false
|
||||||
deleteat!(W.symbols, findall(x -> x.pow == 0, W.symbols))
|
while !reduced
|
||||||
else
|
W = replace(W, parent(W).rels)
|
||||||
reduced = false
|
reduced = freereduce!(Bool, W)
|
||||||
while !reduced
|
|
||||||
reduced = freereduce!(W) || replace_all!(W, parent(W).rels)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
W.savedhash = hash(W.symbols, hash(typeof(W)))
|
|
||||||
W.modified = false
|
|
||||||
return W
|
return W
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user