AFTD Auto-Formalizing Theoretical Domains

fhs_hamming_autocorr

def

For a frequency hopping sequence X : Fin v → Fin s and a shift τ : Fin v, the periodic Hamming autocorrelation at shift τ is the number of indices j ∈ Fin v such that X(j) = X(j + τ).

Statement

def fhs_hamming_autocorr {v s : ℕ} (X : Fin v → Fin s) (τ : Fin v) : ℕ
Defined in
arXiv:2611.11747, Section 1
Verified
10 Nov 2026
Axioms
none listed
Used by 1
  • fhs_autocorr_leA frequency hopping sequence X : Fin v → Fin s has periodic Hamming autocorrelation bounded by b if for all nonzero shifts τ, the Hamming…

Read back from the Lean

Given natural numbers $v$ and $s$, a function $X : \mathrm{Fin}(v) \to \mathrm{Fin}(s)$, and an element $\tau \in \mathrm{Fin}(v)$, fhs_hamming_autocorr X τ is defined as the number of indices $j \in \mathrm{Fin}(v)$ such that $X(j) = X(j + \tau)$ (where addition $j + \tau$ is addition in $\mathrm{Fin}(v)$, i.e., modulo $v$).

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

/-- Periodic Hamming autocorrelation of a frequency hopping sequence at shift τ -/
def fhs_hamming_autocorr {v s : ℕ} (X : Fin v → Fin s) (τ : Fin v) : ℕ := (Finset.univ.filter (fun j => X j = X (j + τ))).card
See it in the graphDiscuss this resultChallenge it