From fe347423d48eff61a53ddbea3211025aee3f5d06 Mon Sep 17 00:00:00 2001 From: Marek Kaluba Date: Mon, 21 Jun 2021 19:14:42 +0200 Subject: [PATCH] fix imports/exports and Project.toml --- Project.toml | 12 ++++++------ src/Groups.jl | 2 +- src/autgroups.jl | 1 - src/groups/sautFn.jl | 4 ++-- src/types.jl | 10 +--------- test/AutFn.jl | 4 ++-- test/runtests.jl | 2 +- 7 files changed, 13 insertions(+), 22 deletions(-) diff --git a/Project.toml b/Project.toml index b4012e5..d12521b 100644 --- a/Project.toml +++ b/Project.toml @@ -7,22 +7,22 @@ version = "0.6.0" AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d" GroupsCore = "d5909c97-4eac-4ecc-a3dc-fdd0858a4120" KnuthBendix = "c2604015-7b3d-4a30-8a26-9074551ec60a" -LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" ThreadsX = "ac1d9e8a-700a-412c-b207-f0111f4b6c0d" [compat] -AbstractAlgebra = "^0.13.0, ^0.14.0, ^0.15.0" -KnuthBendix = "^0.2.0" +AbstractAlgebra = "0.15, 0.16" GroupsCore = "^0.3" +KnuthBendix = "^0.2.0" OrderedCollections = "1" ThreadsX = "^0.1.0" -julia = "1.3, 1.4, 1.5" +julia = "1.3, 1.4, 1.5, 1.6" [extras] -Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d" BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Test", "BenchmarkTools"] +test = ["Test", "BenchmarkTools", "AbstractAlgebra"] diff --git a/src/Groups.jl b/src/Groups.jl index 150d47f..93924cf 100644 --- a/src/Groups.jl +++ b/src/Groups.jl @@ -9,7 +9,7 @@ import Random import OrderedCollections: OrderedSet -export AutomorphismGroup, FreeGroup, FreeGroup, FPGroup, FPGroupElement, SpecialAutomorphismGroup +export Alphabet, AutomorphismGroup, FreeGroup, FreeGroup, FPGroup, FPGroupElement, SpecialAutomorphismGroup export alphabet, evaluate, word include("types.jl") diff --git a/src/autgroups.jl b/src/autgroups.jl index ef09005..d214005 100644 --- a/src/autgroups.jl +++ b/src/autgroups.jl @@ -105,4 +105,3 @@ function evaluate!( end evaluate!(t::NTuple{N, T}, s::GSymbol, A, tmp=one(first(t))) where {N, T} = throw("you need to implement `evaluate!(::$(typeof(t)), ::$(typeof(s)), ::Alphabet, tmp=one(first(t)))`") - diff --git a/src/groups/sautFn.jl b/src/groups/sautFn.jl index e6a22d9..c47612f 100644 --- a/src/groups/sautFn.jl +++ b/src/groups/sautFn.jl @@ -3,7 +3,7 @@ include("gersten_relations.jl") function SpecialAutomorphismGroup(F::FreeGroup; ordering = KnuthBendix.LenLex, kwargs...) - n = length(KnuthBendix.alphabet(F)) ÷ 2 + n = length(alphabet(F)) ÷ 2 A, rels = gersten_relations(n, commutative = false) S = KnuthBendix.letters(A)[1:2(n^2-n)] @@ -15,6 +15,6 @@ end KnuthBendix.alphabet(G::AutomorphismGroup{<:FreeGroup}) = alphabet(rewriting(G)) function relations(G::AutomorphismGroup{<:FreeGroup}) - n = length(KnuthBendix.alphabet(object(G))) ÷ 2 + n = length(alphabet(object(G))) ÷ 2 return last(gersten_relations(n, commutative = false)) end diff --git a/src/types.jl b/src/types.jl index 99631ca..bed9221 100644 --- a/src/types.jl +++ b/src/types.jl @@ -1,11 +1,3 @@ -using GroupsCore -# using Groups -# import Groups.AbstractFPGroup -import KnuthBendix -import KnuthBendix: AbstractWord, Alphabet, Word, RewritingSystem -import KnuthBendix: alphabet -using Random - ## "Abstract" definitions """ @@ -192,7 +184,7 @@ function FPGroup( @assert parent(lhs) === parent(rhs) === G end word_rels = [word(lhs) => word(rhs) for (lhs, rhs) in [relations(G); rels]] - rws = RewritingSystem(word_rels, O) + rws = KnuthBendix.RewritingSystem(word_rels, O) KnuthBendix.knuthbendix!(rws; kwargs...) diff --git a/test/AutFn.jl b/test/AutFn.jl index 567e2aa..a33dc65 100644 --- a/test/AutFn.jl +++ b/test/AutFn.jl @@ -146,8 +146,8 @@ @testset "GroupsCore conformance" begin test_Group_interface(A) - g = A(rand(1:length(KnuthBendix.alphabet(A)), 10)) - h = A(rand(1:length(KnuthBendix.alphabet(A)), 10)) + g = A(rand(1:length(alphabet(A)), 10)) + h = A(rand(1:length(alphabet(A)), 10)) test_GroupElement_interface(g, h) end diff --git a/test/runtests.jl b/test/runtests.jl index 5b689c8..e69bce8 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -2,7 +2,7 @@ using Test import AbstractAlgebra using Groups -using KnuthBendix +import KnuthBendix: Word using GroupsCore include(joinpath(pathof(GroupsCore), "..", "..", "test", "conformance_test.jl"))