Perpetuum mobile: the Leibniz-Papin controversy