Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proposition 14 — from dual-good to self-dual codes

Proved
MetricSelfDualCompletion.Completion.proposition_14

by mikedeng1 · Nov 8, 2026 · Mathlib 0df444a (Lean v4.33.1)

coding-theorycomplexity-theorydual-good-codesp2o-batch-stoc27ap2o-gran-per-chapterp2o-plan-paperp2o-strengthenedp2o-v1self-dual-codes

This is Proposition 14 of the paper.

Let δ>0\delta>0δ>0 and let D≤F2nD\le\mathbb F_2^nD≤F2n​ be a binary linear code with

d(D)≥δnandd(D⊥)≥δn.d(D)\ge\delta n\qquad\text{and}\qquad d(D^\perp)\ge\delta n.d(D)≥δnandd(D⊥)≥δn.

Then one can deterministically and in time polynomial in nnn construct a self-dual code P≤F24nP\le\mathbb F_2^{4n}P≤F24n​ with

dim⁡P=2nandd(P)≥δn.\dim P=2n\qquad\text{and}\qquad d(P)\ge\delta n .dimP=2nandd(P)≥δn.

Thus PPP has rate 1/21/21/2 and relative distance at least δ/4\delta/4δ/4, i.e. d(P)≥(δ/4)⋅4nd(P)\ge(\delta/4)\cdot 4nd(P)≥(δ/4)⋅4n.

Combined with a dual-good family (Theorem 11) this yields self-dual codes of linear length and linear distance (Proposition 7).

Formalization Note The construction is one fixed PvsNP.PolyTimeComputable function mapping an encoded row basis of DDD (dimensions in unary) to an encoded row basis of PPP. Distance bounds are HasMinDistAtLeast (every nonzero codeword has weight at least the bound). n=0n=0n=0 is admitted and holds trivially.

Differences from the source:

  • encoding: "deterministically and in poly(n)-time construct" → a fixed PvsNP.PolyTimeComputable function mapping an encoded row basis of DDD (dimensions in unary) to an encoded row basis of PPP; reason: codes are specified by bases (§2.1); the machine model measures input length; no instance changes.
  • generalization: "Let δ > 0 … we can construct" (algorithm possibly depending on δ) → one algorithm, chosen before δ\deltaδ, for all δ>0\delta>0δ>0; reason: ∃f ∀δ implies ∀δ ∃f, so it specializes to the source; δ is not an input of the construction.
  • reading: "construct … P" from DDD → one PPP per (δ,D)(\delta,D)(δ,D), reached from every row basis of DDD; reason: P is constructed from the code D; the stronger reading.
Preamble
import Mathlib
import Definitions.Def_QAlgorithms_Defs_TensorCode
import Definitions.Def_PvsNP
import Definitions.Def_MetricSelfDualCompletion_Completion_Codes
import Definitions.Def_MetricSelfDualCompletion_Completion_Encoding
Formal statement
namespace MetricSelfDualCompletion.Completion

open QAlgorithms

/-- Proposition 14 (From dual-good to self-dual codes), printed p. 12 / PDF p. 14. Let `δ > 0`.
For every `D ⩽ F₂ⁿ` with `d(D) ⩾ δn` and `d(D^⊥) ⩾ δn` there is a self-dual `P ⩽ F₂^{4n}` with
`dim P = 2n` (rate `1/2`) and `d(P) ⩾ δn = (δ/4)·4n` (relative distance `⩾ δ/4`), and one fixed
deterministic polynomial-time machine maps every row basis of `D` to a row basis of `P`. -/
theorem proposition_14 :
    ∃ f : List Bool → List Bool, PvsNP.PolyTimeComputable f ∧
    ∀ (δ : ℝ), 0 < δ → ∀ (n : ℕ) (D : Submodule (ZMod 2) (Fin n → ZMod 2)),
      HasMinDistAtLeast D (δ * n) → HasMinDistAtLeast (codeDual D) (δ * n) →
      ∃ P : Submodule (ZMod 2) (Fin (4 * n) → ZMod 2),
        IsSelfDual P ∧ Module.finrank (ZMod 2) P = 2 * n ∧
        HasMinDistAtLeast P (δ * n) ∧ HasMinDistAtLeast P (δ / 4 * ((4 * n : ℕ) : ℝ)) ∧
        ∀ (k : ℕ) (B : Fin k → Fin n → ZMod 2), IsRowBasis B D →
          ∃ (r : ℕ) (B' : Fin r → Fin (4 * n) → ZMod 2),
            IsRowBasis B' P ∧ f (encMatrix B) = encMatrix B' := by sorry

end MetricSelfDualCompletion.Completion
Source
Rafail Ostrovsky, STOC 2027 submission #5 (October 2026), §5.3, Proposition 14, printed p. 12 (PDF p. 14). https://github.com/sigact-stoc/stoc2027/releases/download/papers-1/5.pdf
Human review
  • Endorsed by Shuze Chen · Nov 8, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Nov 8, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me