integrate with new PropertyT.jl

This commit is contained in:
kalmar 2017-06-22 15:18:26 +02:00
parent 9d33d28bd6
commit c6a56fcadb
4 changed files with 29 additions and 21 deletions

View File

@ -1,13 +1,11 @@
using ArgParse
using Nemo
Nemo.setpermstyle(:cycles)
using Groups
using GroupRings
import SCS.SCSSolver
using PropertyT
import SCS.SCSSolver
using Groups
Nemo.setpermstyle(:cycles)
#=
Note that the element

View File

@ -1,4 +1,10 @@
include("Orb_AutFN.jl")
using ArgParse
using SCS
using Nemo
using PropertyT
using Groups
###############################################################################
#
@ -114,14 +120,14 @@ function main()
info(logger, G)
info(logger, "Symmetric generating set of size $(length(S))")
info(logger, S)
AutS = WreathProduct(Nemo.FiniteField(2,1, "a")[1], PermutationGroup(N))
AutS = WreathProduct(FiniteField(2,1, "a")[1], PermutationGroup(N))
# AutS = PermutationGroup(N)
solver = SCS.SCSSolver(eps=tol, max_iters=iterations, verbose=true, linearsolver=SCS.Direct)
sett = Settings(dirname, N, G, S, AutS, radius, solver, upper_bound, tol)
orbit_check_propertyT(logger, sett)
PropertyT.check_property_T(sett)
end
main()

3
SL.jl
View File

@ -1,10 +1,9 @@
using ArgParse
using Nemo
using GroupRings
import SCS.SCSSolver
using PropertyT
import SCS.SCSSolver
function E(i::Int, j::Int, M::Nemo.MatSpace)
@assert i≠j

View File

@ -1,4 +1,10 @@
include("Orb_AutFN.jl")
using ArgParse
using SCS
using Nemo
using PropertyT
using Groups
###############################################################################
#
@ -6,34 +12,33 @@ include("Orb_AutFN.jl")
#
###############################################################################
function matrix_emb(MM::Nemo.MatSpace, g::WreathProducts.WreathProductElem)
function matrix_emb(MM::MatSpace, g::WreathProductElem)
parent(g).P.n == MM.cols == MM.rows || throw("No natural embedding of $(parent(g)) in ")
powers = [(elt == parent(elt)() ? 0: 1) for elt in g.n.elts]
elt = diagm([(-1)^(elt == parent(elt)() ? 0: 1) for elt in g.n.elts])
return MM(elt)*MM(Nemo.matrix_repr(g.p)')
end
function (g::WreathProducts.WreathProductElem)(A::Nemo.MatElem)
function (g::WreathProductElem)(A::MatElem)
G = matrix_emb(parent(A), g)
inv_G = matrix_emb(parent(A), inv(g))
return G*A*inv_G
end
function (p::Nemo.perm)(A::Nemo.MatElem)
function (p::perm)(A::MatElem)
length(p.d) == A.r == A.c || throw("Can't act via $p on matrix of size ($(A.r), $(A.c))")
R = parent(A)
inv_p = inv(p)
return R(Nemo.matrix_repr(p))*A*R(Nemo.matrix_repr(inv_p))
end
###############################################################################
#
# Generating set
#
###############################################################################
function E(i::Int, j::Int, M::Nemo.MatSpace)
function E(i::Int, j::Int, M::MatSpace)
@assert i≠j
m = one(M)
m[i,j] = m[1,1]
@ -50,7 +55,7 @@ end
function SL_generatingset(n::Int)
indexing = [(i,j) for i in 1:n for j in 1:n if i≠j]
G = Nemo.MatrixSpace(Nemo.ZZ, n, n)
G = MatrixSpace(ZZ, n, n)
S = [E(i,j,G) for (i,j) in indexing]
S = vcat(S, [transpose(x) for x in S])
S = vcat(S, [inv(x) for x in S])
@ -61,8 +66,8 @@ function SL_generatingset(n::Int, p::Int)
p == 0 && return SL_generatingset(n)
(p > 1 && n > 1) || throw("Both n and p should be positive integers!")
info("Size(SL($n,$p)) = $(SLsize(n,p))")
F = Nemo.ResidueRing(Nemo.ZZ, p)
G = Nemo.MatrixSpace(F, n, n)
F = ResidueRing(ZZ, p)
G = MatrixSpace(F, n, n)
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 = vcat(S, [transpose(x) for x in S])
@ -150,14 +155,14 @@ function main()
info(logger, G)
info(logger, "Symmetric generating set of size $(length(S))")
info(logger, S)
AutS = WreathProduct(Nemo.FiniteField(2,1, "a")[1], PermutationGroup(N))
AutS = WreathProduct(FiniteField(2,1, "a")[1], PermutationGroup(N))
# AutS = PermutationGroup(N)
solver = SCS.SCSSolver(eps=tol, max_iters=iterations, verbose=true, linearsolver=SCS.Direct)
sett = Settings(dirname, N, G, S, AutS, radius, solver, upper_bound, tol)
orbit_check_propertyT(logger, sett)
PropertyT.check_property_T(sett)
end
main()