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)()
|
function (G::FPGroup)()
|
||||||
id = FPGroupElem(FPSymbol("", 0))
|
id = FPGroupElem(FPSymbol[])
|
||||||
id.parent = G
|
id.parent = G
|
||||||
return id
|
return id
|
||||||
end
|
end
|
||||||
|
@ -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
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user