Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§II.C: modified Toeplitz families are both universal and dual universal

Open
QAlgorithms.Papers.Independent.Intake100.P31.modified_toeplitz

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

prove2quantum

Let a≥0a\ge0a≥0 and b≥1b\ge1b≥1. Choose a uniformly random binary b×ab\times ab×a Toeplitz matrix TrT_rTr​ and form Mr=(Tr,Ib)M_r=(T_r,I_b)Mr​=(Tr​,Ib​) and Nr=(Ia,TrT)N_r=(I_a,T_r^{\mathsf T})Nr​=(Ia​,TrT​). Both induced hash families are universal with parameter one, both maps are surjective for every seed, their kernels are dual, and

MrNrT=0for every r.M_rN_r^{\mathsf T}=0\quad\text{for every }r.Mr​NrT​=0for every r.

The formal seed has a+ba+ba+b independent bits, one of which is unused when both dimensions are positive. This gives the usual uniform Toeplitz distribution with equal repeated multiplicities, and also handles a=0a=0a=0.

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,6: both modified Toeplitz families are universal, surjective, and dual.
A redundant uniform seed bit preserves the distribution of all Toeplitz matrices. -/
theorem modified_toeplitz (a b : ℕ) (hb : 0 < b) :
    HashUniversal (fun r => Matrix.toLin' (modifiedM a b r)) 1 ∧
    HashUniversal (fun r => Matrix.toLin' (modifiedN a b r)) 1 ∧
    (∀ r, Function.Surjective (Matrix.toLin' (modifiedM a b r))) ∧
    (∀ r, Function.Surjective (Matrix.toLin' (modifiedN a b r))) ∧
    (∀ r, modifiedM a b r * (modifiedN a b r).transpose = 0) ∧
    (∀ r, LinearMap.ker (Matrix.toLin' (modifiedM a b r)) =
      binDual (LinearMap.ker (Matrix.toLin' (modifiedN a b r)))) := 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. 6, §II.C: modified Toeplitz families are both universal and dual universal
Read-back

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

For every natural number aaa and every positive natural number bbb, choose the seed r∈F2a+br\in\mathbb F_2^{a+b}r∈F2a+b​ uniformly, define TrT_rTr​ by (Tr)ij=ri+(a−1−j)(T_r)_{ij}=r_{i+(a-1-j)}(Tr​)ij​=ri+(a−1−j)​ for 0≤i<b,0≤j<a0\le i<b,0\le j<a0≤i<b,0≤j<a, and put Mr=[ Tr∣Ib ]M_r=[\,T_r\mid I_b\,]Mr​=[Tr​∣Ib​] and Nr=[ Ia∣TrT ]N_r=[\,I_a\mid T_r^{\mathsf T}\,]Nr​=[Ia​∣TrT​]. Then, for every distinct u,v∈F2a+bu,v\in\mathbb F_2^{a+b}u,v∈F2a+b​,

Pr⁡r[Mru=Mrv]≤2−b,Pr⁡r[Nru=Nrv]≤2−a.\Pr_r[M_ru=M_rv]\le2^{-b}, \qquad \Pr_r[N_ru=N_rv]\le2^{-a}.rPr​[Mr​u=Mr​v]≤2−b,rPr​[Nr​u=Nr​v]≤2−a.

Furthermore, for every seed, both maps Mr:F2a+b→F2bM_r:\mathbb F_2^{a+b}\to\mathbb F_2^bMr​:F2a+b​→F2b​ and Nr:F2a+b→F2aN_r:\mathbb F_2^{a+b}\to\mathbb F_2^aNr​:F2a+b​→F2a​ are surjective, MrNrT=0M_rN_r^{\mathsf T}=0Mr​NrT​=0, and ker⁡Mr=(ker⁡Nr)⊥\ker M_r=(\ker N_r)^\perpkerMr​=(kerNr​)⊥, where the orthogonal complement consists of vectors whose coordinate dot product over F2\mathbb F_2F2​ with every vector in the kernel is zero. Natural-number subtraction in the seed index is truncated at zero. The case a=0a=0a=0 is included: Mr=IbM_r=I_bMr​=Ib​, NrN_rNr​ maps to the zero-dimensional space, and its collision bound is 111.

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