Electoral law is the operating system of democracy, it is often said, and rightly so: electoral law is a code, an algorithm that translates the input of votes into the output of a representative parliament, which explains why mathematicians are often much more passionate about this legal matter than even constitutional lawyers.