AFTD Auto-Formalizing Theoretical Domains

dual_melas_pattern_count

def

For 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 α c w is the number of indices i : Fin (2 ^ k - 1) such that dual_melas_window k α c i.val = w.

Statement

noncomputable def dual_melas_pattern_count {F : Type*} [Field F] [Algebra (ZMod 2) F] [FiniteDimensional (ZMod 2) F] (k : ℕ) (α c : F) (w : Fin k → ZMod 2) : ℕ
Defined in
scout/2610-38017-on-the-b-symbol-weight-distribution-of-dual-melas-codes-and.md:1040
Verified
01 Nov 2026
Axioms
none listed
Built on 1
  • dual_melas_windowFor 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…
Used by 8

Read back from the Lean

For a field F that is a finite-dimensional algebra over ZMod 2, a natural number k, elements α, c : F, and a function w : Fin k → ZMod 2, dual_melas_pattern_count defines a natural number equal to the number of elements i : Fin (2 ^ k - 1) such that dual_melas_window k α c i.val = w.

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 number of cyclic occurrences of pattern w in one period of length 2^k - 1 of the dual Melas sequence. -/
noncomputable def dual_melas_pattern_count {F : Type*} [Field F] [Algebra (ZMod 2) F] [FiniteDimensional (ZMod 2) F] (k : ℕ) (α c : F) (w : Fin k → ZMod 2) : ℕ := Finset.card (Finset.filter (fun (i : Fin (2 ^ k - 1)) => dual_melas_window k α c i.val = w) Finset.univ)
See it in the graphDiscuss this resultChallenge it