Thermodynamic potential as a Lagrangian graph (source code)

= Thermodynamic potential as a Lagrangian graph
{title2=$L_M=\operatorname{graph}(dM)$}

For a smooth function $M(q)$, its differential defines a <Lagrangian submanifold> of the <cotangent bundle>: pullback of the <canonical one-form on a cotangent bundle> is $dM$, so pullback of the <symplectic form> $-d\theta$ is zero. The graph has half the ambient dimension. With $q=(S,V,N)$ and momentum coordinates $(T,-P,\mu)$, the <first law of thermodynamics> identifies the equilibrium graph with $dM$. This geometric statement does not require extensivity or thermodynamic stability.