EVJJI theorem twoState_entropy_eq - #1605
Conversation
Formalize the informal lemma tagged EVJJI: a closed form for the thermodynamic entropy of the two-state canonical ensemble, S = kB * (log (2 * cosh x) - x * tanh x), where x = beta T * (E1 - E0) / 2 proved via `thermodynamicEntropy_eq_shannonEntropy`, which carries no side conditions, rather than through the Helmholtz free energy. Also adds `twoState_entropy_eq_T_neq_zero`, a restatement carrying `T != 0` so downstream results on positive temperatures get a matching signature, and drops the `Physlib.Meta.Informal.Basic` import, now unused in this file. Co-authored-by: Claude Opus 5 <no-reply+claude-opus-5@anthropic.com>
|
Thank you for this pull-request (PR). If this is your first PR, welcome to the community! Below is what will happen next. Please read carefully if you are not familiar with the process. You may open other PRs while this one is being reviewed, and can stack PRs on top of each other, so don't let these steps slow you down.
Tip: The easiest way to get have a fast review is to submit a PR that is small and self-contained, and has clear documentation explaining why things are the way they are in your chages. If you have any problems or questions, please reach out to the community on the Zulip. |
jstoobysmith
left a comment
There was a problem hiding this comment.
Approved - looks good to me. Thanks for this PR
Formalizes the informal lemma tagged
EVJJI: a closed form for thethermodynamic entropy of the two-state canonical ensemble.
Added, both in
Physlib/StatisticalMechanics/CanonicalEnsemble/TwoState.lean:twoState_entropy_eqwithx = β T * (E₁ - E₀) / 2, givesS = kB * (log (2 * cosh x) - x * tanh x). Proved throughthermodynamicEntropy_eq_shannonEntropy, which carries no side conditions,rather than through the Helmholtz free energy. That route needs
0 < T.val,IsFiniteMeasure, and integrability.twoState_entropy_eq_T_neq_zerois the same statement carryingT ≠ 0, sodownstream results on positive temperatures get a matching signature without
having to know the unconditional version is safe at zero.
Removed the
Physlib.Meta.Informal.Basicimport, now unused in the file.I left the primary result unconditional, matching the choice made for
twoState_helmholtzFreeEnergy_eqin #1474. Sinceβ 0 = 0, the RHS iskB * log 2atT = 0; the docstring notes this.Notes to reviewer: look first at the statement, since that's the part that has to be right.
Then
hp0andhp1, the two occupation probabilities in closed form. The restis algebra. The corollary and the import removal are a line each.
Second contribution to Physlib. Happy to adjust anything. I'm not particularly attached to the
T ≠ 0restatement if you'd rather it weren't there.