Documentation

LeanPool.Apportionment.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 [Pukelsheim2017]. Distinction between weak and strong exactness is added, following [PalomaresPukelsheimRamirez2016].

Main definitions #

Main statements #

References #

@[reducible, inline]
abbrev Apportionment (n : ) :

An apportionment is a vector of natural numbers representing the number of seats allocated to each party (at the corresponding index).

Equations
Instances For

    An election with a vector of votes for n parties (at the corresponding indices) and the total number of seats to be allocated.

    • votes : Vector n

      The number of votes for each of the n parties.

    • houseSize : ℕ+

      The total number of seats to be allocated.

    • votes_sum_pos : 0 < self.votes.sum

      At least one party must have received some votes.

    Instances For
      def Apportionment.instDecidableEqElection.decEq {n✝ : } (x✝ x✝¹ : Election n✝) :
      Decidable (x✝ = x✝¹)
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        @[implicit_reducible]
        Equations
        • One or more equations did not get rendered due to their size.
        def Apportionment.Election.mkByPerm {n : } (election : Election n) (σ : Equiv.Perm (Fin n)) :

        Create a new election by permuting the vote distribution of parties according to permutation σ.

        Equations
        Instances For
          def Apportionment.Election.mkByScale {n : } (election : Election n) (k : ℕ+) :

          Create a new election by scaling all votes by a positive constant k.

          Equations
          Instances For
            theorem Apportionment.Election.n_pos {n : } (election : Election n) :
            0 < n

            The number of parties in an election is positive.

            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

              A rule is anonymous if permuting the votes of the parties permutes the allocation of seats in the same way.

              Instances

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

                • balanced {n : } (election : Election n) (i j : Fin n) : election.votes[i] = election.votes[j]Apprule.res election, App[i].dist App[j] 1

                  Equal vote counts produce seat counts that differ by at most one.

                Instances

                  A rule is concordant if whenever one party has fewer votes than another, then it is allocated no more seats than that other party.

                  Instances

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

                    • decent {n : } (election : Election n) (k : ℕ+) : let election' := election.mkByScale k; rule.res election' = rule.res election

                      Scaling all vote counts by a positive integer leaves the apportionment unchanged.

                    Instances

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

                      • exact {n : } (election : Election n) (App : Apportionment n) (hApp : App rule.res election) : let election' := { votes := App, houseSize := election.houseSize, votes_sum_pos := }; rule.res election' = {App}

                        An apportionment, treated as a vote distribution, is the unique apportionment of itself.

                      Instances

                        A rule is a quota rule if the number of seats allocated to each party 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 i increases at a faster rate than that for party j, but i loses seats while j gains seats.

                          • population_monotone {n : } (election₁ election₂ : Election n) (i j : Fin n) : election₁.houseSize = election₂.houseSizeelection₂.votes[i] * election₁.votes[j] > election₂.votes[j] * election₁.votes[i]App₁rule.res election₁, App₂rule.res election₂, ¬(App₁[i] > App₂[i] App₁[j] < App₂[j])

                            Faster vote growth for i than for j rules out i losing seats while j gains them.

                          Instances

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

                            theorem Apportionment.balinski_young (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.