Towards historical roots of necessary conditions of optimality: regula of Peano