cyclic_consecutive_gcd_eq
Two ordering bijections a and b from Fin n to ZMod n satisfy cyclic_consecutive_gcd_eq a b if for every natural number r with r + 1 < n, Nat.gcd n (a ⟨r + 1, hr⟩ - a ⟨r, by omega⟩).val = Nat.gcd n (b ⟨r + 1, hr⟩ - b ⟨r, by omega⟩).val.
Statement
def cyclic_consecutive_gcd_eq {n : ℕ} (a b : Fin n ≃ ZMod n) : Prop
- Defined in
- OP-1351
- Verified
- 10 Nov 2026
- Axioms
- none listed
Read back from the Lean
For a given natural number $n$ and two bijections $a, b : \mathrm{Fin}\ n \simeq \mathrm{ZMod}\ n$, cyclic_consecutive_gcd_eq a b asserts that: for every natural number $r$ and every hypothesis $hr : r + 1 < n$, the greatest common divisor of $n$ and $(a(\langle r + 1, hr \rangle) - a(\langle r, \dots \rangle)).\mathrm{val}$ is equal to the greatest common divisor of $n$ and $(b(\langle r + 1, hr \rangle) - b(\langle r, \dots \rangle)).\mathrm{val}$, where the subtraction is in $\mathrm{ZMod}\ n$ and .val denotes the canonical natural number representative.
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
/-- Two orderings share the same consecutive symbol-difference gcd sequence. -/ def cyclic_consecutive_gcd_eq {n : ℕ} (a b : Fin n ≃ ZMod n) : Prop := ∀ (r : ℕ) (hr : r + 1 < n), Nat.gcd n (a ⟨r + 1, hr⟩ - a ⟨r, by omega⟩).val = Nat.gcd n (b ⟨r + 1, hr⟩ - b ⟨r, by omega⟩).val