AFTD Auto-Formalizing Theoretical Domains

ic_winner

def

For an online rule, a finite voter type V, and a preference profile prof on Fin T, ic_winner rule prof t evaluates ic_winner_nat on t.val and t.isLt to produce the winner in Fin T at round t.

Statement

def ic_winner {T : ℕ} (rule : OnlineICDecision T) {V : Type} [Fintype V]
    (prof : V → LinearOrder (Fin T)) (t : Fin T) : Fin T
Defined in
arXiv:2611.30683 Sec. 2.2 and Sec. 3.1, Stay or Switch? Metric Distortion with Online Candidate Arrivals
Verified
25 Nov 2026
Axioms
none listed
Built on 2
  • OnlineICDecisionFor a horizon T, OnlineICDecision T is the type of online decision rules that universally quantify over all finite types V of voters,…
  • ic_winner_natGiven an online rule, a finite voter type V, and an election profile prof of linear orders on Fin T, ic_winner_nat defines by recursion on…
Used by 6

Read back from the Lean

Given a natural number $T$, an online decision rule rule (which for any finite type $V'$, candidate/round $t' \in \mathrm{Fin}\; T$, and voter responses $V' \to \mathrm{Bool}$, outputs a $\mathrm{Bool}$), a finite type $V$, a preference profile prof : V \to \mathrm{LinearOrder}\;(\mathrm{Fin}\; T)$ assigning a linear order on $\mathrm{Fin}\; T$ to each $v \in V$, and a round $t \in \mathrm{Fin}\; T$, ic_winner rule prof t` defines the winning candidate in $\mathrm{Fin}\; T$ at step $t$ determined recursively by: - At round $0$, the winner is $0 \in \mathrm{Fin}\; T$. - At round $s + 1 \le t$, let $x_{\mathrm{prev}}$ be the winner at round $s$. Each voter $v \in V$ is queried for whether $x_{\mathrm{prev}} < s + 1$ according to the linear order prof v. If rule V ⟨s + 1, _⟩ (fun v => decide (x_{\mathrm{prev}} < s + 1)) evaluates to true, the winner becomes $s + 1$; otherwise, the winner remains $x_{\mathrm{prev}}$. The value of ic_winner is this winner after processing all rounds up to $t$.

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

/-- The winner at round t in Fin T under an online incumbent-challenger voting rule. -/
def ic_winner {T : ℕ} (rule : OnlineICDecision T) {V : Type} [Fintype V]
    (prof : V → LinearOrder (Fin T)) (t : Fin T) : Fin T := ic_winner_nat rule prof t.val t.isLt
See it in the graphDiscuss this resultChallenge it