The Logic of Collective Choice