On the mathematical foundations of elastic stability theory. I.