move ==(::GSymbol, ::GSymbol) to Groups.jl

This commit is contained in:
kalmarek 2018-04-09 13:00:50 +02:00
parent b8abe64656
commit f2fb7f53cd
4 changed files with 7 additions and 17 deletions

View File

@ -238,8 +238,6 @@ function hash(g::Automorphism, h::UInt)
return xor(g.savedhash, h)
end
(==)(s::AutSymbol, t::AutSymbol) = s.str == t.str && s.pow == t.pow
function (==)(g::Automorphism{N}, h::Automorphism{N}) where N
parent(g) == parent(h) || return false

View File

@ -119,13 +119,6 @@ end
#
###############################################################################
function (==)(s::FPSymbol, t::FPSymbol)
isone(s) && isone(t) && return true
s.str == t.str || return false
s.pow == t.pow || return false
return true
end
###############################################################################
#
# Inversion

View File

@ -101,14 +101,6 @@ end
#
###############################################################################
function (==)(s::FreeSymbol, t::FreeSymbol)
s.pow == t.pow || return false
s.pow == 0 && return true
s.str == t.str || return false
return true
end
###############################################################################
#
# Inversion

View File

@ -213,6 +213,13 @@ function (==)(W::GWord, Z::GWord)
return W.symbols == Z.symbols
end
function (==)(s::GSymbol, t::GSymbol)
s.pow == t.pow || return false
s.pow == 0 && return true
s.str == t.str || return false
return true
end
###############################################################################
#
# Binary operators