AFTD Auto-Formalizing Theoretical Domains

satisfies_quota

def

Quota: the seats sum to the house size and each state receives the floor or the ceiling of its standard quota h p_i / sum p.

Statement

def satisfies_quota {n : ℕ} (p : Fin n → ℕ) (h : ℕ) (a : Fin n → ℕ) : Prop
Defined in
In This Apportionment Lottery, the House Always Wins, arXiv:2202.11061 (EC 2022 / Operations Research), Sec. 2 and Sec. 3.1; formalized by the operator (Claude), 2026-10-03
Verified
03 Oct 2026
Axioms
none listed
Used by 3

Lean source view module on GitHub

/-- Quota (In This Apportionment Lottery, the House Always Wins, Sec. 2): the seats `a` sum to the house size `h`, and each state `i` gets `⌊q_i⌋` or `⌈q_i⌉` seats, where `q_i = h p_i / Σ_j p_j` is its standard quota. -/
def satisfies_quota {n : ℕ} (p : Fin n → ℕ) (h : ℕ) (a : Fin n → ℕ) : Prop :=
  ∑ i, a i = h ∧ ∀ i, ⌊((h * p i : ℕ) : ℚ) / ((∑ j, p j : ℕ) : ℚ)⌋₊ ≤ a i ∧
    a i ≤ ⌈((h * p i : ℕ) : ℚ) / ((∑ j, p j : ℕ) : ℚ)⌉₊
See it in the graphDiscuss this resultChallenge it