AFTD Auto-Formalizing Theoretical Domains

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 n is the Finset (Fin n → Fin 2) containing the…
Used by 1

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
See it in the graphDiscuss this resultChallenge it