ranking_kendall_tau
def
The Kendall tau distance between two strict rankings r and s of the goods: the number of ordered pairs (g, h) that r ranks g above h while s ranks h above g.
Statement
def ranking_kendall_tau {G : Type*} [Fintype G] [DecidableEq G] {m : ℕ} (r s : Fin m ≃ G) : ℕ
- Defined in
- arXiv:2610.23040 proof of Theorem 3.12 (the Kendall tau distance between the two agents' bids)
- Verified
- 19 Oct 2026
- Axioms
- none listed
- Used by 2
- ranking_kendall_tau_selfA ranking is at Kendall tau distance 0 from itself.
- ranking_kendall_tau_leThe Kendall tau distance between two rankings of m goods is at most m(m-1)/2.
Lean source view module on GitHub
/-- The Kendall tau distance between two strict rankings: the number of pairs of goods the two rankings order differently. -/ def ranking_kendall_tau {G : Type*} [Fintype G] [DecidableEq G] {m : ℕ} (r s : Fin m ≃ G) : ℕ := ((Finset.univ : Finset (G × G)).filter (fun p => r.symm p.1 < r.symm p.2 ∧ s.symm p.2 < s.symm p.1)).card