# This is a GAP program for computing the list of dimensions of irreducible
# representations of simple Lie algebras/groups. This is done by the
# function "dims" below.
#
# Skip Garibaldi
# August 2006
#
# We include "1", because the one-dimensional trivial representation is irreducible.
# We ignore the possibility of repetitions -- non-isomorphic representations that
# have the same dimension. This does indeed happen, even in nontrivial cases.
# For example, the highest weights 10100000 and 10000011 of E_8 (with fundamental
# weights numbered as in Bourbaki) both correspond to irreducible representations
# of dimension 8,634,368,000.
#
# Example:
# dims("E", 8, 6);
# Computes the dimensions of irreps of the Lie algebra E_8 up to the
# dimension of the smallest irrep with highest weight of height 6.
#
# The program is somewhat inefficient. For example, if you compute
# the dimensions for irreps with highest weight of height 2 for
# SL_4 (by calling dimsh(A3, 3, 2)), the program computes the dimension
# of the irrep with highest weight 110 *twice*. In general, if there
# are repeated nonzero coordinates, the computation is done too many times.
#
# However, the Online Encyclopedia of Integer Sequences only demands three text
# lines worth of entries, and for that purpose, this program is efficient enough.
# My old 1 GHz PowerPC G4 laptop can compute dims("E", 8, 6) in a few minutes.
# Turn this to true to give some debugging messages
debug := false;
# returns the list "lst" with the head deleted
tail := function(lst)
return(lst{[2..Length(lst)]});
end;
# This function is the bottom of the recursion.
# It returns the dimension of the irrep of the Lie algebra L with
# highest weight w.
dims_dim := function(L, w)
local rval;
rval := DimensionOfHighestWeightModule(L, w);
if debug then
Print(w, " ", rval, "\n");
fi;
return(rval);
end;
# Returns a set listing the dimensions of irreducible L modules where
# the coordinates of the highest weights are as in the list "parts"
#
# Works recursively.
#
# For example, if w = [0, 0, ... , 0] and parts = [2, 1, 1, 1], it lists the
# dimensions of modules where the highest weight has one 2 and three 1's.
#
# If w is passed with some nonzero entries, those entries are not overwritten.
#
dims_h_part := function(L, rank, w, parts)
local rval, i, z;
rval := Set([]);
# the workhorse of the recursion
for i in [1..rank] do
if w[i] = 0 then # only overwrite 0 coordinates
z := ShallowCopy(w);
z[i] := parts[1];
if Length(parts) = 1 then # no more recursion: compute the dimension
AddSet(rval, dims_dim(L, z));
else # recurse!
rval := Union(rval, dims_h_part(L, rank, z, tail(parts)));
fi;
fi;
od;
return(rval);
end;
# this function returns a set listing dimensions of all irreducible representations
# of the Lie algebra L such that the sum of the coordinates in the highest weight is "ht"
#
# "rank" is the rank of L
dims_h := function(L, rank, ht)
local rval, i, part, parts, w;
rval := Set([]);
parts := Partitions(ht);
for part in parts do
# initialize w: it is a vector with all entries 0
w := [];
for i in [1..rank] do
Add(w, 0);
od;
if debug then
Print("Initialized: ", w, " with partition ", part, "\n");
fi;
# pass to dims_h_part, which does all the work
rval := Union(rval, dims_h_part(L, rank, w, part));
od;
return(rval);
end;
# this function returns a sorted listing of all dimensions of irreducible
# representations of a Lie algebra L up to some limit. Here L belongs to
# the Killing-Cartan family "fam" and has rank "rank".
#
# maxlist lists the dimensions of irreps with weights of height "ht"
# maxlist[1] is the smallest of these dimensions
# Every irrep of height >= ht has dimension >= maxlist[1]
# Returns a list consisting of
# dimensions of irreps of height <= ht and dimension <= maxlist[1]
# maxlist[1]
#
dims := function(fam, rank, ht)
local L, R, filt, rval, i, maxlist;
L := SimpleLieAlgebra(fam, rank, Rationals);
rval := Set([1]); # don't forget the 1-dimensional trivial rep!
for i in [1..(ht-1)] do
Print("Computing dimensions for height ", i, "...\n");
rval := Union(rval, dims_h(L, rank, i)); # consider weights of height < ht
od;
Print("Computing dimensions for height ", ht, "...\n");
maxlist := dims_h(L, rank, ht);
filt := Filtered(rval, x -> x < maxlist[1]);
AddSet(filt, maxlist[1]);
return(filt);
end;