AFTD Auto-Formalizing Theoretical Domains

hamming_ring_subset_ball

theoremverified

Given implicit parameters n and q, for any x : Fin n → Fin q, the (c, c') Hamming ring centered at x is a subset of the Hamming ball of radius c + c' centered at x.

Statement

theorem hamming_ring_subset_ball {n q : ℕ} (c c' : ℕ) (x : Fin n → Fin q) :
    hamming_ring c c' x ⊆ hamming_ball (c + c') x
Source
arXiv:2611.18156 Section III
Verified
16 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 2
  • hamming_ballGiven implicit parameters n and q, the Hamming ball hamming_ball r x of radius r centered at x : Fin n → Fin q is the finite set…
  • hamming_ringGiven implicit parameters n and q, the (c, c') Hamming ring hamming_ring c c' x centered at x : Fin n → Fin q is the finite set (Finset)…

Read back from the Lean

For any natural numbers $n$ and $q$, any natural numbers $c$ and $c'$, and any function $x : \mathrm{Fin}\ n \to \mathrm{Fin}\ q$, the Hamming ring centered at $x$ with bounds $c$ and $c'$ (hamming_ring c c' x) is a subset of the Hamming ball of radius $c + c'$ centered at $x$ (hamming_ball (c + c') x).

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 (c, c') Hamming ring centered at x is a subset of the Hamming ball of radius c + c' centered at x. -/
theorem hamming_ring_subset_ball {n q : ℕ} (c c' : ℕ) (x : Fin n → Fin q) :
    hamming_ring c c' x ⊆ hamming_ball (c + c') x := by
  intro y hy
  simp only [hamming_ring, hamming_ball, Finset.mem_filter, Finset.mem_univ,
    true_and] at hy ⊢
  exact hy.2
See it in the graphDiscuss this resultChallenge it