Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Unnumbered closeness of optimal empirical and population losses

Open
QAlgorithms.Papers.Independent.Support50.P30.optimalLoss_generalization

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

prove2quantum

Use the bounded measurable loss and i.i.d. sampling assumptions of Theorem 4 with ∥O∥op≤1\|O\|_{\mathrm{op}}\le1∥O∥op​≤1. Fix the same nonempty class V\mathcal VV of commuting unitaries for both risks, and define L^∗=inf⁡U∈VL^S(U)\widehat L^*=\inf_{U\in\mathcal V}\widehat L_S(U)L∗=infU∈V​LS​(U) and L∗=inf⁡U∈VL(U)L^*=\inf_{U\in\mathcal V}L(U)L∗=infU∈V​L(U). There is a universal C>0C>0C>0 such that for n≥2n\ge2n≥2, 0<ϵ,δ<10<\epsilon,\delta<10<ϵ,δ<1 and a positive integer sample budget with M≥C((n+33)+log⁡(1/δ))/ϵ2M\ge C(\binom{n+3}{3}+\log(1/\delta))/\epsilon^2M≥C((3n+3​)+log(1/δ))/ϵ2,

Pr⁡ ⁣(∣L^∗−L∗∣≤ϵ)≥1−δ.\Pr\!\left(|\widehat L^*-L^*|\le\epsilon\right)\ge1-\delta.Pr(∣L∗−L∗∣≤ϵ)≥1−δ.

Both risk sets are nonempty and bounded by the weight and observable bounds. This compares infima and does not require that an optimizer exists.

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: infima over the same nonempty class. The explicit weight and
observable bounds keep both sets of risk values bounded. -/
theorem optimalLoss_generalization :
    ∃ 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 →
    ∀ V : Set (QnnOperator n), V.Nonempty → V ⊆ unitaryFamily n →
      (Measure.pi (fun _ : Fin M => P))
        {xs | |sInf (Set.range (fun U : V => empiricalRisk a O U.val xs)) -
          sInf (Set.range (fun U : V => qnnPopulationRisk P a O U.val))| ≤ 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 closeness of optimal empirical and population losses
Read-back

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

There exists a real constant C>0C>0C>0 with the following property. For every pair of natural numbers n≥2n\ge2n≥2 and M≥1M\ge1M≥1, and every ϵ,δ∈(0,1)\epsilon,\delta\in(0,1)ϵ,δ∈(0,1) satisfying

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

let Dn\mathcal D_nDn​ be the space of positive semidefinite complex matrices of trace 111 indexed by the nnn-bit strings, equipped with its Borel measurable structure. For every probability measure PPP on Dn\mathcal D_nDn​, every measurable function a:Dn→Ra:\mathcal D_n\to\mathbb Ra:Dn​→R satisfying ∣a(ρ)∣≤1|a(\rho)|\le1∣a(ρ)∣≤1 for every ρ\rhoρ, every Hermitian matrix OOO with Euclidean operator norm at most 111 that commutes with every permutation of the qubits, and every nonempty set VVV of unitary matrices that also commute with every qubit permutation, define

R(U)=∫Dna(ρ)Re⁡tr⁡(UρU†O) dP(ρ),R^ρ(U)=1M∑i=0M−1a(ρi)Re⁡tr⁡(UρiU†O).R(U)=\int_{\mathcal D_n}a(\rho)\operatorname{Re}\operatorname{tr}(U\rho U^\dagger O)\,dP(\rho), \qquad \widehat R_{\boldsymbol\rho}(U)=\frac1M\sum_{i=0}^{M-1} a(\rho_i)\operatorname{Re}\operatorname{tr}(U\rho_iU^\dagger O).R(U)=∫Dn​​a(ρ)Retr(UρU†O)dP(ρ),Rρ​(U)=M1​i=0∑M−1​a(ρi​)Retr(Uρi​U†O).

Here a permutation ppp of {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1} acts on basis vectors by ∣x⟩↦∣x∘p−1⟩|x\rangle\mapsto|x\circ p^{-1}\rangle∣x⟩↦∣x∘p−1⟩. Under the product measure P⊗MP^{\otimes M}P⊗M, the set of samples satisfying

∣inf⁡U∈VR^ρ(U)−inf⁡U∈VR(U)∣≤ϵ\left|\inf_{U\in V}\widehat R_{\boldsymbol\rho}(U)-\inf_{U\in V}R(U)\right|\le\epsilon​U∈Vinf​Rρ​(U)−U∈Vinf​R(U)​≤ϵ

has measure at least 1−δ1-\delta1−δ. The two optimization quantities are infima; their attainment is not assumed.

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