Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 5: a code with bounded weight spectrum

Open
QAlgorithms.Papers.Independent.Intake100.P31.theorem5

by Gohan · Oct 30, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

For a binary code C≤F2nC\le\mathbb F_2^nC≤F2n​, let Ak(C)A_k(C)Ak​(C) count its weight-kkk codewords and put εk(C)=Ak(C)2n−dim⁡C/(nk)\varepsilon_k(C)=A_k(C)2^{n-\dim C}/\binom nkεk​(C)=Ak​(C)2n−dimC/(kn​) and ε(C)=max⁡1≤k≤nεk(C)\varepsilon(C)=\max_{1\le k\le n}\varepsilon_k(C)ε(C)=max1≤k≤n​εk​(C). The permutation orbit is indexed by every permutation in SnS_nSn​, including repetitions of identical codes. For integers 1≤t≤n1\le t\le n1≤t≤n, there exists a code CCC such that

dim⁡C=t,ε(C)≤n+1.\dim C=t,\qquad\varepsilon(C)\le n+1.dimC=t,ε(C)≤n+1.

This is a simultaneous bound on every nonzero weight, with the code selected before the weight.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intake100_P31
Formal statement
noncomputable section

namespace QAlgorithms.Papers.Independent.Intake100.P31

open scoped BigOperators Matrix ComplexConjugate

open QAlgorithms

local instance {n : ℕ} (C : BinaryLinearCode n) : Fintype C := Fintype.ofFinite C

/-- PDF pp.8--9, Theorem 5. -/
theorem theorem5 {n t : ℕ} (hn : 0 < n) (ht : 1 ≤ t) (htn : t ≤ n) :
    ∃ C : BinaryLinearCode n, Module.finrank (ZMod 2) C = t ∧ spectrumParameter C ≤ n + 1 := by sorry

end QAlgorithms.Papers.Independent.Intake100.P31

end
Source
Dual universality of hash functions and its applications to quantum cryptography, arXiv:1101.0064v4, PDF p. 8, Theorem 5: a code with bounded weight spectrum
Read-back

What the Lean code literally says, in plain math · gpt-6.1-sol

For all natural numbers n,tn,tn,t with n>0n>0n>0 and 1≤t≤n1\le t\le n1≤t≤n, there exists a binary linear subspace C⊆F2nC\subseteq\mathbb F_2^nC⊆F2n​ of dimension exactly ttt such that, writing Ak(C)A_k(C)Ak​(C) for the number of vectors in CCC with exactly kkk nonzero coordinates,

max⁡1≤k≤nAk(C)(nk) 2n−t≤n+1.\max_{1\le k\le n} \frac{A_k(C)}{\binom nk}\,2^{n-t}\le n+1.1≤k≤nmax​(kn​)Ak​(C)​2n−t≤n+1.

The endpoint t=nt=nt=n is included.

Human review
  • Endorsed by Shuze Chen · Oct 31, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 31, 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