# tensorCoefficient -- computes the multiplicity of W in U tensor V

## Description

This function implements the Racah-Speiser algorithm; see Di Francesco, Mathieu, and Senechal, Conformal Field Theory, Springer Graduate Texts in Theoretical Physics, Section 13.5.2.

Given three irreducible Lie algebra modules $U$, $V$, and $W$, the function returns the multiplicity of $W$ in $U \otimes V$. In Type A, these are related to the Littlewood-Richardson coefficients (though in this package, irreducible representations are indexed by the Dynkin labels of their highest weights, rather than by partitions).

The example below shows that for $g=sl_3$ and $\lambda=2 \omega_1 + \omega_2$, $\mu= \omega_1 + 2 \omega_2$, and $\nu= 2 \omega_1 + 2 \omega_2$, the tensor product of $sl_3$ modules $V_{\lambda} \otimes V_{\mu}$ contains two copies of $V_{\nu}$.

 i1 : g=simpleLieAlgebra("A",2) o1 = g o1 : LieAlgebra i2 : U=irreducibleLieAlgebraModule({2,1},g) o2 = U o2 : g module i3 : V=irreducibleLieAlgebraModule({1,2},g) o3 = V o3 : g module i4 : W=irreducibleLieAlgebraModule({2,2},g) o4 = W o4 : g module i5 : tensorCoefficient(U,V,W) o5 = 2