Solution (source code)

= Solution

A single <eigenbasis> works for every choice of the parameters. The columns $v_1=(1,0,0)^T$, $v_2=(1,1,0)^T$, $v_3=(1,1,1)^T$ satisfy
$$
Mv_1=av_1,\qquad Mv_2=bv_2,\qquad Mv_3=cv_3.
$$
They are <linearly independent> because their column <matrix> has determinant one. Thus the <diagonalization> is
$$
\boxed{P=\begin{pmatrix}1&1&1\\0&1&1\\0&0&1\end{pmatrix},\qquad P^{-1}=\begin{pmatrix}1&-1&0\\0&1&-1\\0&0&1\end{pmatrix},\qquad M=P\operatorname{diag}(a,b,c)P^{-1}.}
$$
This formula includes all coincidences among $a,b,c$, so no special repeated-<eigenvalue> cases need separate bases.