As proved in the answer to this post, if the operators $\hat A$ and $\hat B$ commute, then they have the same eigenstates.
Let $$\hat A\psi_{A_i}=A_i\psi_{A_i}\qquad \Rightarrow\qquad \hat B\hat A\psi_{A_i}=\hat B(A_i\psi_{A_i})=A_i\hat B\psi_{A_i}\equiv > A_i\phi .$$ Now, due to the vanishing of the commutator we have that $$\hat B\hat A\psi_{A_i}=\hat A\hat B\psi_{A_i}=\hat A\phi$$ From the RHS of the last equations, we have that $$\hat A\phi=A_i\phi,$$ meaning that $\phi$ is also an eigenstate of $\hat A$ with eigenvalue $A_i$. This could happen for the following reasons:
- $\phi=c\psi_{A_i}$, with $c$ a constant. Hence, commuting operators have simultaneous eigenstates.
- $\phi\neq c\psi_{A_i}$. In this case the operator $\hat A$ must have degenerate eigenstates, namely $\phi$ and $\psi_{A_i}$. Even at this case, the non-degenerate eigenstates of $\hat A$ are simultaneously eigenstates of $\hat B$.
However, what happens in the second case, where the eigenvalue $A_i$ is degenerate? Can we say that the eigenfunctions corresponding to the degenerate eigenvalue $A_i$ are not eigenfunctions of $\hat B$? Do we know something else about them?