AFTD Auto-Formalizing Theoretical Domains

dual_melas_joint_pattern_prob_nonneg

theoremverified

For any 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 nonnegative.

Statement

theorem dual_melas_joint_pattern_prob_nonneg
    {F : Type*} [Field F] [Algebra (ZMod 2) F] [FiniteDimensional (ZMod 2) F]
    (k : ℕ) (α c : F) (a b : ℕ) :
    0 ≤ dual_melas_joint_pattern_prob k α c a b
Source
step towards dual_melas_adjacent_cyclic_patterns_bivariate_poisson_limit
Verified
04 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 3
  • dual_melas_joint_pattern_probFor a field F finite-dimensional over ZMod 2, natural number k, elements α, c : F, and natural numbers a, b : ℕ,…
  • 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…
  • 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…

The proof, explained

The joint pattern probability is defined as the cardinality of the finite set of binary words satisfying the joint count criteria divided by $2^k$. Unfolding this definition reveals a fraction whose numerator is a finite cardinality (hence nonnegative in the real numbers) and whose denominator is $2^k > 0$. Nonnegativity of the quotient follows immediately by positivity reasoning.

  1. It suffices to show that the quotient defining the joint pattern probability is nonnegative.

    Unfolding the definition of `dual_melas_joint_pattern_prob`, the probability is defined as the cardinality of the finite set of words $w \\in (\\mathbb{Z}/2\\mathbb{Z})^k$ satisfying the joint pattern count conditions, cast to $\\mathbb{R}$ and divided by $2^k$.

    line 6

      unfold dual_melas_joint_pattern_prob
  2. The quotient is nonnegative. automation

    The numerator is the cardinality of a finite set (cast to $\\mathbb{R}$), which is at least zero, and the denominator is $2^k > 0$. The `positivity` tactic closes the goal by inspecting these signs.

    line 7

      positivity

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

/-- The joint pattern probability in the dual Melas sequence is nonnegative. -/theorem dual_melas_joint_pattern_prob_nonneg    {F : Type*} [Field F] [Algebra (ZMod 2) F] [FiniteDimensional (ZMod 2) F]    (k : ℕ) (α c : F) (a b : ℕ) :    0 ≤ dual_melas_joint_pattern_prob k α c a b := by  unfold dual_melas_joint_pattern_prob  positivity
See it in the graphDiscuss this resultChallenge it