mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-19 15:25:29 +01:00
(==) and hash functions for AutGroups
This commit is contained in:
parent
bfa1ad73ef
commit
cb47c62f5d
@ -4,6 +4,7 @@ using Groups
|
|||||||
using Permutations
|
using Permutations
|
||||||
|
|
||||||
import Base: inv
|
import Base: inv
|
||||||
|
import Groups: IdSymbol, change_pow, GWord, ==, hash, reduce!
|
||||||
|
|
||||||
export IDSymbol, AutSymbol, AutWord
|
export IDSymbol, AutSymbol, AutWord
|
||||||
export rmul_AutSymbol, lmul_AutSymbol, flip_AutSymbol, symmetric_AutSymbol
|
export rmul_AutSymbol, lmul_AutSymbol, flip_AutSymbol, symmetric_AutSymbol
|
||||||
@ -14,6 +15,8 @@ immutable AutSymbol <: GSymbol
|
|||||||
ex::Expr
|
ex::Expr
|
||||||
end
|
end
|
||||||
|
|
||||||
|
(==)(s::AutSymbol, t::AutSymbol) = s.gen == t.gen && s.pow == t.pow
|
||||||
|
hash(s::AutSymbol, h::UInt) = hash(s.gen, hash(s.pow, hash(:AutSymbol, h)))
|
||||||
IDSymbol(::Type{AutSymbol}) = AutSymbol("(id)", 0, :(IDAutomorphism(N)))
|
IDSymbol(::Type{AutSymbol}) = AutSymbol("(id)", 0, :(IDAutomorphism(N)))
|
||||||
|
|
||||||
change_pow(s::AutSymbol, n::Int) = reduce(AutSymbol(s.gen, n, s.ex))
|
change_pow(s::AutSymbol, n::Int) = reduce(AutSymbol(s.gen, n, s.ex))
|
||||||
|
Loading…
Reference in New Issue
Block a user