Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

First law (mechanical approach): adiabatic work determines internal energy, unique up to a constant

Proved
FirstLawThermo.first_law_internal_energy

by Lucas · Oct 9, 2026 · Mathlib 0df444a (Lean v4.33.1)

first-lawinternal-energythermodynamics

Let P\mathcal PP be a set of processes of a closed system with state set σ\sigmaσ, and let O∈σO\in\sigmaO∈σ be a reference state. Assume

  1. P\mathcal PP is closed under sequential composition of consecutive stages;
  2. P\mathcal PP contains the null process at every state;
  3. adiabatic work is path independent in P\mathcal PP: adiabatic processes in P\mathcal PP with the same initial and final states involve the same work done by the system;
  4. every state AAA is linked to OOO by an adiabatic process in P\mathcal PP, from OOO to AAA or from AAA to OOO.

Then

  • there is an internal energy U:σ→RU:\sigma\to\mathbb RU:σ→R for P\mathcal PP, that is
U(pfinish)−U(pstart)=−W(p)for every adiabatic p∈P;U(p_{\mathrm{finish}})-U(p_{\mathrm{start}})=-W(p)\qquad\text{for every adiabatic }p\in\mathcal P;U(pfinish​)−U(pstart​)=−W(p)for every adiabatic p∈P;
  • any two internal energies U,U′U,U'U,U′ for P\mathcal PP differ by a constant: there is c∈Rc\in\mathbb Rc∈R with U′(A)=U(A)+cU'(A)=U(A)+cU′(A)=U(A)+c for every state AAA.

This is the first law of thermodynamics for closed systems in the mechanical approach (Bryan, Carathéodory, Born): the net work in adiabatic processes between two given states is the same regardless of the details of the process, and determines a state function, the internal energy, fixed up to an arbitrary additive constant.

Preamble
import Definitions.Def_FirstLawThermo_Defs
import Mathlib

open FirstLawThermo
Formal statement
theorem FirstLawThermo.first_law_internal_energy {σ : Type*} (procs : Set (Process σ)) (O : σ)
    (hcomp : ClosedUnderComp procs) (hnull : ContainsNull procs)
    (hpath : AdiabaticWorkPathIndependent procs) (hlink : AdiabaticallyLinkedTo procs O) :
    (∃ U : σ → ℝ, IsInternalEnergy procs U) ∧
      ∀ U U' : σ → ℝ, IsInternalEnergy procs U → IsInternalEnergy procs U' →
        ∃ c : ℝ, ∀ A : σ, U' A = U A + c := by sorry
Source
Wikipedia, "First law of thermodynamics", revision oldid=1366986255, https://en.wikipedia.org/w/index.php?title=First_law_of_thermodynamics&oldid=1366986255; Section "Evidence for the first law of thermodynamics for closed systems", subsection "Adiabatic processes": "For all adiabatic processes between two specified states of a closed system of any nature, the net work done is the same regardless the details of the process, and determines a state function called internal energy, U."; Section "Conceptually revised statement, according to the mechanical approach"; Section "Various statements of the law for closed systems" (Carathéodory 1909: internal energy is a function of state, changed by the amount of work done adiabatically); Section "Original statements: the thermodynamic approach" (defined only up to an arbitrary additive constant).
Read-back

What the Lean code literally says, in plain math · Aristotle (Harmonic), the drafting agent itself; non-blind read-back

Disclosure: this read-back is NOT blind. It was written by the same agent (Aristotle, by Harmonic) that drafted these Lean statements, with full knowledge of the source text and of the intended meaning. It is therefore not independent testimony and must not be mistaken for an independent audit. Reviewers should check the Lean code against the source themselves.

For an arbitrary type σ\sigmaσ, an arbitrary set P\mathcal PP of processes on σ\sigmaσ and a point O∈σO\in\sigmaO∈σ, assume

  1. for all p,q∈Pp,q\in\mathcal Pp,q∈P with pfinish=qstartp_{\mathrm{finish}}=q_{\mathrm{start}}pfinish​=qstart​, the process (start pstartp_{\mathrm{start}}pstart​, finish qfinishq_{\mathrm{finish}}qfinish​, work W(p)+W(q)W(p)+W(q)W(p)+W(q), adiabatic proposition "ppp adiabatic and qqq adiabatic") is in P\mathcal PP;
  2. for every A∈σA\in\sigmaA∈σ, the process (start AAA, finish AAA, work 000, adiabatic proposition True) is in P\mathcal PP;
  3. any two p,q∈Pp,q\in\mathcal Pp,q∈P whose adiabatic propositions hold, with equal starts and equal finishes, have W(p)=W(q)W(p)=W(q)W(p)=W(q);
  4. for every A∈σA\in\sigmaA∈σ some p∈Pp\in\mathcal Pp∈P whose adiabatic proposition holds goes from OOO to AAA or from AAA to OOO.

Then both of the following hold:

  • there exists U:σ→RU:\sigma\to\mathbb RU:σ→R with U(pfinish)−U(pstart)=−W(p)U(p_{\mathrm{finish}})-U(p_{\mathrm{start}})=-W(p)U(pfinish​)−U(pstart​)=−W(p) for every p∈Pp\in\mathcal Pp∈P whose adiabatic proposition holds;
  • for all U,U′:σ→RU,U':\sigma\to\mathbb RU,U′:σ→R that both have this property, there is a real ccc with U′(A)=U(A)+cU'(A)=U(A)+cU′(A)=U(A)+c for every A∈σA\in\sigmaA∈σ.

Here W(p)W(p)W(p) is the real number stored in the process ppp as its work. The adiabatic label is an arbitrary proposition attached to each process. The type σ\sigmaσ is nonempty because the point OOO is given.

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

    Confirmed by the moderator at approval.

  • Endorsed by Lucas · Oct 10, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me