Solution (source code)

= Solution

Use the mathematical <Lie algebra> convention $U(t)=I+tX+O(t^2)$. Differentiating $U^\dagger U=I$ and $\det U=1$ at $t=0$ gives $X^\dagger=-X$ and $\operatorname{tr}X=0$. Conversely, for such an $X$, the <matrix exponential> is unitary and has <determinant> $\det e^{tX}=e^{t\operatorname{tr}X}=1$. Thus
$$
\boxed{\mathfrak{su}(4)=\{X\in M_4(\mathbb C):X^\dagger=-X,\ \operatorname{tr}X=0\},
\qquad [X,Y]=XY-YX.}
$$
The four diagonal entries are purely imaginary, and the six entries above the diagonal are arbitrary <complex numbers> determining the entries below it. This gives $4+2\cdot6=16$ real parameters before imposing the one real <trace> constraint, so $\dim_{\mathbb R}\mathfrak{su}(4)=15$.

A <Cartan subalgebra> of this compact <Lie algebra> is a maximal commuting <Lie subalgebra>; choose
$$
\mathfrak h=\{i\operatorname{diag}(h_1,h_2,h_3,h_4):h_i\in\mathbb R,\ \sum_i h_i=0\}.
$$
A simple <basis> is $iH_1,iH_2,iH_3$, where
$$
H_1=\operatorname{diag}(1,-1,0,0),\quad
H_2=\operatorname{diag}(0,1,-1,0),\quad
H_3=\operatorname{diag}(0,0,1,-1).
$$
Any <matrix> commuting with every diagonal element is itself diagonal, which proves maximality. Commuting <skew-Hermitian matrices> can also be simultaneously diagonalized, so no larger commuting <Lie subalgebra> is possible. Consequently
$$
\boxed{\dim\mathfrak{su}(4)=15,\qquad\operatorname{rank}\mathfrak{su}(4)=\dim\mathfrak h=3.}
$$
The <Hermitian quantum generator convention> instead uses the Hermitian $H_a$ and $U=\exp(i\theta^aH_a)$. The two conventions describe the same <Lie algebra>.