From 508a2eaa93eeb7545362664f8443b0bc861d571f Mon Sep 17 00:00:00 2001 From: kalmar Date: Fri, 31 Mar 2017 22:41:04 +0200 Subject: [PATCH] report size of SL(n,p) --- SL.jl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/SL.jl b/SL.jl index f0c1185..17e14e9 100644 --- a/SL.jl +++ b/SL.jl @@ -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]