mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2025-01-08 13:22:33 +01:00
simplify parametrisation of SLn and Spn
This commit is contained in:
parent
116439d074
commit
40cd92e3c4
@ -1,25 +1,26 @@
|
|||||||
include("eltary_matrices.jl")
|
include("eltary_matrices.jl")
|
||||||
|
|
||||||
struct SpecialLinearGroup{N,T,R,A,S} <: AbstractMatrixGroup{N,T}
|
struct SpecialLinearGroup{N,T,R,S} <: AbstractMatrixGroup{N,T}
|
||||||
base_ring::R
|
base_ring::R
|
||||||
alphabet::A
|
alphabet::Alphabet{S}
|
||||||
gens::S
|
gens::Vector{S}
|
||||||
|
|
||||||
function SpecialLinearGroup{N}(base_ring) where {N}
|
function SpecialLinearGroup{N}(base_ring) where {N}
|
||||||
S = [ElementaryMatrix{N}(i, j, one(base_ring)) for i in 1:N for j in 1:N if i ≠ j]
|
S = [
|
||||||
|
ElementaryMatrix{N}(i, j, one(base_ring)) for i in 1:N for
|
||||||
|
j in 1:N if i ≠ j
|
||||||
|
]
|
||||||
alphabet = Alphabet(S)
|
alphabet = Alphabet(S)
|
||||||
|
|
||||||
return new{
|
T = eltype(base_ring)
|
||||||
N,
|
R = typeof(base_ring)
|
||||||
eltype(base_ring),
|
St = eltype(S)
|
||||||
typeof(base_ring),
|
|
||||||
typeof(alphabet),
|
return new{N,T,R,St}(base_ring, alphabet, S)
|
||||||
typeof(S)
|
|
||||||
}(base_ring, alphabet, S)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
GroupsCore.ngens(SL::SpecialLinearGroup{N}) where {N} = N^2 - N
|
GroupsCore.ngens(SL::SpecialLinearGroup) = length(SL.gens)
|
||||||
|
|
||||||
function Base.show(io::IO, ::SpecialLinearGroup{N,T}) where {N,T}
|
function Base.show(io::IO, ::SpecialLinearGroup{N,T}) where {N,T}
|
||||||
return print(io, "SL{$N,$T}")
|
return print(io, "SL{$N,$T}")
|
||||||
|
@ -1,21 +1,19 @@
|
|||||||
include("eltary_symplectic.jl")
|
include("eltary_symplectic.jl")
|
||||||
|
|
||||||
struct SymplecticGroup{N,T,R,A,S} <: AbstractMatrixGroup{N,T}
|
struct SymplecticGroup{N,T,R,S} <: AbstractMatrixGroup{N,T}
|
||||||
base_ring::R
|
base_ring::R
|
||||||
alphabet::A
|
alphabet::Alphabet{S}
|
||||||
gens::S
|
gens::Vector{S}
|
||||||
|
|
||||||
function SymplecticGroup{N}(base_ring) where {N}
|
function SymplecticGroup{N}(base_ring) where {N}
|
||||||
S = symplectic_gens(N, eltype(base_ring))
|
S = symplectic_gens(N, eltype(base_ring))
|
||||||
alphabet = Alphabet(S)
|
alphabet = Alphabet(S)
|
||||||
|
|
||||||
return new{
|
T = eltype(base_ring)
|
||||||
N,
|
R = typeof(base_ring)
|
||||||
eltype(base_ring),
|
St = eltype(S)
|
||||||
typeof(base_ring),
|
|
||||||
typeof(alphabet),
|
return new{N,T,R,St}(base_ring, alphabet, S)
|
||||||
typeof(S)
|
|
||||||
}(base_ring, alphabet, S)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user