add -X flag for computations over SL(3,Z[X])
This commit is contained in:
parent
85841c9399
commit
aa2d0083d3
39
SL_orbit.jl
39
SL_orbit.jl
@ -38,10 +38,10 @@ end
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
function E(i::Int, j::Int, M::MatSpace)
|
function E(i::Int, j::Int, M::MatSpace, val=one(M.base_ring))
|
||||||
@assert i≠j
|
@assert i≠j
|
||||||
m = one(M)
|
m = one(M)
|
||||||
m[i,j] = m[1,1]
|
m[i,j] = val
|
||||||
return m
|
return m
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -53,24 +53,26 @@ function SLsize(n,p)
|
|||||||
return div(result, p-1)
|
return div(result, p-1)
|
||||||
end
|
end
|
||||||
|
|
||||||
function SL_generatingset(n::Int)
|
function SL_generatingset(n::Int, X::Bool=false)
|
||||||
indexing = [(i,j) for i in 1:n for j in 1:n if i≠j]
|
indexing = [(i,j) for i in 1:n for j in 1:n if i≠j]
|
||||||
G = MatrixSpace(ZZ, n, n)
|
G = MatrixSpace(ZZ, n, n)
|
||||||
S = [E(i,j,G) for (i,j) in indexing]
|
if X
|
||||||
S = vcat(S, [transpose(x) for x in S])
|
S = [E(i,j,G,v) for (i,j) in indexing for v in [1, 100]]
|
||||||
S = vcat(S, [inv(x) for x in S])
|
else
|
||||||
return G, unique(S)
|
S = [E(i,j,G,v) for (i,j) in indexing for v in [1]]
|
||||||
|
end
|
||||||
|
S = vcat(S, [inv(x) for x in S])
|
||||||
|
return G, unique(S)
|
||||||
end
|
end
|
||||||
|
|
||||||
function SL_generatingset(n::Int, p::Int)
|
function SL_generatingset(n::Int, p::Int, X::Bool=false)
|
||||||
p == 0 && return SL_generatingset(n)
|
p == 0 && return SL_generatingset(n, X)
|
||||||
(p > 1 && n > 1) || throw("Both n and p should be positive integers!")
|
(p > 1 && n > 1) || throw("Both n and p should be positive integers!")
|
||||||
info("Size(SL($n,$p)) = $(SLsize(n,p))")
|
info("Size(SL($n,$p)) = $(SLsize(n,p))")
|
||||||
F = ResidueRing(ZZ, p)
|
F = ResidueRing(ZZ, p)
|
||||||
G = MatrixSpace(F, n, n)
|
G = MatrixSpace(F, n, n)
|
||||||
indexing = [(i,j) for i in 1:n for j in 1:n if i≠j]
|
indexing = [(i,j) for i in 1:n for j in 1:n if i≠j]
|
||||||
S = [E(i, j, G) for (i,j) in indexing]
|
S = [E(i, j, G, v) for (i,j) in indexing]
|
||||||
S = vcat(S, [transpose(x) for x in S])
|
|
||||||
S = vcat(S, [inv(x) for x in S])
|
S = vcat(S, [inv(x) for x in S])
|
||||||
return G, unique(S)
|
return G, unique(S)
|
||||||
end
|
end
|
||||||
@ -113,6 +115,9 @@ function parse_commandline()
|
|||||||
help = "Find the decomposition over B_r(e,S)"
|
help = "Find the decomposition over B_r(e,S)"
|
||||||
arg_type = Int
|
arg_type = Int
|
||||||
default = 2
|
default = 2
|
||||||
|
"-X"
|
||||||
|
help = "Matrices are over ZZ⟨X⟩"
|
||||||
|
action = :store_true
|
||||||
end
|
end
|
||||||
|
|
||||||
return parse_args(settings)
|
return parse_args(settings)
|
||||||
@ -131,7 +136,11 @@ function main()
|
|||||||
p = parsed_args["p"]
|
p = parsed_args["p"]
|
||||||
|
|
||||||
if p == 0
|
if p == 0
|
||||||
dirname = "oSL$(N)Z"
|
if parsed_args["X"]
|
||||||
|
dirname = "oSL$(N)Z⟨X⟩"
|
||||||
|
else
|
||||||
|
dirname = "oSL$(N)Z"
|
||||||
|
end
|
||||||
else
|
else
|
||||||
dirname = "oSL$(N)_$p"
|
dirname = "oSL$(N)_$p"
|
||||||
end
|
end
|
||||||
@ -151,7 +160,7 @@ function main()
|
|||||||
info(logger, "Precision: $tol")
|
info(logger, "Precision: $tol")
|
||||||
info(logger, "Upper bound: $upper_bound")
|
info(logger, "Upper bound: $upper_bound")
|
||||||
|
|
||||||
G, S = SL_generatingset(N, p)
|
G, S = SL_generatingset(N, p, parsed_args["X"])
|
||||||
info(logger, G)
|
info(logger, G)
|
||||||
info(logger, "Symmetric generating set of size $(length(S))")
|
info(logger, "Symmetric generating set of size $(length(S))")
|
||||||
info(logger, S)
|
info(logger, S)
|
||||||
|
Loading…
Reference in New Issue
Block a user