Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Entropy change across a shock (Ogilvie 2016, Example A.13, eq. A 28)

Proved
AstrophysicalFluidDynamics.shock_entropy_jump

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

astrophysicsfluid-dynamicsshock-waves

For a perfect gas with γ>1\gamma > 1γ>1, let positive upstream and downstream states (ρ1,u1,p1)(\rho_1,u_1,p_1)(ρ1​,u1​,p1​), (ρ2,u2,p2)(\rho_2,u_2,p_2)(ρ2​,u2​,p2​) satisfy the Rankine–Hugoniot relations. Writing P=p2/p1P = p_2/p_1P=p2​/p1​ for the pressure ratio, the entropy change across the shock is

[s]12cv=ln⁡P−γln⁡[(γ+1)P+(γ−1)(γ−1)P+(γ+1)],\frac{[s]_1^2}{c_v} = \ln P - \gamma\ln\left[\frac{(\gamma+1)P + (\gamma-1)}{(\gamma-1)P + (\gamma+1)}\right],cv​[s]12​​=lnP−γln[(γ−1)P+(γ+1)(γ+1)P+(γ−1)​],

where the specific entropy of a perfect gas is s=cp(γ−1ln⁡p−ln⁡ρ)+consts = c_p(\gamma^{-1}\ln p - \ln\rho) + \text{const}s=cp​(γ−1lnp−lnρ)+const, so that [s]12/cv=ln⁡(p2/p1)−γln⁡(ρ2/ρ1)[s]_1^2/c_v = \ln(p_2/p_1) - \gamma\ln(\rho_2/\rho_1)[s]12​/cv​=ln(p2​/p1​)−γln(ρ2​/ρ1​).

This formula is the basis for the second-law argument that excludes rarefaction shocks.

Formalization Note The formula also holds, trivially, when the two states coincide, so the non-degeneracy hypothesis is not included here.

Preamble
import Definitions.Def_AstrophysicalFluidDynamics_ShockDefs
import Mathlib

open Filter Topology
Formal statement
namespace AstrophysicalFluidDynamics

theorem shock_entropy_jump
    (γ ρ₁ u₁ p₁ ρ₂ u₂ p₂ : ℝ) (hγ : 1 < γ)
    (hρ₁ : 0 < ρ₁) (hu₁ : 0 < u₁) (hp₁ : 0 < p₁)
    (hρ₂ : 0 < ρ₂) (hu₂ : 0 < u₂) (hp₂ : 0 < p₂)
    (hRH : RankineHugoniot γ ρ₁ u₁ p₁ ρ₂ u₂ p₂) :
    entropyJumpOverCv γ ρ₁ p₁ ρ₂ p₂ =
      Real.log (p₂ / p₁) -
        γ * Real.log (((γ + 1) * (p₂ / p₁) + (γ - 1)) / ((γ - 1) * (p₂ / p₁) + (γ + 1))) := by sorry

end AstrophysicalFluidDynamics
Source
G. I. Ogilvie, *Astrophysical fluid dynamics* (lecture notes), J. Plasma Phys. 82 (2016) 205820301, https://doi.org/10.1017/S0022377816000489, Example A.13, eq. (A 28), p. 90; entropy of a perfect gas §11.6.2
Read-back

What the Lean code literally says, in plain math · Aristotle (Harmonic) — same agent as the drafter; non-blind

Read-back disclosure — NOT blind, NOT independent. This read-back was written by the same agent (Aristotle, by Harmonic) that drafted the Lean statement below, with full knowledge of the source text and of the intended meaning. It is therefore not independent testimony and must not be mistaken for a blind audit. A reviewer should compare the Lean code against the source directly; an independent blind read-back is still recommended.

Fix real numbers γ,ρ1,u1,p1,ρ2,u2,p2\gamma, \rho_1, u_1, p_1, \rho_2, u_2, p_2γ,ρ1​,u1​,p1​,ρ2​,u2​,p2​. Assume γ>1\gamma > 1γ>1; ρ1>0\rho_1 > 0ρ1​>0, u1>0u_1 > 0u1​>0, p1>0p_1 > 0p1​>0; ρ2>0\rho_2 > 0ρ2​>0, u2>0u_2 > 0u2​>0, p2>0p_2 > 0p2​>0; and that the three Rankine–Hugoniot equalities hold, namely

ρ2u2=ρ1u1,ρ2u22+p2=ρ1u12+p1,\rho_2 u_2 = \rho_1 u_1,\qquad \rho_2 u_2^2 + p_2 = \rho_1 u_1^2 + p_1,ρ2​u2​=ρ1​u1​,ρ2​u22​+p2​=ρ1​u12​+p1​, ρ2u2(u222+γγ−1p2ρ2)=ρ1u1(u122+γγ−1p1ρ1).Conclusion:\rho_2 u_2\Big(\tfrac{u_2^2}{2} + \tfrac{\gamma}{\gamma-1}\tfrac{p_2}{\rho_2}\Big) = \rho_1 u_1\Big(\tfrac{u_1^2}{2} + \tfrac{\gamma}{\gamma-1}\tfrac{p_1}{\rho_1}\Big). Conclusion:ρ2​u2​(2u22​​+γ−1γ​ρ2​p2​​)=ρ1​u1​(2u12​​+γ−1γ​ρ1​p1​​).Conclusion:

\ln\frac{p_2}{p_1} - \gamma\ln\frac{\rho_2}{\rho_1} = \ln\frac{p_2}{p_1} - \gamma\ln\left(\frac{(\gamma+1)\frac{p_2}{p_1}+(\gamma-1)}{(\gamma-1)\frac{p_2}{p_1}+(\gamma+1)}\right).$$ (The left side is the definition of the entropy jump divided by cvc_vcv​.)

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

    Confirmed by the moderator at approval.

  • Endorsed by Lucas · Oct 8, 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