Foundation of Huygens' theory of probability