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
using Groups
name(G::CapraceGroup) = "CapraceGroup"
###############################################################################
#
# Generating set
#
###############################################################################
function group(G::CapraceGroup)
Comm(x,y) = x*y*x^-1*y^-1
caprace_group = Groups.FPGroup(["x","y","z","t","r"])
function generatingset()
CapraceGroup = Groups.FPGroup(["x","y","z","t","r"]);
x,y,z,t,r = gens(CapraceGroup)
x,y,z,t,r = gens(caprace_group)
relations = [
x^7,
@ -38,25 +32,6 @@ function generatingset()
relations = [relations; [inv(rel) for rel in relations]]
Groups.add_rels!(CapraceGroup, Dict(rel => CapraceGroup() for rel in relations))
return CapraceGroup, gens(CapraceGroup)
Groups.add_rels!(caprace_group, Dict(rel => caprace_group() for rel in relations))
return caprace_group
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,20 +1,14 @@
module HigmanGroup
struct HigmanGroup <: GAPGroup
args::Dict{String,Any}
end
using AbstractAlgebra
using Groups
name(G::HigmanGroup) = "HigmanGroup"
###############################################################################
#
# Generating set
#
###############################################################################
function group(G::HigmanGroup)
Comm(x,y) = x*y*x^-1*y^-1
higman_group = Groups.FPGroup(["a","b","c","d"]);
function generatingset()
HigmanGr = Groups.FPGroup(["a","b","c","d"]);
a,b,c,d = gens(HigmanGr)
a,b,c,d = gens(higman_group)
relations = [
b^-1*Comm(b,a),
@ -25,25 +19,6 @@ function generatingset()
relations = [relations; [inv(rel) for rel in relations]]
Groups.add_rels!(HigmanGr, Dict(rel => HigmanGr() for rel in relations))
return HigmanGr, gens(HigmanGr)
Groups.add_rels!(higman_group, Dict(rel => HigmanGr() for rel in relations))
return higman_group
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
using Groups
function name(G::MappingClassGroup)
N = G.args["N"]
return "MCG($(N))"
end
###############################################################################
#
# Generating set
#
###############################################################################
Comm(x,y) = x*y*x^-1*y^-1
function generatingset(N::Int)
function group(G::MappingClassGroup)
N = G.args["N"]
if N < 2
throw("Genus must be at least 2!")
elseif N == 2
@ -33,8 +30,7 @@ function generatingset(N::Int)
Groups.add_rels!(MCGroup, Dict(rel => MCGroup() for rel in relations))
return MCGroup
end
else
MCGroup = Groups.FPGroup(["a$i" for i in 0:2N])
S = gens(MCGroup)
@ -85,25 +81,6 @@ function generatingset(N::Int)
relations = [relations; [inv(rel) for rel in relations]]
Groups.add_rels!(MCGroup, Dict(rel => MCGroup() for rel in relations))
return MCGroup, gens(MCGroup)
return 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