report size of SL(n,p)

This commit is contained in:
kalmar 2017-03-31 22:41:04 +02:00
parent 9697bdc71d
commit 508a2eaa93

9
SL.jl
View File

@ -23,9 +23,18 @@ function SL_generatingset(n::Int)
return unique(S), one(G)
end
function SLsize(n,p)
result = 1
for k in 0:n-1
result *= p^n - p^k
end
return div(result, p-1)
end
function SL_generatingset(n::Int, p::Int)
p == 0 && return SL_generatingset(n)
(p > 1 && n > 0) || throw(ArgumentError("Both n and p should be positive integers!"))
println("Size(SL(n,p)) = $(SLsize(n,p))")
F = Nemo.ResidueRing(Nemo.ZZ, p)
G = Nemo.MatrixSpace(F, n,n)
indexing = [(i,j) for i in 1:n for j in 1:n if i≠j]