Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§II.A: kernel coding of linear hash families

Open
QAlgorithms.Papers.Independent.Intake100.P31.kernel_correspondence

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

prove2quantum

Let 1≤m≤n1\le m\le n1≤m≤n, n≥1n\ge1n≥1, and let fr:F2n→F2mf_r:\mathbb F_2^n\to\mathbb F_2^mfr​:F2n​→F2m​ be linear maps indexed by a finite nonempty uniform seed set. For ε≥0\varepsilon\ge0ε≥0, their collision bound is equivalent to

∀x≠0,Pr⁡r[x∈ker⁡fr]≤ε/2m.\forall x\ne0,\quad\Pr_r[x\in\ker f_r]\le\varepsilon/2^m.∀x=0,rPr​[x∈kerfr​]≤ε/2m.

Every code of codimension at most mmm is the kernel of such a map. For a code family and its canonical quotient maps, the collision bound with maximum output size 2n−tmin⁡2^{n-t_{\min}}2n−tmin​ is equivalent to the dimension-tmin⁡t_{\min}tmin​ code universality bound. Kernels therefore determine universality without fixing an output basis or assuming any map has rank mmm.

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.3--4, (1),(4),(5): kernels determine all collision probabilities.
The codomain dimension m is declared, not inferred from a possibly smaller rank. -/
theorem kernel_correspondence {n m : ℕ} (hn : 0 < n) (hm : 1 ≤ m) (hmn : m ≤ n)
    {I : Type*} [Fintype I] [Nonempty I]
    (f : I → BinaryBlock n →ₗ[ZMod 2] BinaryBlock m) (eps : ℝ) (heps : 0 ≤ eps) :
    (HashUniversal f eps ↔ ∀ x : BinaryBlock n, x ≠ 0 →
      seedProbability (fun r => x ∈ LinearMap.ker (f r)) ≤ eps / (2 : ℝ) ^ m) ∧
    (∀ C : BinaryLinearCode n, n - Module.finrank (ZMod 2) C ≤ m →
      ∃ g : BinaryBlock n →ₗ[ZMod 2] BinaryBlock m, LinearMap.ker g = C) ∧
    (∀ C : I → BinaryLinearCode n,
      (∀ a b : BinaryBlock n, a ≠ b → seedProbability (fun r => (C r).mkQ a = (C r).mkQ b) ≤
        eps * (2 : ℝ) ^ ((minDim C : ℝ) - n)) ↔ UniversalAt C (minDim C) eps) := 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. 3, §II.A: kernel coding of linear hash families
Read-back

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

Let n,mn,mn,m be natural numbers satisfying n>0n>0n>0 and 1≤m≤n1\le m\le n1≤m≤n, let III be any finite nonempty seed type, let fr:F2n→F2mf_r:\mathbb F_2^n\to\mathbb F_2^mfr​:F2n​→F2m​ be a linear map for each r∈Ir\in Ir∈I, and let ε≥0\varepsilon\ge0ε≥0 be real. Write Pr⁡r[P(r)]=∣{r∈I:P(r)}∣/∣I∣\Pr_r[P(r)]=|\{r\in I:P(r)\}|/|I|Prr​[P(r)]=∣{r∈I:P(r)}∣/∣I∣. The following three assertions hold jointly: the condition Pr⁡r[fr(a)=fr(b)]≤ε/2m\Pr_r[f_r(a)=f_r(b)]\le\varepsilon/2^mPrr​[fr​(a)=fr​(b)]≤ε/2m for every pair of distinct a,b∈F2na,b\in\mathbb F_2^na,b∈F2n​ is equivalent to

∀x≠0,Pr⁡r[x∈ker⁡fr]≤ε2m;\forall x\ne0,\qquad \Pr_r[x\in\ker f_r]\le\frac{\varepsilon}{2^m};∀x=0,rPr​[x∈kerfr​]≤2mε​;

every binary linear subspace C⊆F2nC\subseteq\mathbb F_2^nC⊆F2n​ satisfying n−dim⁡C≤mn-\dim C\le mn−dimC≤m is the kernel of some linear map g:F2n→F2mg:\mathbb F_2^n\to\mathbb F_2^mg:F2n​→F2m​; and, for every family of binary linear subspaces Cr⊆F2nC_r\subseteq\mathbb F_2^nCr​⊆F2n​, putting t=min⁡r∈Idim⁡Crt=\min_{r\in I}\dim C_rt=minr∈I​dimCr​, the condition Pr⁡r[a+Cr=b+Cr]≤ε2t−n\Pr_r[a+C_r=b+C_r]\le\varepsilon 2^{t-n}Prr​[a+Cr​=b+Cr​]≤ε2t−n for all distinct a,ba,ba,b is equivalent to 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. Neither the maps frf_rfr​ nor the map ggg are required to be surjective, and the code dimensions in a family need not be equal.

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