1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-11-19 06:30:29 +01:00

(^) returns GWord _always_

This commit is contained in:
kalmar 2017-01-24 10:40:21 +01:00
parent c9d801eae8
commit 192430a6c7

View File

@ -1,5 +1,6 @@
using Permutations
import Base: convert
export AutSymbol, AutWord, rmul_AutSymbol, lmul_AutSymbol, flip_AutSymbol, symmetric_AutSymbol
immutable AutSymbol <: GSymbol
@ -37,7 +38,6 @@ function change_pow(s::AutSymbol, n::Int)
end
inv(f::AutSymbol) = change_pow(f, -1*f.pow)
(^)(s::AutSymbol, n::Integer) = change_pow(s, s.pow*n)
function rmul_AutSymbol(i,j; pow::Int=1)
gen = string('ϱ',Char(8320+i), Char(8320+j)...)
@ -76,6 +76,8 @@ end
typealias AutWord GWord{AutSymbol}
convert(::Type{AutWord}, s::AutSymbol) = GWord(s)
function simplify_perms!(W::AutWord)
reduced = true
for i in 1:length(W.symbols) - 1