AFTD Auto-Formalizing Theoretical Domains

rank_score_candidate_weight_pos_of_last_pos

theoremverified

If s is a positional scoring vector whose last-place score is positive then every candidate has strictly positive rank-score weight.

Statement

theorem rank_score_candidate_weight_pos_of_last_pos :
    ∀ (C : Type*) [Fintype C] [DecidableEq C] (hm : 2 ≤ Fintype.card C)
      (s : Fin (Fintype.card C) → ℚ) (hs : is_positional_scoring_vector (Fintype.card C) s)
      (hs_last : 0 < scoring_last (Fintype.card C) (by omega) s)
      (V : Type*) [Fintype V] [Nonempty V]
      (prof : V → LinearOrder C) (c : C),
      0 < rank_score_candidate_weight s prof c
Source
step towards rank_score_veto_core_tightness_conjecture
Verified
26 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 5
  • candidate_rankGiven a finite candidate type C with decidable equality, a linear order ord on C, and a candidate c in C, candidate_rank ord c is the…
  • rank_score_candidate_weightGiven a nonempty finite type of voters V, a finite type of candidates C with decidable equality, a scoring function s : Fin (Fintype.card…
  • is_positional_scoring_vectorA scoring vector s in Q^m is a non-increasing vector of non-negative rational numbers normalized with s_1 = 1.
  • scoring_norm_oneThe 1-norm of a scoring vector s in Q^m is the sum of its entries.
  • scoring_lastGiven a natural number m with 2 ≤ m and a scoring vector s : Fin m → ℚ, scoring_last m hm s is the value of s at the last index m - 1.

Lean source view module on GitHub

/-- Positive last-place score makes every candidate's rank-score weight positive, so the fractional matching puts mass on every candidate. -/
theorem rank_score_candidate_weight_pos_of_last_pos :
    ∀ (C : Type*) [Fintype C] [DecidableEq C] (hm : 2 ≤ Fintype.card C)
      (s : Fin (Fintype.card C) → ℚ) (hs : is_positional_scoring_vector (Fintype.card C) s)
      (hs_last : 0 < scoring_last (Fintype.card C) (by omega) s)
      (V : Type*) [Fintype V] [Nonempty V]
      (prof : V → LinearOrder C) (c : C),
      0 < rank_score_candidate_weight s prof c := by
  intro C _ _ hm s hs hs_last V _ _ prof c
  have h_elem_pos : ∀ k : Fin (Fintype.card C), 0 < s k := by
    intro k
    have h_le : k ≤ ⟨Fintype.card C - 1, by omega⟩ := by
      rw [Fin.le_def]
      exact Nat.le_pred_of_lt k.isLt
    have h_s := hs.1 k ⟨Fintype.card C - 1, by omega⟩ h_le
    dsimp [scoring_last] at hs_last
    exact lt_of_lt_of_le hs_last h_s
  have h_num_pos : 0 < ∑ v : V, s (candidate_rank (prof v) c) := by
    apply Finset.sum_pos
    · intro v _
      exact h_elem_pos (candidate_rank (prof v) c)
    · exact Finset.univ_nonempty
  have h_V_pos : (0 : ℚ) < (Fintype.card V : ℚ) := Nat.cast_pos.mpr Fintype.card_pos
  have h_norm_pos : 0 < scoring_norm_one s := by
    dsimp [scoring_norm_one]
    apply Finset.sum_pos
    · intro i _
      exact h_elem_pos i
    · have : 0 < Fintype.card C := by omega
      exact ⟨⟨0, this⟩, Finset.mem_univ _⟩
  have h_den_pos : 0 < (Fintype.card V : ℚ) * scoring_norm_one s := mul_pos h_V_pos h_norm_pos
  dsimp [rank_score_candidate_weight]
  exact div_pos h_num_pos h_den_pos
See it in the graphDiscuss this resultChallenge it