Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Corollary 1: optimal and ordinary universality under duality

Open
QAlgorithms.Papers.Independent.Intake100.P31.corollary1

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

prove2quantum

Let n≥1n\ge1n≥1 and let Cr≤F2nC_r\le\mathbb F_2^nCr​≤F2n​ be indexed by a finite nonempty seed set III, sampled uniformly and independently of inputs. Repeated codes at distinct seeds retain their multiplicity. Write tmin⁡=min⁡rdim⁡Crt_{\min}=\min_r\dim C_rtmin​=minr​dimCr​ and tmax⁡=max⁡rdim⁡Crt_{\max}=\max_r\dim C_rtmax​=maxr​dimCr​. A dimension-ttt universality bound means Pr⁡r[x∈Cr]≤ε2t−n\Pr_r[x\in C_r]\le\varepsilon 2^{t-n}Prr​[x∈Cr​]≤ε2t−n for every nonzero xxx. Define εopt(n,t)=(2n−2n−t)/(2n−1)\varepsilon_{\rm opt}(n,t)=(2^n-2^{n-t})/(2^n-1)εopt​(n,t)=(2n−2n−t)/(2n−1). Then:

  1. Minimum-dimension optimal universality of CrC_rCr​ implies maximum-dimension optimal universality of Cr⊥C_r^\perpCr⊥​, with parameter εopt(n,n−tmin⁡)\varepsilon_{\rm opt}(n,n-t_{\min})εopt​(n,n−tmin​).
  2. Minimum-dimension universality with parameter one implies maximum-dimension universality of the dual with parameter two.
  3. There exist d>t>0d>t>0d>t>0, a finite nonempty uniform family Dr≤F2dD_r\le\mathbb F_2^dDr​≤F2d​ of minimum dimension ttt, and a chosen ε>1\varepsilon>1ε>1 such that
Dr is ε-almost universal,∃x≠0:Pr⁡r[x∈Dr⊥]=1.D_r\text{ is }\varepsilon\text{-almost universal},\qquad \exists x\ne0:\Pr_r[x\in D_r^\perp]=1.Dr​ is ε-almost universal,∃x=0:rPr​[x∈Dr⊥​]=1.

The existential choice of epsilon is part of the third assertion.

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 p.5, Corollary 1, all three clauses. The counterexample chooses epsilon,
rather than promising a witness for every preassigned epsilon greater than one. -/
theorem corollary1 {n : ℕ} (hn : 0 < n) {I : Type*} [Fintype I] [Nonempty I]
    (C : I → BinaryLinearCode n) :
    (UniversalAt C (minDim C) (optimalParameter n (minDim C)) →
      UniversalAt (fun r => binDual (C r)) (maxDim (fun r => binDual (C r)))
        (optimalParameter n (n - minDim C))) ∧
    (UniversalAt C (minDim C) 1 →
      UniversalAt (fun r => binDual (C r)) (maxDim (fun r => binDual (C r))) 2) ∧
    (∃ (d t N : ℕ), 0 < d ∧ 0 < t ∧ t < d ∧
      ∃ (D : Fin (N + 1) → BinaryLinearCode d) (eps : ℝ), 1 < eps ∧ minDim D = t ∧
        UniversalAt D t eps ∧ ∃ x : BinaryBlock d, x ≠ 0 ∧
          seedProbability (fun r => x ∈ binDual (D r)) = 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. 5, Corollary 1: optimal and ordinary universality under duality
Read-back

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

Let n>0n>0n>0 be natural, let III be finite and nonempty, and let Cr⊆F2nC_r\subseteq\mathbb F_2^nCr​⊆F2n​ be binary linear subspaces. Put t=min⁡rdim⁡Crt=\min_r\dim C_rt=minr​dimCr​, s=max⁡rdim⁡Cr⊥s=\max_r\dim C_r^\perps=maxr​dimCr⊥​, and take probabilities uniformly over III, where C⊥={x:∑icixi=0 in F2 for every c∈C}C^\perp=\{x:\sum_i c_i x_i=0\text{ in }\mathbb F_2\text{ for every }c\in C\}C⊥={x:∑i​ci​xi​=0 in F2​ for every c∈C}. Three assertions hold jointly: if every nonzero xxx satisfies

Pr⁡r[x∈Cr]≤2n−2n−t2n−1 2t−n,\Pr_r[x\in C_r]\le \frac{2^n-2^{n-t}}{2^n-1}\,2^{t-n},rPr​[x∈Cr​]≤2n−12n−2n−t​2t−n,

then every nonzero xxx satisfies

Pr⁡r[x∈Cr⊥]≤2n−2t2n−1 2s−n;\Pr_r[x\in C_r^\perp]\le \frac{2^n-2^t}{2^n-1}\,2^{s-n};rPr​[x∈Cr⊥​]≤2n−12n−2t​2s−n;

if every nonzero xxx satisfies Pr⁡r[x∈Cr]≤2t−n\Pr_r[x\in C_r]\le2^{t-n}Prr​[x∈Cr​]≤2t−n, then every nonzero xxx satisfies Pr⁡r[x∈Cr⊥]≤2⋅2s−n\Pr_r[x\in C_r^\perp]\le2\cdot2^{s-n}Prr​[x∈Cr⊥​]≤2⋅2s−n; and there exist natural numbers d,t0,Nd,t_0,Nd,t0​,N with 0<t0<d0<t_0<d0<t0​<d, a family Dr⊆F2dD_r\subseteq\mathbb F_2^dDr​⊆F2d​ indexed by r=0,…,Nr=0,\ldots,Nr=0,…,N, and a real ε>1\varepsilon>1ε>1, such that min⁡rdim⁡Dr=t0\min_r\dim D_r=t_0minr​dimDr​=t0​, every nonzero yyy satisfies Pr⁡r[y∈Dr]≤ε2t0−d\Pr_r[y\in D_r]\le\varepsilon2^{t_0-d}Prr​[y∈Dr​]≤ε2t0​−d, and some nonzero x∈F2dx\in\mathbb F_2^dx∈F2d​ satisfies Pr⁡r[x∈Dr⊥]=1\Pr_r[x\in D_r^\perp]=1Prr​[x∈Dr⊥​]=1. In this existential assertion probabilities are uniform over the N+1N+1N+1 seeds, and N=0N=0N=0 is permitted.

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