Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Unnumbered generalization sample sufficiency

Open
QAlgorithms.Papers.Independent.Support50.P30.generalization_sample_sufficiency

by Goku · Oct 23, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

Under the bounded measurable loss and i.i.d. sampling assumptions of Theorem 4 with ∥O∥op≤1\|O\|_{\mathrm{op}}\le1∥O∥op​≤1, there is a universal C>0C>0C>0 such that, for n≥2n\ge2n≥2 and 0<ϵ,δ<10<\epsilon,\delta<10<ϵ,δ<1, every positive integer sample budget satisfying

M≥C(n+33)+log⁡(1/δ)ϵ2M\ge C\frac{\binom{n+3}{3}+\log(1/\delta)}{\epsilon^2}M≥Cϵ2(3n+3​)+log(1/δ)​

ensures ∣L(U)−L^S(U)∣≤ϵ|L(U)-\widehat L_S(U)|\le\epsilon∣L(U)−LS​(U)∣≤ϵ simultaneously for all commuting unitaries with probability at least 1−δ1-\delta1−δ. For fixed accuracy and confidence this supplies a sufficient budget of order n3n^3n3. The threshold is a sufficiency condition and does not treat an arbitrarily small upper-bounded sample count as sufficient.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Support50_P30
Formal statement
noncomputable section

open MeasureTheory

open scoped BigOperators ComplexConjugate Matrix.Norms.L2Operator NNReal ENNReal

namespace QAlgorithms.Papers.Independent.Support50.P30

/-- PDF p.7: a sufficient sample threshold. For fixed epsilon and delta
this threshold grows as O(n^3); a tiny M is not an accuracy hypothesis. -/
theorem generalization_sample_sufficiency :
    ∃ C : ℝ, 0 < C ∧ ∀ (n M : ℕ), 2 ≤ n → 1 ≤ M →
    ∀ (epsilon deltaConf : ℝ), 0 < epsilon → epsilon < 1 →
      0 < deltaConf → deltaConf < 1 →
      C * (((n + 3).choose 3 : ℝ) + Real.log (1 / deltaConf)) / epsilon ^ 2 ≤ (M : ℝ) →
    ∀ (P : Measure (QnnDensity n)), IsProbabilityMeasure P →
    ∀ (a : QnnDensity n → ℝ), Measurable a → (∀ rho, |a rho| ≤ 1) →
    ∀ (O : QnnOperator n), O.IsHermitian → PermutationEquivariant O → specNorm O ≤ 1 →
      (Measure.pi (fun _ : Fin M => P)) (generalizationEvent P a O epsilon) ≥
        ENNReal.ofReal (1 - deltaConf) := by sorry

end QAlgorithms.Papers.Independent.Support50.P30

end
Source
Theoretical Guarantees for Permutation-Equivariant Quantum Neural Networks, arXiv:2210.09974v3, PDF p. 7, Unnumbered generalization sample sufficiency
Read-back

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

There exists a real constant C>0C>0C>0 such that, for every pair of natural numbers n≥2n\ge2n≥2, M≥1M\ge1M≥1, and every pair of real numbers 0<ϵ<10<\epsilon<10<ϵ<1, 0<δ<10<\delta<10<δ<1 satisfying

C (n+33)+log⁡(1/δ)ϵ2≤M,C\,\frac{\binom{n+3}{3}+\log(1/\delta)}{\epsilon^2}\le M,Cϵ2(3n+3​)+log(1/δ)​≤M,

the following holds. Let Dn\mathcal D_nDn​ be the Borel space of positive semidefinite complex matrices on C{0,1}n\mathbb C^{\{0,1\}^n}C{0,1}n with trace 111. For every probability measure PPP on Dn\mathcal D_nDn​, every measurable a:Dn→Ra:\mathcal D_n\to\mathbb Ra:Dn​→R satisfying ∣a(ρ)∣≤1|a(\rho)|\le1∣a(ρ)∣≤1 for every ρ\rhoρ, and every Hermitian matrix OOO of Euclidean operator norm at most 111 that commutes with every permutation of the qubit positions, the product measure P⊗MP^{\otimes M}P⊗M assigns measure at least 1−δ1-\delta1−δ, viewed as an extended nonnegative real number, to the sample collections (ρi)i=0M−1(\rho_i)_{i=0}^{M-1}(ρi​)i=0M−1​ satisfying, simultaneously for every unitary UUU commuting with every qubit-position permutation,

∣∫Dna(ρ)Re⁡tr⁡(UρU∗O) dP(ρ)−1M∑i=0M−1a(ρi)Re⁡tr⁡(UρiU∗O)∣≤ϵ.\left| \int_{\mathcal D_n}a(\rho)\operatorname{Re}\operatorname{tr}(U\rho U^*O)\,dP(\rho) - \frac1M\sum_{i=0}^{M-1}a(\rho_i)\operatorname{Re}\operatorname{tr}(U\rho_iU^*O) \right|\le\epsilon.​∫Dn​​a(ρ)Retr(UρU∗O)dP(ρ)−M1​i=0∑M−1​a(ρi​)Retr(Uρi​U∗O)​≤ϵ.

A position permutation ppp is represented by the matrix whose (x,y)(x,y)(x,y) entry is 111 exactly when xj=yp−1(j)x_j=y_{p^{-1}(j)}xj​=yp−1(j)​ for every jjj, and zero otherwise; log⁡\loglog is the natural logarithm. The constant CCC is independent of all subsequent choices.

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

    Confirmed by the moderator at approval.

  • Endorsed by Goku · Oct 24, 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