1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-08-08 15:58:53 +02:00

remove free_groups.jl

This commit is contained in:
kalmar 2017-05-11 18:13:11 +02:00
parent a54ebbcede
commit cbfc3979bb

View File

@ -1,22 +0,0 @@
import Base: convert
export FGSymbol, FGWord
immutable FGSymbol <: GSymbol
gen::String
pow::Int
end
(==)(s::FGSymbol, t::FGSymbol) = s.gen == t.gen && s.pow == t.pow
hash(s::FGSymbol, h::UInt) = hash(s.gen, hash(s.pow, hash(:FGSymbol, h)))
IdSymbol(::Type{FGSymbol}) = FGSymbol("(id)", 0)
FGSymbol(x::String) = FGSymbol(x,1)
convert(::Type{FGSymbol}, x::String) = FGSymbol(x)
change_pow(s::FGSymbol, n::Int) = (n==0 ? i=one(s) : FGSymbol(s.gen, n))
inv(s::FGSymbol) = change_pow(s, -s.pow)
typealias FGWord GWord{FGSymbol}
FGWord(s::FGSymbol) = FGWord([s])