Documentation

Apportionmentlib.Basic

Basic #

We define basic notions related to apportionment methods, such as elections, apportionments, apportionment rules, and properties of apportionment rules. We also prove the Balinski-Young impossibility theorem.

All definitions follow those given in a textbook by F. Pukelsheim [Puk17]. Distinction between weak and strong exactness is added, following [PPR16].

Main definitions #

Main statements #

Implementation details #

Formally, we should use p ∈ election.parties everywhere, in addition to simply writing p : Party, in the definitions of IsAnonymous, IsPopulationMonotone, etc. We omit this for simplicity, as for now, since it has not been needed in any proof so far. This is not surprising, as we define Election.votes with | _ => 0, so parties outside election.parties have no votes.

References #

structure Party :

Party (or candidate, state, etc.) in an election. They are identified by their name.

Instances For
    def instDecidableEqParty.decEq (x✝ x✝¹ : Party) :
    Decidable (x✝ = x✝¹)
    Equations
    Instances For
      Equations
      structure Election :

      An election with a finite set of parties, a function giving the number of votes for each party, and the total number of seats to be allocated.

      Instances For
        Equations
        Instances For
          @[reducible, inline]

          An apportionment is a function from parties to the number of seats allocated to each party.

          Equations
          Instances For
            structure Rule :

            An apportionment rule is a function that, given an election, returns a set of apportionments satisfying three properties:

            1. Non-emptiness: there is at least one apportionment returned;
            2. Inheritance of zeros: parties with zero votes are allocated zero seats;
            3. House size feasibility: the total number of seats allocated is equal to the house size.
            Instances For
              class IsAnonymous [Fintype Party] (rule : Rule) :

              A rule is anonymous if permuting the votes of the parties permutes the allocation of seats in the same way. Informally, the names of the parties do not matter.

              Instances
                class IsBalanced (rule : Rule) :

                A rule is balanced if whenever two parties p and q have the same number of votes, then the difference in the number of seats allocated to them is at most one.

                Instances
                  class IsConcordant (rule : Rule) :

                  A rule is concordant if whenever party p has fewer votes than party q, then p is allocated no more seats than q.

                  Instances
                    class IsDecent (rule : Rule) :

                    A rules is decent if scaling the number of votes for each party by the same positive integer does not change the apportionment.

                    Instances
                      class IsExact (rule : Rule) :

                      A rule is weakly exact if every Apportionment, when viewed as an input vote distribution Election.votes, is reproduced as the unique solution.

                      Instances
                        class IsQuotaRule (rule : Rule) :

                        A rule is a quota rule if the number of seats allocated to each party p is either the floor or the ceiling of its Hare-quota.

                        Instances

                          A rule is population monotone (or vote ratio monotone) if population paradoxes do not occur. A population paradox occurs when the support for party p increases at a faster rate than that for party q, but p loses seats while q gains seats.

                          Instances

                            If an anonymous rule is population monotone, then it is concordant.

                            theorem balinski_young [Fintype Party] (rule : Rule) [IsAnonymous rule] [h_quota : IsQuotaRule rule] :

                            Balinski-Young impossibility theorem: If an anonymous rule is a quota rule, then it is not population monotone. Thus, no apportionment method can satisfy both properties simultaneously.