Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Normalized classical free energy and the two Shannon limits

Proved
QAlgorithms.Papers.Independent.Advance50.P26.classical_freeEnergy_and_shannon_limit

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

prove2quantum

Let III be a nonempty finite set and let p=(pi)i∈Ip=(p_i)_{i\in I}p=(pi​)i∈I​ satisfy pi>0p_i>0pi​>0 and ∑ipi=1\sum_i p_i=1∑i​pi​=1. Work in units where Boltzmann's constant is one, fix T0>0T_0>0T0​>0, and construct the energies Ei=−T0ln⁡piE_i=-T_0\ln p_iEi​=−T0​lnpi​. For positive TTT, set ZE(T)=∑iexp⁡(−Ei/T)Z_E(T)=\sum_i\exp(-E_i/T)ZE​(T)=∑i​exp(−Ei​/T) and FE(T)=−Tln⁡ZE(T)F_E(T)=-T\ln Z_E(T)FE​(T)=−TlnZE​(T). Write Sq(p)=ln⁡(∑ipiq)/(1−q)S_q(p)=\ln(\sum_i p_i^q)/(1-q)Sq​(p)=ln(∑i​piq​)/(1−q) for q>0q>0q>0, q≠1q\ne1q=1, and S1(p)=−∑ipiln⁡piS_1(p)=-\sum_i p_i\ln p_iS1​(p)=−∑i​pi​lnpi​. Then for every positive T≠T0T\ne T_0T=T0​,

FE(T)=−(T−T0)ST0/T(p).F_E(T)=-(T-T_0)S_{T_0/T}(p).FE​(T)=−(T−T0​)ST0​/T​(p).

Moreover, both expressions in the quotient identity converge to Shannon entropy:

lim⁡T→T0T>0, T≠T0ST0/T(p)=lim⁡T→T0T>0, T≠T0−FE(T)T−T0=S1(p).\lim_{\substack{T\to T_0\\ T>0,\ T\ne T_0}}S_{T_0/T}(p) =\lim_{\substack{T\to T_0\\ T>0,\ T\ne T_0}}\frac{-F_E(T)}{T-T_0} =S_1(p).T→T0​T>0, T=T0​​lim​ST0​/T​(p)=T→T0​T>0, T=T0​​lim​T−T0​−FE​(T)​=S1​(p).

The construction gives ZE(T0)=1Z_E(T_0)=1ZE​(T0​)=1 and hence FE(T0)=0F_E(T_0)=0FE​(T0​)=0. The limits describe the nontrivial order-one extension of the entropy identity.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Advance50_P26
Formal statement
noncomputable section

open Filter

open scoped BigOperators Topology Matrix.Norms.L2Operator

namespace QAlgorithms.Papers.Independent.Advance50.P26

open QAlgorithms.Papers.Independent.Support50.P15 (shannonEntropyNats)

open QAlgorithms.ZeroSum (classicalGibbs)

open QAlgorithms.Papers.Independent.Dependency50.P35 (spectralPower)

/-- PDF pp.1-2, Section 1, (2) and the sentence immediately after its calculation:
construct E_i = -T0 log p_i from a strictly positive normalized finite law. The
identity holds at each positive T != T0, and both sides of the quotient identity
S_(T0/T)(p) = -F_E(T)/(T-T0) tend to Shannon entropy. The limits concern the quotient
identity in the proof, not the two sides of (2), which both tend to zero. -/
theorem classical_freeEnergy_and_shannon_limit {I : Type*} [Fintype I] [Nonempty I]
    (p : I → ℝ) (hp : ∀ i, 0 < p i) (hnorm : ∑ i, p i = 1)
    (T0 : ℝ) (hT0 : 0 < T0) :
    (∀ T : ℝ, 0 < T → T ≠ T0 →
      classicalFreeEnergy (referenceEnergies p T0) T =
        -(T - T0) * classicalRenyiNats p (T0 / T)) ∧
    Tendsto (fun T : ℝ => classicalRenyiNats p (T0 / T))
      (nhdsWithin T0 {T : ℝ | 0 < T ∧ T ≠ T0}) (𝓝 (shannonEntropyNats (fun i => p ((Fintype.equivFin I).symm i)))) ∧
    Tendsto (fun T : ℝ => -classicalFreeEnergy (referenceEnergies p T0) T / (T - T0))
      (nhdsWithin T0 {T : ℝ | 0 < T ∧ T ≠ T0}) (𝓝 (shannonEntropyNats (fun i => p ((Fintype.equivFin I).symm i)))) := by sorry

end QAlgorithms.Papers.Independent.Advance50.P26

end
Source
Renyi Entropy and Free Energy, arXiv:1102.2098v4, PDF p. 2, Section 1, Eq. (2) and its following quotient-limit sentence
Read-back

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

For every finite nonempty type III, every function p:I→Rp:I\to\mathbb Rp:I→R satisfying pi>0p_i>0pi​>0 for every iii and ∑ipi=1\sum_i p_i=1∑i​pi​=1, and every real T0>0T_0>0T0​>0, define

H(p)=−∑ipilog⁡pi,Rq(p)={H(p),q=1,log⁡∑ipiq1−q,q≠1,F(T)=−Tlog⁡ ⁣(∑iexp⁡ ⁣(T0log⁡piT)).H(p)=-\sum_i p_i\log p_i,\qquad R_q(p)= \begin{cases} H(p),&q=1,\\ \displaystyle\frac{\log\sum_i p_i^q}{1-q},&q\ne1, \end{cases} \qquad F(T)=-T\log\!\left(\sum_i\exp\!\left(\frac{T_0\log p_i}{T}\right)\right).H(p)=−i∑​pi​logpi​,Rq​(p)=⎩⎨⎧​H(p),1−qlog∑i​piq​​,​q=1,q=1,​F(T)=−Tlog(i∑​exp(TT0​logpi​​)).

Thus FFF uses the energies Ei=−T0log⁡piE_i=-T_0\log p_iEi​=−T0​logpi​. The declaration asserts all three statements:

F(T)=−(T−T0)RT0/T(p)for every real T>0 with T≠T0,lim⁡T→T0T>0, T≠T0RT0/T(p)=H(p),lim⁡T→T0T>0, T≠T0−F(T)T−T0=H(p).\begin{gathered} F(T)=-(T-T_0)R_{T_0/T}(p) \quad\text{for every real }T>0\text{ with }T\ne T_0,\\ \lim_{\substack{T\to T_0\\T>0,\ T\ne T_0}}R_{T_0/T}(p)=H(p),\\ \lim_{\substack{T\to T_0\\T>0,\ T\ne T_0}} \frac{-F(T)}{T-T_0}=H(p). \end{gathered}F(T)=−(T−T0​)RT0​/T​(p)for every real T>0 with T=T0​,T→T0​T>0, T=T0​​lim​RT0​/T​(p)=H(p),T→T0​T>0, T=T0​​lim​T−T0​−F(T)​=H(p).​

Both limits approach T0T_0T0​ within the positive real temperatures with T0T_0T0​ excluded; they are not restricted to a single side.

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

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 29, 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