make id always have length 0

This commit is contained in:
kalmarek 2018-03-28 12:21:50 +02:00
parent f493ed7283
commit e6b1b2a663
3 changed files with 3 additions and 3 deletions

View File

@ -58,7 +58,7 @@ FPGroup(H::FreeGroup) = FPGroup([FPSymbol(s) for s in H.gens])
###############################################################################
function (G::FPGroup)()
id = FPGroupElem(FPSymbol("", 0))
id = FPGroupElem(FPSymbol[])
id.parent = G
return id
end

View File

@ -53,7 +53,7 @@ FreeGroup(a::Vector{String}) = FreeGroup([FreeSymbol(i) for i in a])
###############################################################################
function (G::FreeGroup)()
id = FreeGroupElem(FreeSymbol("", 0))
id = FreeGroupElem(FreeSymbol[])
id.parent = G
return id
end

View File

@ -76,7 +76,7 @@ end
end
@testset "reductions" begin
@test length(G().symbols) == 1
@test length(G().symbols) == 0
@test length((G()*G()).symbols) == 0
@test G() == G()*G()
w = deepcopy(s)