The Mathematics of Politics