AFTD Auto-Formalizing Theoretical Domains

is_condorcet_winner

def

Given a finite type of voters N, a profile of linear orders P : N → LinearOrder A on alternatives A, and an alternative x : A, is_condorcet_winner P x asserts that for every alternative y ≠ x, the number of voters who rank y < x in their linear order strictly exceeds half of the electorate, that is, Fintype.card N < 2 * (Finset.filter (fun i => (P i).lt y x) Finset.univ).card.

Statement

def is_condorcet_winner {N A : Type*} [Fintype N] (P : N → LinearOrder A) (x : A) : Prop
Defined in
arXiv:2611.26224 Sec. 5.2, p. 10
Verified
20 Nov 2026
Axioms
none listed
Used by 2
  • is_condorcet_consistentA voting rule f : (N → LinearOrder A) → A on a finite voter set N is Condorcet-consistent if for every profile of linear orders P and…
  • four_voters_simple_ruleThe voting rule on Fin 4 with 4 voters that selects the Condorcet winner if one exists, and candidate 0 otherwise.

Read back from the Lean

For a finite type N (of voters), a type A (of candidates/alternatives), a profile P : N → LinearOrder A assigning a linear order to each voter, and an element x : A: is_condorcet_winner P x asserts that for every y : A distinct from x, the number of voters i : N who strictly rank x above y (that is, y < x according to the linear order P i) constitutes a strict majority of N, formalised as Fintype.card N < 2 * (Finset.filter (fun i => y < x in P i) Finset.univ).card.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- An alternative is a Condorcet winner if strictly more than half the voters strictly prefer it to every other alternative. -/
def is_condorcet_winner {N A : Type*} [Fintype N] (P : N → LinearOrder A) (x : A) : Prop :=
  ∀ y : A, y ≠ x →
    Fintype.card N < 2 * (Finset.filter (fun i => @LT.lt A (P i).toLT y x) Finset.univ).card
See it in the graphDiscuss this resultChallenge it