binary_repetition_code_card
theoremverified
For an explicit natural number n with 1 ≤ n, the cardinality of the finite set binary_repetition_code n is 2.
Statement
lemma binary_repetition_code_card (n : ℕ) (hn : 1 ≤ n) :
(binary_repetition_code n).card = 2- Source
- arXiv:2611.18156 Section IV-A
- Verified
- 16 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 1
- binary_repetition_codeFor an explicit natural number n, the binary repetition code
binary_repetition_code nis theFinset (Fin n → Fin 2)containing the…
- binary_repetition_codeFor an explicit natural number n, the binary repetition code
- Used by 1
- binary_repetition_code_is_joint_perfect_codeFor an explicit natural number n with 2 ≤ n and natural numbers c, c' such that 2 * c + c' + 1 = n, the binary repetition code of length n…
Read back from the Lean
For every natural number $n$, if $1 \le n$, then the cardinality of the finset binary_repetition_code n is 2.
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 binary repetition code of length n ≥ 1 contains exactly 2 codewords. -/ lemma binary_repetition_code_card (n : ℕ) (hn : 1 ≤ n) : (binary_repetition_code n).card = 2 := by rw [binary_repetition_code] apply Finset.card_pair intro h have h0 := congrFun h ⟨0, by omega⟩ exact Fin.zero_ne_one h0