initial adjust of GAPGroups files

This commit is contained in:
kalmarek 2018-08-08 00:29:22 +02:00
parent 02825a8ec0
commit 7f4824492c
3 changed files with 76 additions and 149 deletions

View File

@ -1,20 +1,14 @@
module CapraceGroup struct CapraceGroup <: GAPGroup
args::Dict{String,Any}
end
using AbstractAlgebra name(G::CapraceGroup) = "CapraceGroup"
using Groups
############################################################################### function group(G::CapraceGroup)
#
# Generating set
#
###############################################################################
Comm(x,y) = x*y*x^-1*y^-1 caprace_group = Groups.FPGroup(["x","y","z","t","r"])
function generatingset() x,y,z,t,r = gens(caprace_group)
CapraceGroup = Groups.FPGroup(["x","y","z","t","r"]);
x,y,z,t,r = gens(CapraceGroup)
relations = [ relations = [
x^7, x^7,
@ -38,25 +32,6 @@ function generatingset()
relations = [relations; [inv(rel) for rel in relations]] relations = [relations; [inv(rel) for rel in relations]]
Groups.add_rels!(CapraceGroup, Dict(rel => CapraceGroup() for rel in relations)) Groups.add_rels!(caprace_group, Dict(rel => caprace_group() for rel in relations))
return caprace_group
return CapraceGroup, gens(CapraceGroup)
end end
function generatingset(parsed_args)
return generatingset()
end
###############################################################################
#
# Misc
#
###############################################################################
function groupname(parsed_args)
return groupname(), 0
end
groupname() = "CapraceGroup"
end # of module CapraceGroup

View File

@ -1,49 +1,24 @@
module HigmanGroup struct HigmanGroup <: GAPGroup
args::Dict{String,Any}
end
using AbstractAlgebra name(G::HigmanGroup) = "HigmanGroup"
using Groups
############################################################################### function group(G::HigmanGroup)
#
# Generating set
#
###############################################################################
Comm(x,y) = x*y*x^-1*y^-1 higman_group = Groups.FPGroup(["a","b","c","d"]);
function generatingset() a,b,c,d = gens(higman_group)
HigmanGr = Groups.FPGroup(["a","b","c","d"]);
a,b,c,d = gens(HigmanGr)
relations = [ relations = [
b^-1*Comm(b,a), b^-1*Comm(b,a),
c^-1*Comm(c,b), c^-1*Comm(c,b),
d^-1*Comm(d,c), d^-1*Comm(d,c),
a^-1*Comm(a,d) a^-1*Comm(a,d)
]; ];
relations = [relations; [inv(rel) for rel in relations]] relations = [relations; [inv(rel) for rel in relations]]
Groups.add_rels!(HigmanGr, Dict(rel => HigmanGr() for rel in relations)) Groups.add_rels!(higman_group, Dict(rel => HigmanGr() for rel in relations))
return higman_group
return HigmanGr, gens(HigmanGr)
end end
function generatingset(parsed_args)
return generatingset()
end
###############################################################################
#
# Misc
#
###############################################################################
function groupname(parsed_args)
return groupname(), 0
end
groupname() = "HigmanGroup"
end # of module CapraceGroup

View File

@ -1,17 +1,14 @@
module MappingClassGroups struct MappingClassGroup <: GAPGroup
args::Dict{String,Any}
end
using AbstractAlgebra function name(G::MappingClassGroup)
using Groups N = G.args["N"]
return "MCG($(N))"
end
############################################################################### function group(G::MappingClassGroup)
# N = G.args["N"]
# Generating set
#
###############################################################################
Comm(x,y) = x*y*x^-1*y^-1
function generatingset(N::Int)
if N < 2 if N < 2
throw("Genus must be at least 2!") throw("Genus must be at least 2!")
elseif N == 2 elseif N == 2
@ -33,77 +30,57 @@ function generatingset(N::Int)
Groups.add_rels!(MCGroup, Dict(rel => MCGroup() for rel in relations)) Groups.add_rels!(MCGroup, Dict(rel => MCGroup() for rel in relations))
return MCGroup return MCGroup
end else
MCGroup = Groups.FPGroup(["a$i" for i in 0:2N])
S = gens(MCGroup)
MCGroup = Groups.FPGroup(["a$i" for i in 0:2N]) a0 = S[1]
S = gens(MCGroup) A = S[2:end]
k = length(A)
a0 = S[1] relations = [
A = S[2:end] [Comm(A[i], A[j]) for i in 1:k for j in 1:k if abs(i-j) > 1]...,
k = length(A) [Comm(a0, A[i]) for i in 1:k if i != 4]...,
[A[i]*A[(i+1)]*A[i]*inv(A[i+1]*A[i]*A[i+1]) for i in 1:k-1]...,
A[4]*a0*A[4]*inv(a0*A[4]*a0)
]
relations = [ # 3-chain relation
[Comm(A[i], A[j]) for i in 1:k for j in 1:k if abs(i-j) > 1]..., c = prod(reverse(A[1:4]))*prod(A[1:4])
[Comm(a0, A[i]) for i in 1:k if i != 4]..., b0 = c*a0*inv(c)
[A[i]*A[(i+1)]*A[i]*inv(A[i+1]*A[i]*A[i+1]) for i in 1:k-1]..., push!(relations, (A[1]*A[2]*A[3])^4*inv(a0*b0))
A[4]*a0*A[4]*inv(a0*A[4]*a0)
]
# 3-chain relation # Lantern relation
c = prod(reverse(A[1:4]))*prod(A[1:4]) b1 = inv(A[4]*A[5]*A[3]*A[4])*a0*(A[4]*A[5]*A[3]*A[4])
b0 = c*a0*inv(c) b2 = inv(A[2]*A[3]*A[1]*A[2])*b1*(A[2]*A[3]*A[1]*A[2])
push!(relations, (A[1]*A[2]*A[3])^4*inv(a0*b0)) u = inv(A[6]*A[5])*b1*(A[6]*A[5])
x = prod(reverse(A[2:6]))*u*prod(inv.(A[1:4]))
b3 = x*a0*inv(x)
push!(relations, a0*b2*b1*inv(A[1]*A[3]*A[5]*b3))
# Lantern relation # Hyperelliptic relation
b1 = inv(A[4]*A[5]*A[3]*A[4])*a0*(A[4]*A[5]*A[3]*A[4]) X = prod(reverse(A))*prod(A)
b2 = inv(A[2]*A[3]*A[1]*A[2])*b1*(A[2]*A[3]*A[1]*A[2])
u = inv(A[6]*A[5])*b1*(A[6]*A[5])
x = prod(reverse(A[2:6]))*u*prod(inv.(A[1:4]))
b3 = x*a0*inv(x)
push!(relations, a0*b2*b1*inv(A[1]*A[3]*A[5]*b3))
# Hyperelliptic relation function n(i::Int, b=b0)
X = prod(reverse(A))*prod(A) if i == 1
return A[1]
function n(i::Int, b=b0) elseif i == 2
if i == 1 return b
return A[1] else
elseif i == 2 return w(i-2)*n(i-2)*w(i-2)
return b end
else
return w(i-2)*n(i-2)*w(i-2)
end end
function w(i::Int)
(A[2i+4]*A[2i+3]*A[2i+2]* n(i+1))*(A[2i+1]*A[2i] *A[2i+2]*A[2i+1])*
(A[2i+3]*A[2i+2]*A[2i+4]*A[2i+3])*( n(i+1)*A[2i+2]*A[2i+1]*A[2i] )
end
# push!(relations, X*n(N)*inv(n(N)*X))
relations = [relations; [inv(rel) for rel in relations]]
Groups.add_rels!(MCGroup, Dict(rel => MCGroup() for rel in relations))
return MCGroup
end end
function w(i::Int)
(A[2i+4]*A[2i+3]*A[2i+2]* n(i+1))*(A[2i+1]*A[2i] *A[2i+2]*A[2i+1])*
(A[2i+3]*A[2i+2]*A[2i+4]*A[2i+3])*( n(i+1)*A[2i+2]*A[2i+1]*A[2i] )
end
# push!(relations, X*n(N)*inv(n(N)*X))
relations = [relations; [inv(rel) for rel in relations]]
Groups.add_rels!(MCGroup, Dict(rel => MCGroup() for rel in relations))
return MCGroup, gens(MCGroup)
end end
function generatingset(parsed_args)
N = parsed_args["N"]
return generatingset(N)
end
###############################################################################
#
# Misc
#
###############################################################################
function groupname(parsed_args)
N = parsed_args["N"]
return groupname(N), N
end
groupname(N::Int) = "MCG$(N)"
end #of module MappingClassGroups