Algebraic Lyapunov and Stein stability results for tensors