update groups to the new input format

This commit is contained in:
kalmarek 2018-09-05 17:48:59 +02:00
parent df4b63a6a6
commit 0a0856bb51
3 changed files with 24 additions and 28 deletions

View File

@ -1,20 +1,19 @@
struct SpecialAutomorphismGroup <: SymmetrizedGroup struct SpecialAutomorphismGroup <: SymmetrizedGroup
args::Dict{String,Any} args::Dict{String,Any}
group::AutGroup group::AutGroup
N::Int
function SpecialAutomorphismGroup(args::Dict) function SpecialAutomorphismGroup(args::Dict)
N = args["N"] N = args["SAut"]
return new(args, AutGroup(FreeGroup(N), special=true)) return new(args, AutGroup(FreeGroup(N), special=true), N)
end end
end end
function name(G::SpecialAutomorphismGroup) function name(G::SpecialAutomorphismGroup)
N = G.args["N"]
if G.args["nosymmetry"] if G.args["nosymmetry"]
return "SAutF$(N)" return "SAutF$(G.N)"
else else
return "oSAutF$(N)" return "oSAutF$(G.N)"
end end
end end
@ -26,8 +25,7 @@ function generatingset(G::SpecialAutomorphismGroup)
end end
function autS(G::SpecialAutomorphismGroup) function autS(G::SpecialAutomorphismGroup)
N = G.args["N"] return WreathProduct(PermutationGroup(2), PermutationGroup(G.N))
return WreathProduct(PermutationGroup(2), PermutationGroup(N))
end end
############################################################################### ###############################################################################

View File

@ -1,26 +1,26 @@
struct MappingClassGroup <: GAPGroup struct MappingClassGroup <: GAPGroup
args::Dict{String,Any} args::Dict{String,Any}
N::Int
MappingClassGroup(args) = MappingClassGroup(args, G.args["MCG"])
end end
function name(G::MappingClassGroup) name(G::MappingClassGroup) = "MCG($(G.N))"
N = G.args["MCG"]
return "MCG($(N))"
end
function group(G::MappingClassGroup) function group(G::MappingClassGroup)
N = G.args["MCG"]
if N < 2 if G.N < 2
throw("Genus must be at least 2!") throw("Genus must be at least 2!")
elseif N == 2 elseif G.N == 2
MCGroup = Groups.FPGroup(["a1","a2","a3","a4","a5"]); MCGroup = Groups.FPGroup(["a1","a2","a3","a4","a5"]);
S = gens(MCGroup) S = gens(MCGroup)
N = length(S) n = length(S)
A = prod(reverse(S))*prod(S) A = prod(reverse(S))*prod(S)
relations = [ relations = [
[Comm(S[i], S[j]) for i in 1:N for j in 1:N if abs(i-j) > 1]..., [Comm(S[i], S[j]) for i in 1:n for j in 1:n if abs(i-j) > 1]...,
[S[i]*S[i+1]*S[i]*inv(S[i+1]*S[i]*S[i+1]) for i in 1:N-1]..., [S[i]*S[i+1]*S[i]*inv(S[i+1]*S[i]*S[i+1]) for i in 1:G.n-1]...,
(S[1]*S[2]*S[3])^4*inv(S[5])^2, (S[1]*S[2]*S[3])^4*inv(S[5])^2,
Comm(A, S[1]), Comm(A, S[1]),
A^2 A^2
@ -31,7 +31,7 @@ function group(G::MappingClassGroup)
return MCGroup return MCGroup
else else
MCGroup = Groups.FPGroup(["a$i" for i in 0:2N]) MCGroup = Groups.FPGroup(["a$i" for i in 0:2G.N])
S = gens(MCGroup) S = gens(MCGroup)
a0 = S[1] a0 = S[1]
@ -76,7 +76,7 @@ function group(G::MappingClassGroup)
(A[2i+3]*A[2i+2]*A[2i+4]*A[2i+3])*( n(i+1)*A[2i+2]*A[2i+1]*A[2i] ) (A[2i+3]*A[2i+2]*A[2i+4]*A[2i+3])*( n(i+1)*A[2i+2]*A[2i+1]*A[2i] )
end end
# push!(relations, X*n(N)*inv(n(N)*X)) # push!(relations, X*n(G.N)*inv(n(G.N)*X))
relations = [relations; [inv(rel) for rel in relations]] relations = [relations; [inv(rel) for rel in relations]]
Groups.add_rels!(MCGroup, Dict(rel => MCGroup() for rel in relations)) Groups.add_rels!(MCGroup, Dict(rel => MCGroup() for rel in relations))

View File

@ -1,9 +1,10 @@
struct SpecialLinearGroup <: SymmetrizedGroup struct SpecialLinearGroup <: SymmetrizedGroup
args::Dict{String,Any} args::Dict{String,Any}
group::AbstractAlgebra.Group group::AbstractAlgebra.Group
N::Int
function SpecialLinearGroup(args::Dict) function SpecialLinearGroup(args::Dict)
n = args["N"] n = args["SL"]
p = args["p"] p = args["p"]
X = args["X"] X = args["X"]
@ -13,12 +14,11 @@ struct SpecialLinearGroup <: SymmetrizedGroup
R = Nemo.NmodRing(UInt(p)) R = Nemo.NmodRing(UInt(p))
G = MatrixSpace(R, n, n) G = MatrixSpace(R, n, n)
end end
return new(args, G) return new(args, G, n)
end end
end end
function name(G::SpecialLinearGroup) function name(G::SpecialLinearGroup)
N = G.args["N"]
p = G.args["p"] p = G.args["p"]
X = G.args["X"] X = G.args["X"]
@ -28,9 +28,9 @@ function name(G::SpecialLinearGroup)
R = "F$p" R = "F$p"
end end
if G.args["nosymmetry"] if G.args["nosymmetry"]
return "SL($N,$R)" return "SL($(G.N),$R)"
else else
return "oSL($N,$R)" return "oSL($(G.N),$R)"
end end
end end
@ -44,7 +44,6 @@ function E(i::Int, j::Int, M::MatSpace, val=one(M.base_ring))
end end
function generatingset(G::SpecialLinearGroup) function generatingset(G::SpecialLinearGroup)
n = G.args["N"]
p = G.args["p"] p = G.args["p"]
X = G.args["X"] X = G.args["X"]
p > 0 && X && throw("SL(n, F_p[x]) not implemented") p > 0 && X && throw("SL(n, F_p[x]) not implemented")
@ -68,8 +67,7 @@ function generatingset(SL::MatSpace, radius::Integer, X::Bool=false)
end end
function autS(G::SpecialLinearGroup) function autS(G::SpecialLinearGroup)
N = G.args["N"] return WreathProduct(PermutationGroup(2), PermutationGroup(G.N))
return WreathProduct(PermutationGroup(2), PermutationGroup(N))
end end
############################################################################### ###############################################################################