Merge remote-tracking branch 'origin/enh/radius' into 1703.09680v1

This commit is contained in:
kalmarek 2017-09-10 13:09:26 +02:00
commit 2feadb5c20
1 changed files with 30 additions and 9 deletions

39
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]
@ -45,20 +54,22 @@ function products{T}(U::AbstractVector{T}, V::AbstractVector{T})
return unique(result)
end
function ΔandSDPconstraints(Id, S; radius::Int=4)
k = div(radius,2)
lengths = Vector{Int}()
function ΔandSDPconstraints(Id, S, radius)
radius *=2
sizes = Vector{Int}()
S = vcat([Id], S)
B = S
push!(lengths,length(B))
push!(sizes,length(B))
for i in 2:radius
B = products(S, B);
push!(lengths, length(B))
push!(sizes, length(B))
end
println("Generated balls of sizes $sizes")
k = div(radius,2)
basis = B[1:lengths[k]]
basis = B[1:sizes[k]]
product_matrix = PropertyT.create_product_matrix(B,lengths[k]);
product_matrix = PropertyT.create_product_matrix(B, sizes[k]);
sdp_constraints = PropertyT.constraints_from_pm(product_matrix, length(B))
L_coeff = PropertyT.splaplacian_coeff(S, basis, length(B));
Δ = GroupAlgebraElement(L_coeff, product_matrix)
@ -113,6 +124,10 @@ function parse_commandline()
help = "Matrices over filed of p-elements (default: p=0 => over ZZ)"
arg_type = Int
default = 0
"--radius"
help = "Find the decomposition over B_r(e,S)"
arg_type = Int
default = 0
end
return parse_args(s)
@ -136,7 +151,13 @@ function main()
else
name = "SL$(N)_$p"
end
name = name*"-$(string(upper_bound))"
radius = parsed_args["radius"]
if radius == 0
name*"-$(string(upper_bound))"
radius = 2
else
name = name*"-$(string(upper_bound))-r=$radius"
end
S() = SL_generatingset(N, p)
if parsed_args["cpus"] nothing
@ -145,7 +166,7 @@ function main()
end
BLAS.set_num_threads(parsed_args["cpus"])
end
@time PropertyT.check_property_T(name, S, solver, upper_bound, tol)
@time PropertyT.check_property_T(name, S, solver, upper_bound, tol, radius)
return 0
end