AFTD Auto-Formalizing Theoretical Domains

cyclic_latin_market

def

For an ordering a of Z/nZ, the opposed cyclic Latin marriage market has men and women Z/nZ where man i ranks woman j by increasing rank L_a(i,j), and woman j ranks man i by decreasing rank L_a(i,j), where L_a(i,j) is the index r with i + j = a_r.

Statement

def cyclic_latin_market (n : ℕ) (a : Fin n ≃ ZMod n) :
    MarriageMarket (ZMod n) (ZMod n)
Defined in
Benjamin, Converse, Krieger (1995)
Verified
10 Nov 2026
Axioms
none listed
Built on 1
  • MarriageMarketA marriage market with types M and W consists of a relation pref_m : M → W → W → Prop representing men's preferences over women, and a…
Used by 3

Read back from the Lean

cyclic_latin_market defines a MarriageMarket (ZMod n) (ZMod n) parameterized by a natural number n and an equivalence a : Fin n ≃ ZMod n. In this market, both the set of men and the set of women are ZMod n: - Man i prefers woman j over woman j' (pref_m i j j') if and only if (a.symm (i + j) : ℕ) < (a.symm (i + j') : ℕ). - Woman j prefers man i over man i' (pref_w j i i') if and only if (a.symm (i' + j) : ℕ) < (a.symm (i + 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 opposed cyclic Latin marriage market associated with an ordering a of Z/nZ. -/
def cyclic_latin_market (n : ℕ) (a : Fin n ≃ ZMod n) :
    MarriageMarket (ZMod n) (ZMod n) where
  pref_m i j j' := (a.symm (i + j) : ℕ) < (a.symm (i + j') : ℕ)
  pref_w j i i' := (a.symm (i' + j) : ℕ) < (a.symm (i + j) : ℕ)
See it in the graphDiscuss this resultChallenge it