Let A,B nxn matrices over finite field F.
One can prove that if the minimal polynomials of A,B are co-prime then the Sylvester equation AX-AB=C has uniqe solution for any given matrix C over F.
Is the opposite also true, i.e. if AX-AB=C has uniqe solution X for any given matrix C over F, does the minimal polynomials of A,B are co-prime ?