Wedderburn decomposition of commutative finite dimensional algebras via GAP

Let $R$ be a commutative finite dimensional $K$-algebra over a field $K$ (for example the monoid ring of a a finite monoid over a field). Assume we have $R$ in GAP. Then we can check whether $R$ is semisimple using the command RadicalOfAlgebra(R). When the value is 0, $R$ is semisimple. Thus $R$ can be written as a finite product of finite field extensions of $K$.

Question: Can we obtain those finite field extensions of $K$ or at least their number and $K$-dimensions using GAP?


If you are working over a finite field, and can represent the algebra through matrices, you could try to split the regular module into its homogeneous components. This can be done with the GAP command MTX.Indecomposition. You then take a simple submodule in this component (try a spin of a random vector), and take the action of the homogeneous component on this module (and should let you deduce the appropriate field extension).

(If you add an example, I can try to show the corresponding GAP commands.)