dual_melas_joint_pattern_prob
For a field F finite-dimensional over ZMod 2, natural number k, elements α, c : F, and natural numbers a, b : ℕ, dual_melas_joint_pattern_prob k α c a b is the proportion of words w : Fin k → ZMod 2 satisfying dual_melas_pattern_count k α c w = a and dual_melas_pattern_count k α c (cyclic_rotate_left k w) = b, divided by 2^k.
Statement
noncomputable def dual_melas_joint_pattern_prob {F : Type*} [Field F] [Algebra (ZMod 2) F] [FiniteDimensional (ZMod 2) F] (k : ℕ) (α c : F) (a b : ℕ) : ℝ
- 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 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…
- cyclic_rotate_leftGiven a type α, a natural number k, and a word w : Fin k → α, cyclic_rotate_left k w is the function Fin k → α mapping each index j : Fin…
- Used by 4
- dual_melas_joint_pattern_prob_sumFor any field F finite-dimensional over ZMod 2, natural number k, and elements α, c ∈ F, the sum of dual_melas_joint_pattern_prob k α c a…
- dual_melas_joint_pattern_prob_eq_zero_of_geFor any field F finite-dimensional over ZMod 2, natural number k, elements α, c ∈ F, and natural numbers a, b such that 2^k ≤ a or 2^k ≤…
- dual_melas_joint_pattern_prob_le_oneFor any field F finite-dimensional over ZMod 2, natural number k, elements α, c ∈ F, and natural numbers a, b,…
- dual_melas_joint_pattern_prob_nonnegFor any field F finite-dimensional over ZMod 2, natural number k, elements α, c ∈ F, and natural numbers a, b,…
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 natural numbers a, b : ℕ, dual_melas_joint_pattern_prob k α c a b defines the real number obtained by dividing:
1. The cardinality of the set of binary words w : Fin k → ZMod 2 satisfying:
- dual_melas_pattern_count k α c w = a, and
- dual_melas_pattern_count k α c (cyclic_rotate_left k w) = b
by
2. 2 ^ k (cast to ℝ).
That is, it defines the probability (under the uniform distribution on (ZMod 2)^k) that a randomly chosen length-k binary word w appears as a window in the dual Melas sequence exactly a times, and its cyclic left shift appears exactly b times.
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 empirical joint probability that N_W = a and N_{RW} = b for uniform random W in (Fin k → ZMod 2). -/ noncomputable def dual_melas_joint_pattern_prob {F : Type*} [Field F] [Algebra (ZMod 2) F] [FiniteDimensional (ZMod 2) F] (k : ℕ) (α c : F) (a b : ℕ) : ℝ := (Finset.card (Finset.filter (fun (w : Fin k → ZMod 2) => dual_melas_pattern_count k α c w = a ∧ dual_melas_pattern_count k α c (cyclic_rotate_left k w) = b) Finset.univ) : ℝ) / (2 ^ k : ℝ)