mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-09-26 19:28:49 +02:00
fix imports/exports and Project.toml
This commit is contained in:
parent
9436301271
commit
fe347423d4
12
Project.toml
12
Project.toml
@ -7,22 +7,22 @@ version = "0.6.0"
|
|||||||
AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d"
|
AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d"
|
||||||
GroupsCore = "d5909c97-4eac-4ecc-a3dc-fdd0858a4120"
|
GroupsCore = "d5909c97-4eac-4ecc-a3dc-fdd0858a4120"
|
||||||
KnuthBendix = "c2604015-7b3d-4a30-8a26-9074551ec60a"
|
KnuthBendix = "c2604015-7b3d-4a30-8a26-9074551ec60a"
|
||||||
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
|
|
||||||
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
|
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
|
||||||
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
|
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
|
||||||
ThreadsX = "ac1d9e8a-700a-412c-b207-f0111f4b6c0d"
|
ThreadsX = "ac1d9e8a-700a-412c-b207-f0111f4b6c0d"
|
||||||
|
|
||||||
[compat]
|
[compat]
|
||||||
AbstractAlgebra = "^0.13.0, ^0.14.0, ^0.15.0"
|
AbstractAlgebra = "0.15, 0.16"
|
||||||
KnuthBendix = "^0.2.0"
|
|
||||||
GroupsCore = "^0.3"
|
GroupsCore = "^0.3"
|
||||||
|
KnuthBendix = "^0.2.0"
|
||||||
OrderedCollections = "1"
|
OrderedCollections = "1"
|
||||||
ThreadsX = "^0.1.0"
|
ThreadsX = "^0.1.0"
|
||||||
julia = "1.3, 1.4, 1.5"
|
julia = "1.3, 1.4, 1.5, 1.6"
|
||||||
|
|
||||||
[extras]
|
[extras]
|
||||||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
|
AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d"
|
||||||
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
|
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
|
||||||
|
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
|
||||||
|
|
||||||
[targets]
|
[targets]
|
||||||
test = ["Test", "BenchmarkTools"]
|
test = ["Test", "BenchmarkTools", "AbstractAlgebra"]
|
||||||
|
@ -9,7 +9,7 @@ import Random
|
|||||||
|
|
||||||
import OrderedCollections: OrderedSet
|
import OrderedCollections: OrderedSet
|
||||||
|
|
||||||
export AutomorphismGroup, FreeGroup, FreeGroup, FPGroup, FPGroupElement, SpecialAutomorphismGroup
|
export Alphabet, AutomorphismGroup, FreeGroup, FreeGroup, FPGroup, FPGroupElement, SpecialAutomorphismGroup
|
||||||
export alphabet, evaluate, word
|
export alphabet, evaluate, word
|
||||||
|
|
||||||
include("types.jl")
|
include("types.jl")
|
||||||
|
@ -105,4 +105,3 @@ function evaluate!(
|
|||||||
end
|
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)))`")
|
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)))`")
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ include("gersten_relations.jl")
|
|||||||
|
|
||||||
function SpecialAutomorphismGroup(F::FreeGroup; ordering = KnuthBendix.LenLex, kwargs...)
|
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)
|
A, rels = gersten_relations(n, commutative = false)
|
||||||
S = KnuthBendix.letters(A)[1:2(n^2-n)]
|
S = KnuthBendix.letters(A)[1:2(n^2-n)]
|
||||||
|
|
||||||
@ -15,6 +15,6 @@ end
|
|||||||
KnuthBendix.alphabet(G::AutomorphismGroup{<:FreeGroup}) = alphabet(rewriting(G))
|
KnuthBendix.alphabet(G::AutomorphismGroup{<:FreeGroup}) = alphabet(rewriting(G))
|
||||||
|
|
||||||
function relations(G::AutomorphismGroup{<:FreeGroup})
|
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))
|
return last(gersten_relations(n, commutative = false))
|
||||||
end
|
end
|
||||||
|
10
src/types.jl
10
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
|
## "Abstract" definitions
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@ -192,7 +184,7 @@ function FPGroup(
|
|||||||
@assert parent(lhs) === parent(rhs) === G
|
@assert parent(lhs) === parent(rhs) === G
|
||||||
end
|
end
|
||||||
word_rels = [word(lhs) => word(rhs) for (lhs, rhs) in [relations(G); rels]]
|
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...)
|
KnuthBendix.knuthbendix!(rws; kwargs...)
|
||||||
|
|
||||||
|
@ -146,8 +146,8 @@
|
|||||||
|
|
||||||
@testset "GroupsCore conformance" begin
|
@testset "GroupsCore conformance" begin
|
||||||
test_Group_interface(A)
|
test_Group_interface(A)
|
||||||
g = A(rand(1:length(KnuthBendix.alphabet(A)), 10))
|
g = A(rand(1:length(alphabet(A)), 10))
|
||||||
h = A(rand(1:length(KnuthBendix.alphabet(A)), 10))
|
h = A(rand(1:length(alphabet(A)), 10))
|
||||||
|
|
||||||
test_GroupElement_interface(g, h)
|
test_GroupElement_interface(g, h)
|
||||||
end
|
end
|
||||||
|
@ -2,7 +2,7 @@ using Test
|
|||||||
import AbstractAlgebra
|
import AbstractAlgebra
|
||||||
using Groups
|
using Groups
|
||||||
|
|
||||||
using KnuthBendix
|
import KnuthBendix: Word
|
||||||
|
|
||||||
using GroupsCore
|
using GroupsCore
|
||||||
include(joinpath(pathof(GroupsCore), "..", "..", "test", "conformance_test.jl"))
|
include(joinpath(pathof(GroupsCore), "..", "..", "test", "conformance_test.jl"))
|
||||||
|
Loading…
Reference in New Issue
Block a user