Title: The logic of democracy