diff --git a/src/matrix_groups/SLn.jl b/src/matrix_groups/SLn.jl index 5a783fa..72b9504 100644 --- a/src/matrix_groups/SLn.jl +++ b/src/matrix_groups/SLn.jl @@ -1,6 +1,6 @@ include("eltary_matrices.jl") -struct SpecialLinearGroup{N,T,R,A,S} <: MatrixGroup{N,T} +struct SpecialLinearGroup{N,T,R,A,S} <: AbstractMatrixGroup{N,T} base_ring::R alphabet::A gens::S diff --git a/src/matrix_groups/Spn.jl b/src/matrix_groups/Spn.jl index 6d98bae..98f556a 100644 --- a/src/matrix_groups/Spn.jl +++ b/src/matrix_groups/Spn.jl @@ -1,6 +1,6 @@ include("eltary_symplectic.jl") -struct SymplecticGroup{N,T,R,A,S} <: MatrixGroup{N,T} +struct SymplecticGroup{N,T,R,A,S} <: AbstractMatrixGroup{N,T} base_ring::R alphabet::A gens::S diff --git a/src/matrix_groups/abstract.jl b/src/matrix_groups/abstract.jl index 5e022f7..d90613b 100644 --- a/src/matrix_groups/abstract.jl +++ b/src/matrix_groups/abstract.jl @@ -1,5 +1,5 @@ -abstract type MatrixGroup{N,T} <: Groups.AbstractFPGroup end -const MatrixGroupElement{N,T} = Groups.AbstractFPGroupElement{<:MatrixGroup{N,T}} +abstract type AbstractMatrixGroup{N,T} <: Groups.AbstractFPGroup end +const MatrixGroupElement{N,T} = Groups.AbstractFPGroupElement{<:AbstractMatrixGroup{N,T}} Base.isone(g::MatrixGroupElement{N,T}) where {N,T} = isone(word(g)) || isone(matrix(g)) @@ -32,9 +32,9 @@ end function Base.rand( rng::Random.AbstractRNG, - rs::Random.SamplerTrivial{<:MatrixGroup}, + rs::Random.SamplerTrivial{<:AbstractMatrixGroup}, ) Mgroup = rs[] S = gens(Mgroup) - return prod(g -> rand(Bool) ? g : inv(g), rand(S, rand(1:30))) + return prod(g -> rand(rng, Bool) ? g : inv(g), rand(rng, S, rand(rng, 1:30))) end