AFTD Auto-Formalizing Theoretical Domains

dual_melas_window

def

For a field F finite-dimensional over ZMod 2, natural number k, elements α, c : F, and index i : ℕ, dual_melas_window k α c i is the word of length k mapping j : Fin k to dual_melas_seq α c ((i + j.val) % (2 ^ k - 1)).

Statement

noncomputable def dual_melas_window {F : Type*} [Field F] [Algebra (ZMod 2) F] [FiniteDimensional (ZMod 2) F] (k : ℕ) (α c : F) (i : ℕ) : Fin k → ZMod 2
Defined in
scout/2610-38017-on-the-b-symbol-weight-distribution-of-dual-melas-codes-and.md:1043
Verified
01 Nov 2026
Axioms
none listed
Built on 1
  • dual_melas_seqFor a field F equipped with an algebra structure over ZMod 2 and finite-dimensional over ZMod 2, elements α, c : F, and index i : ℕ,…
Used by 3
  • dual_melas_pattern_count_leFor any field F finite-dimensional over ZMod 2, natural number k, elements α, c ∈ F, and word w : Fin k → ZMod 2, dual_melas_pattern_count…
  • dual_melas_pattern_count_sumFor any field F finite-dimensional over ZMod 2, natural number k, and elements α, c ∈ F, the sum over all binary words w : Fin k → ZMod 2…
  • dual_melas_pattern_countFor a field F finite-dimensional over ZMod 2, natural number k, elements α, c : F, and word w : Fin k → ZMod 2, dual_melas_pattern_count k…

Read back from the Lean

Given a field $F$ that is a finite-dimensional algebra over $\mathbb{Z}/2\mathbb{Z}$, a natural number $k$, elements $\alpha, c \in F$, and a starting index $i \in \mathbb{N}$, dual_melas_window k α c i is defined as the function from $\mathrm{Fin}\ k$ to $\mathbb{Z}/2\mathbb{Z}$ that maps $j : \mathrm{Fin}\ k$ to dual_melas_seq α c ((i + j.val) % (2 ^ k - 1)).

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 length-k window starting at index i cyclically mod 2^k - 1 in the dual Melas sequence. -/
noncomputable def dual_melas_window {F : Type*} [Field F] [Algebra (ZMod 2) F] [FiniteDimensional (ZMod 2) F] (k : ℕ) (α c : F) (i : ℕ) : Fin k → ZMod 2 := fun j => dual_melas_seq α c ((i + j.val) % (2 ^ k - 1))
See it in the graphDiscuss this resultChallenge it