mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-12-25 02:05:30 +01:00
eliminate GWord and replace is_subsymbol by issubsymbol
This commit is contained in:
parent
3dcef3189e
commit
41abf789ef
@ -29,8 +29,8 @@ end
|
|||||||
s = Groups.FreeSymbol("s")
|
s = Groups.FreeSymbol("s")
|
||||||
t = Groups.FreeSymbol("t", -2)
|
t = Groups.FreeSymbol("t", -2)
|
||||||
|
|
||||||
@test isa(Groups.GWord(s), Groups.GWord)
|
@test isa(Groups.GroupWord(s), Groups.GWord{Groups.FreeSymbol})
|
||||||
@test isa(Groups.GWord(s), FreeGroupElem)
|
@test isa(Groups.GroupWord(s), FreeGroupElem)
|
||||||
@test isa(FreeGroupElem(s), Groups.GWord)
|
@test isa(FreeGroupElem(s), Groups.GWord)
|
||||||
@test isa(convert(FreeGroupElem, s), Groups.GWord)
|
@test isa(convert(FreeGroupElem, s), Groups.GWord)
|
||||||
@test isa(convert(FreeGroupElem, s), FreeGroupElem)
|
@test isa(convert(FreeGroupElem, s), FreeGroupElem)
|
||||||
@ -56,7 +56,7 @@ end
|
|||||||
|
|
||||||
@testset "internal arithmetic" begin
|
@testset "internal arithmetic" begin
|
||||||
|
|
||||||
@test_broken Vector{Groups.GWord}([s,t]) == [Groups.GWord(s), Groups.GWord(t)]
|
@test_broken Vector{Groups.FreeGroupElem}([s,t]) == [Groups.GroupWord(s), Groups.GroupWord(t)]
|
||||||
@test (s*s).symbols == (s^2).symbols
|
@test (s*s).symbols == (s^2).symbols
|
||||||
@test hash([t^1,s^1]) == hash([t^2*inv(t),s*inv(s)*s])
|
@test hash([t^1,s^1]) == hash([t^2*inv(t),s*inv(s)*s])
|
||||||
|
|
||||||
@ -111,10 +111,10 @@ end
|
|||||||
@testset "replacements" begin
|
@testset "replacements" begin
|
||||||
a = Groups.FreeSymbol("a")
|
a = Groups.FreeSymbol("a")
|
||||||
b = Groups.FreeSymbol("b")
|
b = Groups.FreeSymbol("b")
|
||||||
@test Groups.is_subsymbol(a, Groups.change_pow(a,2)) == true
|
@test Groups.issubsymbol(a, Groups.change_pow(a,2)) == true
|
||||||
@test Groups.is_subsymbol(a, Groups.change_pow(a,-2)) == false
|
@test Groups.issubsymbol(a, Groups.change_pow(a,-2)) == false
|
||||||
@test Groups.is_subsymbol(b, Groups.change_pow(a,-2)) == false
|
@test Groups.issubsymbol(b, Groups.change_pow(a,-2)) == false
|
||||||
@test Groups.is_subsymbol(inv(b), Groups.change_pow(b,-2)) == true
|
@test Groups.issubsymbol(inv(b), Groups.change_pow(b,-2)) == true
|
||||||
|
|
||||||
c = s*t*s^-1*t^-1
|
c = s*t*s^-1*t^-1
|
||||||
@test findfirst(c, s^-1*t^-1) == 3
|
@test findfirst(c, s^-1*t^-1) == 3
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
using Groups
|
using Groups
|
||||||
using Base.Test
|
using Base.Test
|
||||||
|
|
||||||
# write your own tests here
|
|
||||||
|
|
||||||
@testset "Groups" begin
|
@testset "Groups" begin
|
||||||
include("FreeGroup-tests.jl")
|
include("FreeGroup-tests.jl")
|
||||||
include("AutGroup-tests.jl")
|
include("AutGroup-tests.jl")
|
||||||
|
Loading…
Reference in New Issue
Block a user