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

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)() function (G::FPGroup)()
id = FPGroupElem(FPSymbol("", 0)) id = FPGroupElem(FPSymbol[])
id.parent = G id.parent = G
return id return id
end end

View File

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

View File

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