2018-08-15 17:19:28 +02:00
|
|
|
struct SpecialLinearGroup <: SymmetrizedGroup
|
2018-08-08 00:21:13 +02:00
|
|
|
args::Dict{String,Any}
|
|
|
|
group::AbstractAlgebra.Group
|
2018-09-05 17:48:59 +02:00
|
|
|
N::Int
|
2018-08-08 00:21:13 +02:00
|
|
|
|
|
|
|
function SpecialLinearGroup(args::Dict)
|
2018-09-05 17:48:59 +02:00
|
|
|
n = args["SL"]
|
2018-08-08 00:21:13 +02:00
|
|
|
p = args["p"]
|
|
|
|
X = args["X"]
|
|
|
|
|
|
|
|
if p == 0
|
|
|
|
G = MatrixSpace(Nemo.ZZ, n, n)
|
|
|
|
else
|
2018-08-18 23:23:52 +02:00
|
|
|
R = Nemo.NmodRing(UInt(p))
|
|
|
|
G = MatrixSpace(R, n, n)
|
2018-08-08 00:21:13 +02:00
|
|
|
end
|
2018-09-05 17:48:59 +02:00
|
|
|
return new(args, G, n)
|
2018-08-08 00:21:13 +02:00
|
|
|
end
|
|
|
|
end
|
2017-11-06 01:58:50 +01:00
|
|
|
|
2018-08-08 00:21:13 +02:00
|
|
|
function name(G::SpecialLinearGroup)
|
|
|
|
p = G.args["p"]
|
|
|
|
X = G.args["X"]
|
2017-11-06 01:58:50 +01:00
|
|
|
|
2018-08-08 00:21:13 +02:00
|
|
|
if p == 0
|
|
|
|
R = (X ? "Z[x]" : "Z")
|
|
|
|
else
|
|
|
|
R = "F$p"
|
|
|
|
end
|
2018-09-06 22:45:16 +02:00
|
|
|
if haskey(G.args, "nosymmetry") && G.args["nosymmetry"]
|
2018-09-05 17:48:59 +02:00
|
|
|
return "SL($(G.N),$R)"
|
2018-08-08 00:21:13 +02:00
|
|
|
else
|
2018-09-05 17:48:59 +02:00
|
|
|
return "oSL($(G.N),$R)"
|
2018-08-08 00:21:13 +02:00
|
|
|
end
|
|
|
|
end
|
2017-11-06 14:25:54 +01:00
|
|
|
|
2018-08-08 00:21:13 +02:00
|
|
|
group(G::SpecialLinearGroup) = G.group
|
2017-11-06 01:58:50 +01:00
|
|
|
|
|
|
|
function E(i::Int, j::Int, M::MatSpace, val=one(M.base_ring))
|
|
|
|
@assert i≠j
|
|
|
|
m = one(M)
|
|
|
|
m[i,j] = val
|
|
|
|
return m
|
|
|
|
end
|
|
|
|
|
2018-08-08 00:21:13 +02:00
|
|
|
function generatingset(G::SpecialLinearGroup)
|
|
|
|
p = G.args["p"]
|
|
|
|
X = G.args["X"]
|
2018-08-18 23:24:57 +02:00
|
|
|
p > 0 && X && throw("SL(n, F_p[x]) not implemented")
|
2018-08-08 00:21:13 +02:00
|
|
|
SL = group(G)
|
2018-08-18 23:24:57 +02:00
|
|
|
r = G.args["radius"]
|
|
|
|
return generatingset(SL, r, X)
|
|
|
|
end
|
2017-11-06 01:58:50 +01:00
|
|
|
|
2018-08-18 23:24:57 +02:00
|
|
|
|
|
|
|
function generatingset(SL::MatSpace, radius::Integer, X::Bool=false)
|
|
|
|
|
|
|
|
n = SL.cols
|
|
|
|
indexing = [(i,j) for i in 1:n for j in 1:n if i≠j]
|
2018-01-04 22:09:53 +01:00
|
|
|
|
2018-08-08 00:21:13 +02:00
|
|
|
if !X
|
|
|
|
S = [E(idx[1],idx[2],SL) for idx in indexing]
|
2018-01-04 22:09:53 +01:00
|
|
|
else
|
2018-08-08 00:21:13 +02:00
|
|
|
S = [E(i,j,SL,v) for (i,j) in indexing for v in [1, 100*r]]
|
2018-01-04 22:09:53 +01:00
|
|
|
end
|
2018-08-08 00:21:13 +02:00
|
|
|
return unique([S; inv.(S)])
|
|
|
|
end
|
|
|
|
|
|
|
|
function autS(G::SpecialLinearGroup)
|
2018-09-05 17:48:59 +02:00
|
|
|
return WreathProduct(PermutationGroup(2), PermutationGroup(G.N))
|
2017-11-06 01:58:50 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
#
|
|
|
|
# Action of WreathProductElems on Nemo.MatElem
|
|
|
|
#
|
|
|
|
###############################################################################
|
|
|
|
|
2018-08-08 00:24:17 +02:00
|
|
|
function matrix_emb(n::DirectProductGroupElem, p::perm)
|
|
|
|
Id = parent(n.elts[1])()
|
|
|
|
elt = diagm([(-1)^(el == Id ? 0 : 1) for el in n.elts])
|
|
|
|
return elt[:, p.d]
|
2017-11-06 01:58:50 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
function (g::WreathProductElem)(A::MatElem)
|
2018-08-08 00:24:17 +02:00
|
|
|
g_inv = inv(g)
|
|
|
|
G = matrix_emb(g.n, g_inv.p)
|
|
|
|
G_inv = matrix_emb(g_inv.n, g.p)
|
|
|
|
M = parent(A)
|
2018-08-18 23:23:52 +02:00
|
|
|
return M(G)*A*M(G_inv)
|
2017-11-06 01:58:50 +01:00
|
|
|
end
|
|
|
|
|
2018-08-15 17:19:37 +02:00
|
|
|
import Base.*
|
|
|
|
|
|
|
|
doc"""
|
|
|
|
*(x::AbstractAlgebra.MatElem, P::Generic.perm)
|
|
|
|
> Apply the pemutation $P$ to the rows of the matrix $x$ and return the result.
|
|
|
|
"""
|
|
|
|
function *(x::AbstractAlgebra.MatElem, P::Generic.perm)
|
|
|
|
z = similar(x)
|
|
|
|
m = rows(x)
|
|
|
|
n = cols(x)
|
|
|
|
for i = 1:m
|
|
|
|
for j = 1:n
|
2018-08-18 23:23:52 +02:00
|
|
|
z[i, j] = x[i,P[j]]
|
2018-08-15 17:19:37 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
return z
|
|
|
|
end
|
|
|
|
|
2017-11-06 01:58:50 +01:00
|
|
|
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))")
|
|
|
|
return p*A*inv(p)
|
|
|
|
end
|