op_491_eventual_threshold_le_of_stabilizes
If a natural number $N$ has the property that $A_q(n, \\{2,4\\}) = 1 + \\binom{n}{2}$ for all integers $n \\ge N$, then the eventual length threshold $N_*(q)$ is at most $N$.
Statement
theorem op_491_eventual_threshold_le_of_stabilizes (q N : ℕ)
(hN : ∀ n ≥ N, two_four_code_max_card q n = 1 + Nat.choose n 2) :
two_four_eventual_threshold q ≤ N- Source
- arXiv:2610.30613 Section 1
- Verified
- 24 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 2
- two_four_code_max_cardFor integers $q$ and $n$, $A_q(n, \{2,4\})$ is the supremum of cardinalities of finite subsets of $\mathrm{Fin}\, n \to \mathrm{Fin}\, q$…
- two_four_eventual_thresholdFor an integer $q$, the eventual length threshold $N_*(q)$ is the infimum of all integers $N$ such that…
- Used by 1
- op_491_threshold_le_two_q_minus_one_of_stabilizesIf $A_q(n, \\{2,4\\}) = 1 + \\binom{n}{2}$ holds at $n = 2q - 1$, at $n = 2q$, and for all $n \\ge 2q + 1$, then the eventual length…
Read back from the Lean
For any natural numbers $q$ and $N$, if for every natural number $n \ge N$, two_four_code_max_card q n = 1 + Nat.choose n 2 (that is, the maximum size of a subset of $(\mathrm{Fin}\ q)^n$ in which every pair of distinct elements has Hamming distance 2 or 4 is equal to $1 + \binom{n}{2}$), then two_four_eventual_threshold q ≤ N (that is, the infimum of all natural numbers satisfying this eventual stabilization condition is at most $N$).
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
The proof, explained
The theorem states that if the stabilization identity holds for all lengths $n \\ge N$, the threshold $N_*(q)$ is at most $N$. By definition, $N_*(q)$ is the infimum of all integers from which this stabilization holds; since $N$ satisfies the condition, it belongs to that set, and the result follows immediately because an infimum is bounded above by any member of the set.
The threshold $\\mathrm{two\\_four\\_eventual\\_threshold}(q)$ is at most $N$.
By definition, $\\mathrm{two\\_four\\_eventual\\_threshold}(q)$ is the infimum of the set of natural numbers $M$ for which the code capacity stabilizes at $1 + \\binom{n}{2}$ for all $n \\ge M$. The hypothesis $hN$ asserts that $N$ belongs to this set, so by `Nat.sInf_le`, the infimum is at most $N$.
uses
Nat.sInf_leunfold two_four_eventual_threshold exact Nat.sInf_le hN
Nat.sInf_le- For any set of natural numbers $s$ and any element $m \\in s$, the infimum $\\inf s$ is at most $m$.
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
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
/-- If A_q(n, {2,4}) stabilizes at 1 + choose n 2 from length N onwards, the threshold N_*(q) is at most N. -/theorem op_491_eventual_threshold_le_of_stabilizes (q N : ℕ) (hN : ∀ n ≥ N, two_four_code_max_card q n = 1 + Nat.choose n 2) : two_four_eventual_threshold q ≤ N := by unfold two_four_eventual_threshold exact Nat.sInf_le hN