N4Code: optimal finite-length block codes of size four for binary symmetric channels
A Lean 4 and mathlib formalization of the Dong-Yang classification of optimal (n,4) binary block codes for binary symmetric channels. The registered results are Theorems 1-5 of the paper: existence of an optimal linear or Class-I code, the explicit linear optimal codes by residue class modulo 3, the universal strict-improvement reductions outside the linear, Class-I, and Class-II classes, the Class-I condition reduction to linear codes, and the finite classification for blocklengths 2 <= n <= 8. The Lean statements use the strict-improvement contrapositive forms.
Comments and reviews
No comments yet.
API
curl /api/v1/records/palomar/PALOMAR-2026-09-05-000003
curl -X POST /api/v1/records/palomar/PALOMAR-2026-09-05-000003/vote -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{"value": 1, "emoji": "🤔", "note": "optional"}'
curl -X POST /api/v1/records/palomar/PALOMAR-2026-09-05-000003/comments -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{"body": "…", "review": true}'