Fix some $ k $. Let $ V=\mathbb{C}^k $. Let $ G $ be any of $ GL_k,SL_k,U_k,SU_k $. I'm interested in Schur-Weyl type actions on $ V^{\otimes n} $. For the diagonal $ G $ action, the action of $ g \in G $ corresponds to just taking the $ n $th tensor power $ g^{\otimes n} $. This can be implemented in GAP as
TensorPower:=function(mat,n) return Iterated(ListWithIdenticalEntries(n,mat),KroneckerProduct); end;
as described here
https://math.stackexchange.com/a/4498631/758507
Now I'm interested in implementing the action of the symmetric group $ S_n $ on $ V^{\otimes n} $ by permutation of the tensor factors. Currently my best guess is to consider the standard permutation action of $ S_n $ on $ \{ 1, \dots n \} $. Then consider the set of $ k^n $ functions $$ f: \{1,\dots, n\} \to \{ 1, \dots, k \} $$ then turn a permutation in $ S_n $ into a permutation of $ k^n $ by taking the function $ i \mapsto f(i) $ to the function $ i \mapsto f(\sigma(i)) $.
Once I have these permutations of $ k^n $ I should be able to create the matrices corresponding to the $ S_n $ action on $ V^{\otimes n} $ by just using the command
PermutationMat(x,k^n,Rationals)
Question: I'm looking to implement SchurWeylTypeAction of $ S_n $ on $ (\mathbb{C}^k)^{\otimes n} $ in GAP. My proposed method my work with a few pointers from someone who knows more about permutations in GAP. Or maybe some completely different method is better, I'm open to anything.
You will need to write down matrices, corresponding to generators of $S_n$. For each generating permutation, you then get a matrix through the images of basis vectors (of the tensor product) under the group element. Basically it will be given by the permutation of indices.