GroupsWithPropertyT/AutFN.jl

102 lines
3.0 KiB
Julia
Raw Normal View History

using ArgParse
2017-09-10 16:20:36 +02:00
###############################################################################
#
# Parsing command line
#
###############################################################################
function parse_commandline()
s = ArgParseSettings()
@add_arg_table s begin
"--tol"
2017-09-10 16:20:36 +02:00
help = "set numerical tolerance for the SDP solver"
arg_type = Float64
2017-09-10 16:20:36 +02:00
default = 1e-6
"--iterations"
2017-09-10 16:20:36 +02:00
help = "set maximal number of iterations for the SDP solver"
arg_type = Int
2018-03-22 11:03:11 +01:00
default = 50000
"--upper-bound"
2017-09-10 16:20:36 +02:00
help = "Set an upper bound for the spectral gap"
arg_type = Float64
default = Inf
"--cpus"
help = "Set number of cpus used by solver (default: auto)"
arg_type = Int
required = false
"-N"
2017-09-10 16:20:36 +02:00
help = "Consider automorphisms of free group on N generators"
arg_type = Int
default = 2
2018-03-22 11:03:11 +01:00
"--radius"
help = "Radius of ball B_r(e,S) to find solution over"
arg_type = Int
default = 2
"--warmstart"
help = "Use warmstart.jld as the initial guess for SCS"
action = :store_true
end
return parse_args(s)
end
2018-03-22 11:07:52 +01:00
const PARSEDARGS = parse_commandline()
2018-03-22 11:05:36 +01:00
include("CPUselect.jl")
set_parallel_mthread(PARSEDARGS, workers=true)
2018-03-22 11:07:52 +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_(n+1)().
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 (S)Aut(𝔽ₙ)
=#
2018-03-22 11:07:52 +01:00
using Nemo
using SCS.SCSSolver
using PropertyT
using Groups
Nemo.setpermstyle(:cycles)
include("groups/autfreegroup.jl")
function main(GROUP, parsed_args)
radius = parsed_args["radius"]
tol = parsed_args["tol"]
iterations = parsed_args["iterations"]
upper_bound = parsed_args["upper-bound"]
2018-03-22 11:07:52 +01:00
warm = parsed_args["warmstart"]
name, N = GROUP.groupname(parsed_args)
G, S = GROUP.generatingset(parsed_args)
2018-03-22 11:07:52 +01:00
name = "$(name)_r$radius"
isdir(name) || mkdir(name)
2018-03-22 11:07:52 +01:00
logger = PropertyT.setup_logging(joinpath(name, "$(upper_bound)"))
2018-03-22 11:07:52 +01:00
info(logger, "Group: $name")
info(logger, "Iterations: $iterations")
info(logger, "Precision: $tol")
info(logger, "Upper bound: $upper_bound")
2017-09-10 16:20:36 +02:00
info(logger, G)
info(logger, "Symmetric generating set of size $(length(S))")
2018-03-22 11:07:52 +01:00
info(logger, "Threads: $(Threads.nthreads())")
info(logger, "Workers: $(workers())")
2017-09-10 16:20:36 +02:00
Id = G()
2018-03-22 11:07:52 +01:00
solver = SCSSolver(eps=tol, max_iters=iterations, linearsolver=SCS.Direct, alpha=1.95, acceleration_lookback=1)
2018-03-22 11:07:52 +01:00
PropertyT.check_property_T(name, S, Id, solver, upper_bound, tol, radius, warm)
return 0
end
2017-03-13 16:18:42 +01:00
2018-03-22 11:07:52 +01:00
main(SpecialAutomorphisms, PARSEDARGS)