Permutation as a direct sum of irreducibles A representation of the Symmetric Group $S_n$ over $\mathbb{Z}$ is a homomorphism $rho: S_n \rightarrow M(\mathbb{Z})$, i.e. from permutations to square integer matrices.
My understanding (from my elementary knowledge of representation theory) is that the right-hand side of this mapping can always be expressed as a direct sum of irreducible matrices, i.e. matrices which cannot themselves be expressed as a sum of the other irreducibles.
Is there a named algorithm for decomposing a permutation into this sum of irreducible matrices?
In particular, are this algorithm (and its inverse) implemented in GAP?
EDIT: As pointed out by Alexander Hulpke in an answer below, this question is poorly-phrased (in particular, the use of the term decomposition) in terms of what I'm actually looking for, which is the ability to apply the above homomorphisms to some element $g$, then recover $g$ via their pre-images.
 A: There is a set of algorithms, going by the name of "MeatAxe" that take a representation and return the irreducible constituents. The version implemented in GAP is over finite fields, but presumably by working modulo suitable large primes you could recover the result over Z.
If you do not care about the actual decomposition, but only how it decomposes character theory will give an easier approach.
I am unsure what you mean by inverse algorithm -- this would be just direct sums of generator matrices.
A: I can confirm (thanks to Stefan Kohl, Marc Keilberg and Max Horn) that it's possible to obtain the irreducible representation homomorphisms, apply them to some element g and then recover it (the 'inverse' operation referred to in original phrasing of the question) via the GAP method IrreducibleRepresentations.
IrreducibleRepresentations uses Dixon's algorithm under the hood and yields a list of homomorphisms (irr in the listing below). 
These homomorphisms (images in the listing below) are invertible (PreImagesElm) and the original g can be recovered by forming the direct sum of these preimages:
gap> G:=SymmetricGroup(5);;
gap> irr:=IrreducibleRepresentations(G);;
gap> g:=Random(G);
(1,4,3)
gap> images := List(irr,r->Image(r,g));;
gap> pre:=Intersection(List([1..Length(irr)], i -> PreImagesElm(irr[i], images[i])));
[ (1,4,3) ]

