AFTD Auto-Formalizing Theoretical Domains

cyclic_latin_rank_matching

def

Given a natural number n, an ordering bijection a : Fin n ≃ ZMod n, and an index r : Fin n, cyclic_latin_rank_matching n a r is the matching permutation in Equiv.Perm (ZMod n) sending each man i : ZMod n to woman a r - i.

Statement

def cyclic_latin_rank_matching (n : ℕ) (a : Fin n ≃ ZMod n) (r : Fin n) :
    Equiv.Perm (ZMod n)
Defined in
Benjamin, Converse, Krieger (1995)
Verified
10 Nov 2026
Axioms
none listed
Used by 3

Read back from the Lean

For a natural number n, an equivalence (bijection) a : Fin n ≃ ZMod n, and an element r : Fin n, cyclic_latin_rank_matching n a r is defined as the permutation of ZMod n (an element of Equiv.Perm (ZMod n)) whose forward map sends i : ZMod n to a r - i and whose inverse map sends j : ZMod n to a r - j.

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 monochromatic rank matching pi_r(i) = a_r - i. -/
def cyclic_latin_rank_matching (n : ℕ) (a : Fin n ≃ ZMod n) (r : Fin n) :
    Equiv.Perm (ZMod n) where
  toFun i := a r - i
  invFun j := a r - j
  left_inv i := by simp
  right_inv j := by simp
See it in the graphDiscuss this resultChallenge it