mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-11-19 06:30:29 +01:00
make id always have length 0
This commit is contained in:
parent
f493ed7283
commit
e6b1b2a663
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user