cyclic_latin_rank_sum
Given an order n with [NeZero n], a bijection a : Fin n ≃ ZMod n, and a matching permutation π : Equiv.Perm (ZMod n), the aggregate proposer rank cyclic_latin_rank_sum n a π is the sum over all men i : ZMod n of the rank (a.symm (i + π i) : ℕ).
Statement
open scoped BigOperators in def cyclic_latin_rank_sum (n : ℕ) [NeZero n] (a : Fin n ≃ ZMod n) (π : Equiv.Perm (ZMod n)) : ℕ
- Defined in
- OP-1351
- Verified
- 10 Nov 2026
- Axioms
- none listed
- Used by 3
- cyclic_latin_rank_matching_rank_sumFor the rotation matching μ_r(i) = a r - i, the aggregate proposer rank is constant equal to r, hence its total is n * r.
- cyclic_latin_stable_rank_polynomial_order_threeFor n = 3, any two ordering bijections a and b from Fin 3 to ZMod 3 have identical stable-matching rank polynomials:…
- cyclic_latin_rank_polynomialGiven an order n with [NeZero n] and a bijection a : Fin n ≃ ZMod n, cyclic_latin_rank_polynomial n a is the polynomial in ℤ[X] defined by…
Read back from the Lean
Given a natural number $n$ with $n \neq 0$ ([NeZero n]), an equivalence $a : \mathrm{Fin}(n) \simeq \mathbb{Z}/n\mathbb{Z}$, and a permutation $\pi$ of $\mathbb{Z}/n\mathbb{Z}$, cyclic_latin_rank_sum n a π is defined as the sum over all $i \in \mathbb{Z}/n\mathbb{Z}$ of the natural number value of $a^{-1}(i + \pi(i))$ (where $a^{-1}(i + \pi(i)) \in \mathrm{Fin}(n)$ is coerced to $\mathbb{N}$).
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
open scoped BigOperators in /-- Aggregate proposer rank of a matching under cyclic Latin ordering a. -/ def cyclic_latin_rank_sum (n : ℕ) [NeZero n] (a : Fin n ≃ ZMod n) (π : Equiv.Perm (ZMod n)) : ℕ := ∑ i : ZMod n, (a.symm (i + π i) : ℕ)