Formal Foundations and Proof-Carrying Certificates for q-ary Covering Codes in Lean 4
Covering codes in finite Hamming spaces ask for small sets of words whose Hamming balls cover the entire space. Existing bounds rely on mixtures of constructions, counting arguments, and computer searches, but lack machine-checked formal guarantees.
The authors present a Lean 4 formalization of q-ary covering code theory, centered on certificate predicates for upper bounds, lower bounds, and exact covering numbers K_q(n,r). The formalization proves the q-ary Hamming-ball volume formula, the sphere-covering lower bound, elementary exact cases, product and relation rules, and selected small exact certificates. An end-to-end workflow checks explicit upper bounds transcribed from existing tables. The database is proof-carrying: stored bounds have traces that replay to Lean proofs of the corresponding predicates.
The contribution is a reusable, auditable Lean 4 foundation for machine-checked covering-code certificates. It covers the complete elementary theory including the volume formula, sphere-covering bound, product constructions, and verified database entries from van Laarhoven et al. (1989).
