2017-03-27 22:43:58 +02:00
|
|
|
|
using ArgParse
|
|
|
|
|
|
2017-06-06 12:04:48 +02:00
|
|
|
|
using Nemo
|
|
|
|
|
Nemo.setpermstyle(:cycles)
|
|
|
|
|
|
2017-03-13 16:18:42 +01:00
|
|
|
|
using Groups
|
2017-06-06 12:04:48 +02:00
|
|
|
|
using GroupRings
|
2017-03-27 22:43:58 +02:00
|
|
|
|
using PropertyT
|
|
|
|
|
|
|
|
|
|
import SCS.SCSSolver
|
2017-03-13 16:18:42 +01:00
|
|
|
|
|
|
|
|
|
#=
|
|
|
|
|
Note that the element
|
|
|
|
|
α(i,j,k) = ϱ(i,j)*ϱ(i,k)*inv(ϱ(i,j))*inv(ϱ(i,k)),
|
|
|
|
|
which surely belongs to ball of radius 4 in Aut(F₄) becomes trivial under the representation
|
|
|
|
|
Aut(F₄) → GL₄(ℤ)⋉ℤ⁴ → GL₅(ℂ).
|
|
|
|
|
Moreover, due to work of Potapchik and Rapinchuk [1] every real representation of Aut(Fₙ) into GLₘ(ℂ) (for m ≤ 2n-2) factors through GLₙ(ℤ)⋉ℤⁿ, so will have the same problem.
|
|
|
|
|
|
|
|
|
|
We need a different approach: Here we actually compute in Aut(𝔽₄)
|
|
|
|
|
=#
|
|
|
|
|
|
2017-03-27 22:43:58 +02:00
|
|
|
|
function cpuinfo_physicalcores()
|
|
|
|
|
maxcore = -1
|
|
|
|
|
for line in eachline("/proc/cpuinfo")
|
|
|
|
|
if startswith(line, "core id")
|
|
|
|
|
maxcore = max(maxcore, parse(Int, split(line, ':')[2]))
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
maxcore < 0 && error("failure to read core ids from /proc/cpuinfo")
|
|
|
|
|
return maxcore + 1
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function parse_commandline()
|
|
|
|
|
s = ArgParseSettings()
|
|
|
|
|
|
|
|
|
|
@add_arg_table s begin
|
|
|
|
|
"--tol"
|
|
|
|
|
help = "set numerical tolerance for the SDP solver (default: 1e-5)"
|
|
|
|
|
arg_type = Float64
|
|
|
|
|
default = 1e-5
|
|
|
|
|
"--iterations"
|
|
|
|
|
help = "set maximal number of iterations for the SDP solver (default: 20000)"
|
|
|
|
|
arg_type = Int
|
|
|
|
|
default = 20000
|
|
|
|
|
"--upper-bound"
|
|
|
|
|
help = "Set an upper bound for the spectral gap (default: Inf)"
|
|
|
|
|
arg_type = Float64
|
|
|
|
|
default = Inf
|
|
|
|
|
"--cpus"
|
|
|
|
|
help = "Set number of cpus used by solver (default: auto)"
|
|
|
|
|
arg_type = Int
|
|
|
|
|
required = false
|
|
|
|
|
"-N"
|
|
|
|
|
help = "Consider automorphisms of free group on N generators (default: N=3)"
|
|
|
|
|
arg_type = Int
|
2017-06-06 12:04:48 +02:00
|
|
|
|
default = 2
|
2017-03-27 22:43:58 +02:00
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
return parse_args(s)
|
|
|
|
|
end
|
|
|
|
|
|
2017-03-13 16:18:42 +01:00
|
|
|
|
|
|
|
|
|
# const name = "SYM$N"
|
|
|
|
|
# const upper_bound=factorial(N)-TOL^(1/5)
|
|
|
|
|
# S() = generating_set_of_Sym(N)
|
|
|
|
|
|
|
|
|
|
# name = "AutF$N"
|
|
|
|
|
# S() = generating_set_of_AutF(N)
|
|
|
|
|
|
2017-03-27 22:43:58 +02:00
|
|
|
|
function main()
|
2017-06-06 12:04:48 +02:00
|
|
|
|
|
2017-03-27 22:43:58 +02:00
|
|
|
|
parsed_args = parse_commandline()
|
|
|
|
|
|
2017-06-06 12:04:48 +02:00
|
|
|
|
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"])
|
|
|
|
|
end
|
|
|
|
|
|
2017-03-27 22:43:58 +02:00
|
|
|
|
tol = parsed_args["tol"]
|
|
|
|
|
iterations = parsed_args["iterations"]
|
|
|
|
|
|
2017-06-06 12:04:48 +02:00
|
|
|
|
# solver = SCSSolver(eps=tol, max_iters=iterations, verbose=true, linearsolver=SCS.Indirect)
|
|
|
|
|
solver = SCSSolver(eps=tol, max_iters=iterations, linearsolver=SCS.Direct)
|
2017-03-27 22:43:58 +02:00
|
|
|
|
|
|
|
|
|
N = parsed_args["N"]
|
|
|
|
|
upper_bound = parsed_args["upper-bound"]
|
|
|
|
|
|
2017-04-10 20:02:17 +02:00
|
|
|
|
name = "SOutF$N"
|
2017-03-27 22:43:58 +02:00
|
|
|
|
name = name*"-$(string(upper_bound))"
|
|
|
|
|
|
2017-06-06 12:04:48 +02:00
|
|
|
|
logger = PropertyT.setup_logging(name)
|
|
|
|
|
|
|
|
|
|
info(logger, "Group: $name")
|
|
|
|
|
info(logger, "Iterations: $iterations")
|
|
|
|
|
info(logger, "Precision: $tol")
|
|
|
|
|
info(logger, "Upper bound: $upper_bound")
|
|
|
|
|
|
|
|
|
|
AutFN = AutGroup(FreeGroup(N), special=true, outer=true)
|
|
|
|
|
S = generators(AutFN);
|
|
|
|
|
S = unique([S; [inv(s) for s in S]])
|
|
|
|
|
Id = AutFN()
|
|
|
|
|
|
|
|
|
|
@time PropertyT.check_property_T(name, S, Id, solver, upper_bound, tol, 2)
|
2017-03-27 22:43:58 +02:00
|
|
|
|
return 0
|
|
|
|
|
end
|
2017-03-13 16:18:42 +01:00
|
|
|
|
|
2017-03-27 22:43:58 +02:00
|
|
|
|
main()
|