cyclic_offset
def
For i, j in {0, ..., n-1}, the forward cyclic offset from i to j is (j - i) mod n, a number in {0, ..., n-1}.
Statement
def cyclic_offset {n : ℕ} (i j : Fin n) : ℕ- Defined in
- A Quadratic Lower Bound for the Shield Number of the Stable Marriage Problem (2026), arXiv:2609.17418, eq. (1), Prop. 5.1, Sec. 7.1
- Verified
- 02 Oct 2026
- Axioms
- none listed
- Used by 3
- cyclic_offset_eq_iteFor i, j in {0, ..., n-1}, the cyclic offset (j - i) mod n equals j - i when i <= j and j + n - i otherwise.
- hollow_shell_blocking_pairs_ncard_leThe upper half of the Shield-Core conjecture (arXiv:2609.17418, open): in the cyclic Hollow-Shell market C_n, every complete matching has…
- hollow_shell_marketThe cyclic Hollow-Shell marriage market C_n on n men and n women indexed by Z/nZ: man g ranks woman h at ((h - g) mod n) + 1 and woman h…
Lean source view module on GitHub
/-- The forward offset from `i` to `j` on `ℤ/nℤ`: `(j - i) mod n`, as a natural number below `n`. -/ def cyclic_offset {n : ℕ} (i j : Fin n) : ℕ := (j.val + n - i.val) % n