Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

p. 4 — the rate function is the Legendre transform I(s)=sup⁡η(η⋅s−ln⁡∑αrαeηα)I(s) = \sup_\eta(\eta\cdot s - \ln\sum_\alpha r_\alpha e^{\eta_\alpha})I(s)=supη​(η⋅s−ln∑α​rα​eηα​)

Proved
KWSpectrum.Estimator.legendre

by mikedeng1 · Oct 24, 2026 · Mathlib 0df444a (Lean v4.33.1)

large-deviationslegendre-transformp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1relative-entropy

Let r,s∈Σr, s \in \Sigmar,s∈Σ and let I(s)=∑jsj(ln⁡sj−ln⁡rj)∈[0,∞]I(s) = \sum_j s_j(\ln s_j - \ln r_j) \in [0,\infty]I(s)=∑j​sj​(lnsj​−lnrj​)∈[0,∞] be the rate function (13), with 0ln⁡0=00\ln 0 = 00ln0=0 and I(s)=+∞I(s) = +\inftyI(s)=+∞ when sj>0=rjs_j > 0 = r_jsj​>0=rj​ for some jjj. Then

I(s)=sup⁡η∈Rd(η⋅s−ln⁡∑αrαeηα),I(s) = \sup_{\eta\in\mathbb R^d}\Big(\eta\cdot s - \ln\sum_\alpha r_\alpha e^{\eta_\alpha}\Big),I(s)=η∈Rdsup​(η⋅s−lnα∑​rα​eηα​),

the supremum being taken in (−∞,+∞](-\infty, +\infty](−∞,+∞] over all η∈Rd\eta \in \mathbb R^dη∈Rd.

This identifies the rate function produced by the Gärtner–Ellis theorem from c(η)c(\eta)c(η) in (25) with the relative entropy of sss with respect to rrr.

Formalization Note The supremum is an EReal supremum; ∑αrαeηα>0\sum_\alpha r_\alpha e^{\eta_\alpha} > 0∑α​rα​eηα​>0 for r∈Σr \in \Sigmar∈Σ, so the real logarithm is the true one.

Differences from the source: none.

Preamble
import Mathlib
import Definitions.Def_KWSpectrum_Estimator_Model
Formal statement
namespace KWSpectrum.Estimator

open QAlgorithms QAlgorithms.Schur

/-- Keyl–Werner, arXiv:quant-ph/0102027v1, p. 4: the rate function (13) is the Legendre
transform of `c(η) = ln Σ_α r_α e^{η_α}`: `I(s) = sup_{η ∈ ℝ^d} (η · s − c(η))` for `r, s ∈ Σ`,
in `[0, ∞]`. -/
theorem legendre {d : ℕ} (r s : Fin d → ℝ) (hr : r ∈ SpectrumSet d) (hs : s ∈ SpectrumSet d) :
    rate r s = ⨆ η : Fin d → ℝ,
      (((∑ j : Fin d, η j * s j) - Real.log (∑ α : Fin d, r α * Real.exp (η α)) : ℝ) : EReal) := by sorry

end KWSpectrum.Estimator
Source
Keyl & Werner, Estimating the spectrum of a density operator, arXiv:quant-ph/0102027v1, p. 4 (sentence after eq. (25)), with eq. (13), p. 3
Human review
  • Endorsed by Shuze Chen · Oct 24, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · 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