AFTD Auto-Formalizing Theoretical Domains

ArrowTheorem.abVotes

defimported Lean

Given a profile $p$, the vote vectors $\mathrm{abVotes}(p)$, $\mathrm{bcVotes}(p)$, $\mathrm{caVotes}(p) \in \{0,1\}^n$ record each voter's pairwise preference.

Statement

set_option maxHeartbeats 800000 in
open scoped BigOperators in
open BooleanAnalysis in
variable {n : ℕ} in
def ArrowTheorem.abVotes (p : Profile n) : BoolCube n
Defined in
TCSlib, `ArrowTheorem.abVotes`
Lean proof
By Mina, Allan Li, Owen McGinty (from the file's git history), from github.com/Shilun-Allan-Li/tcslib at c8a02591b1e5 (Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.25.0.
Verified
07 Oct 2026
Axioms
none listed
Built on 3
  • ArrowTheorem.ProfileA profile assigns each of the $n$ voters one of the 6 orderings: $p : \mathrm{Fin}\,n \to \mathrm{Fin}\,6$.
  • ArrowTheorem.abPref$\mathrm{abPref}(k)$, $\mathrm{bcPref}(k)$, $\mathrm{caPref}(k)$ give the Boolean preference of ordering $k\in\{0,\dots,5\}$ in the…
  • BooleanAnalysis.BoolCubeThe Boolean hypercube of dimension $n$ is $\{0,1\}^n$, represented as the function type $\mathrm{Fin}\,n \to \mathrm{Bool}$.
Used by 6

Lean source view module on GitHub

set_option maxHeartbeats 800000 in
open scoped BigOperators in
open BooleanAnalysis in
variable {n : ℕ} in
/-- Given a profile, the a-vs-b preference vector of all n voters. -/
def ArrowTheorem.abVotes (p : Profile n) : BoolCube n := fun i => abPref (p i)
See it in the graphDiscuss this resultChallenge it