Merge branch '1703.09680v1' of git.wmi.amu.edu.pl:kalmar/GroupsWithPropertyT into 1703.09680v1

This commit is contained in:
kalmarek 2017-09-10 17:26:28 +02:00
commit 62aab2d4b8

42
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,19 @@ 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)
sizes = Vector{Int}()
S = vcat([Id], S)
B = S
push!(lengths,length(B))
for i in 2:radius
push!(sizes,length(B))
for i in 2:2*radius
B = products(S, B);
push!(lengths, length(B))
push!(sizes, length(B))
end
k = div(radius,2)
basis = B[1:lengths[k]]
println("Generated balls of sizes $sizes")
basis = B[1:sizes[radius]]
product_matrix = PropertyT.create_product_matrix(B,lengths[k]);
product_matrix = PropertyT.create_product_matrix(B, sizes[radius]);
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 +121,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,16 +148,22 @@ function main()
else
name = "SL$(N)_$p"
end
name = name*"-$(string(upper_bound))"
radius = parsed_args["radius"]
if radius == 0
name = 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
if parsed_args["cpus"] > cpuinfo_physicalcores()
warn("Number of specified cores exceeds the physical core cound. Performance will suffer.")
end
Blas.set_num_threads(parsed_args["cpus"])
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