A crucial step in the "purely algebraic" proof of Weyl's semisimplicity theorem is that the Casimir element $C\in U\mathfrak{g}$ acts by nonzero scalars on a nontrivial irrep $V$. However, at least two sources I have consulted assert that $\text{tr}\_V(C)=\text{tr}(C)=\dim \mathfrak{g}$, i.e. using the fact that $C$ can be written as a sum of products dual basis elements and then asserting that the trace pairing on the irrep is the same as the Killing form. But this seems obviously false. Or at least, I don't see why it should be true.


What I can see is that if $\mathfrak{g}$ is simple, the trace pairing on the irrep is a scaling of the Killing form, so by picking a suitable basis, we get that the trace pairing on $V$ is a scaling of the sum of the Killing forms on the simple summands of semisimple $\mathfrak{g}$, so you get a linear combination of the dimensions of the simple summands. But this could very well be zero.



Why is the trace of the Casimir on the irrep of a semisimple algebra nonzero?
The Casimir operator lies in the center of the universal enveloping algebra of $\mathfrak{g}$. By Schur's lemma, it must act by a scalar multiple of identity on any irreducible representation. For a highest weight representation you can actually directly compute this scalar by considering action of the Casimir on the highest weight vector. The result is $\|\lambda + \rho\|^2 - \|\rho\|^2$, where $\lambda$ is the highest weight, $\rho$ is half the sum of positive roots and the norm is taken with respect to the Killing form. This is fairly standard material that can be found in many textbooks. See e.g. Peter Woit's [notes](https://www.math.columbia.edu/~woit/wordpress/?p=1304) on BRST.


