1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-12-26 02:20:30 +01:00

one(AutSymbol) is replaced by id_autsymbol

This commit is contained in:
kalmar 2017-05-12 21:18:38 +02:00
parent 639c05b4fa
commit 1284ded447

View File

@ -85,7 +85,7 @@ end
function perm_autsymbol(p::perm; pow::Int=1) function perm_autsymbol(p::perm; pow::Int=1)
if p == parent(p)() if p == parent(p)()
return one(AutSymbol) return id_autsymbol()
else else
gen = "σ"*join([subscriptify(i) for i in p]) gen = "σ"*join([subscriptify(i) for i in p])
return AutSymbol(gen, 1, :(σ($(p.d), 1)), σ(p, 1)) return AutSymbol(gen, 1, :(σ($(p.d), 1)), σ(p, 1))
@ -154,7 +154,7 @@ hash(s::AutSymbol, h::UInt) = hash(s.gen, hash(s.pow, hash(:AutSymbol, h)))
function change_pow(s::AutSymbol, n::Int) function change_pow(s::AutSymbol, n::Int)
if n == 0 if n == 0
return one(s) return id_autsymbol()
end end
symbol = s.ex.args[1] symbol = s.ex.args[1]
if symbol == if symbol ==
@ -226,7 +226,7 @@ function simplify_perms!(W::AutGroupElem)
end end
p1 = Permutation(getperm(current)) p1 = Permutation(getperm(current))
p2 = Permutation(getperm(next_s)) p2 = Permutation(getperm(next_s))
W.symbols[i] = one(AutSymbol) W.symbols[i] = id_autsymbol()
W.symbols[i+1] = symmetric_AutSymbol(array(p1*p2)) W.symbols[i+1] = symmetric_AutSymbol(array(p1*p2))
end end
end end