diff --git a/AutFN.jl b/AutFN.jl index 534de13..84d7793 100644 --- a/AutFN.jl +++ b/AutFN.jl @@ -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 diff --git a/AutFN_orbit.jl b/AutFN_orbit.jl index 4918ef6..8467174 100644 --- a/AutFN_orbit.jl +++ b/AutFN_orbit.jl @@ -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() diff --git a/SL.jl b/SL.jl index 018ccb7..be6250b 100644 --- a/SL.jl +++ b/SL.jl @@ -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 diff --git a/SL_orbit.jl b/SL_orbit.jl index 86f002c..4d73a3c 100644 --- a/SL_orbit.jl +++ b/SL_orbit.jl @@ -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()