Solution (source code)

= Solution

Take a <singular value decomposition> $F=Q_1DQ_2^T$, with $D=\operatorname{diag}(\lambda_1,\lambda_2,\lambda_3)$ positive and $Q_1,Q_2\in SO(3)$. Such a choice is possible because $\det F>0$. Left <material frame indifference> removes $Q_1$, and right <material isotropy> removes $Q_2$, giving $W(F)=W(D)$.

Moreover $W(D)$ is unchanged when the positive diagonal entries are permuted. Every <permutation> can be implemented by a signed <permutation matrix> of <determinant> one; the signs disappear in conjugating a <diagonal matrix>. Thus the energy depends only on the unordered <principal stretches>.

The three invariants determine precisely this unordered triple: the roots of $t^3-I_Bt^2+II_Bt-III_B$ are $\lambda_1^2,\lambda_2^2,\lambda_3^2$, and their positive <square roots> give the stretches. Consequently, on the set of admissible invariant triples, define $h(I_B,II_B,III_B)$ to be $W(D)$. The preceding argument proves that this is well defined and that
$$
\boxed{W(F)=h(I_B,II_B,III_B).}
$$
Not every positive triple is realizable by three positive roots. Since the requested statement only asserts existence of a <function> on $(0,\infty)^3$, extend $h$ arbitrarily on the nonrealizable triples; no choice there affects the formula for a <deformation in continuum mechanics>. Smooth invariant representations, where needed for differentiating the <constitutive equation>, are understood locally on the realizable set.