Schwarzschild's constant-density fluid sphere
DefinitionPhyslibSchwarzschildInteriorgeneral-relativityphyslib-exact-spacetimesschwarzschild
Schwarzschild's constant-density fluid sphere in PhysLib, formalized by Philippe Kevorkian. The input has a positive curvature radius , a surface areal radius , and a positive constant density . The module defines , the surface angle , the pressure as a function of interior angle, and the interior, exterior, and glued radial metric coefficients.
Definition code
/- Copyright (c) 2026 Philippe Kevorkian. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Philippe Kevorkian -/ import Mathlib.Analysis.SpecialFunctions.Trigonometric.Inverse import Mathlib.Analysis.SpecialFunctions.Sqrt import Mathlib.Analysis.Calculus.Deriv.Add import Mathlib.Analysis.Calculus.Deriv.Inv import Mathlib.Analysis.Calculus.Deriv.Mul /-! # Schwarzschild's incompressible fluid sphere and its junction with the exterior solution Junction of Schwarzschild's incompressible fluid sphere with the exterior Schwarzschild metric. ## i. Overview In his second 1916 paper, Schwarzschild solved Einstein's equations for a static sphere of incompressible fluid of constant density `ρ₀`. The interior space is a portion of a three-sphere of curvature radius `Rc`, with `Rc ^ 2 = 3 / (κ ρ₀)` (`κ = 8 π G`, `c = 1`), and the surface of the fluid sits at the polar angle `χ_a` with `sin χ_a = Ra / Rc`, where `Ra` is the areal radius of the surface. In the areal radius `r = Rc sin χ` the interior metric coefficients are - `g_tt = ((3 cos χ_a - cos χ) / 2) ^ 2 = (3 / 2 cos χ_a - 1 / 2 √(1 - r ^ 2 / Rc ^ 2)) ^ 2`, - `g_rr = 1 / (1 - r ^ 2 / Rc ^ 2)`, while outside the sphere the metric is the exterior Schwarzschild solution with `g_tt = 1 - α / r`, `g_rr = 1 / (1 - α / r)` and `α = Ra ^ 3 / Rc ^ 2`. The pressure is `ρ₀ + p = ρ₀ 2 cos χ_a / (3 cos χ_a - cos χ)`. This file takes the two metrics and the pressure as given (the field equations are not verified here) and proves the elementary properties of the junction at `r = Ra`: continuity of `g_tt` and `g_rr`, differentiability of the glued `g_tt`, non-differentiability of the glued `g_rr` in the curvature coordinate `r`, the vanishing of the pressure at the surface, and the Schwarzschild bound `cos χ_a > 1 / 3` (equivalently `Ra > 9 / 8 α`) for the central pressure to be positive. ## ii. Key results - `IncompressibleSphere` contains the input data: `Rc`, `Ra`, `ρ₀` with `0 < Ra < Rc` and `0 < ρ₀`. - `rs_div_Ra`: Schwarzschild's relation (40), `α / Ra = sin χ_a ^ 2`. - `pressure_chia`: the pressure vanishes at the surface. - `pressure_zero_pos_iff`: the central pressure is positive if and only if `cos χ_a > 1 / 3`. - `one_third_lt_cosChia_iff_rs`: `cos χ_a > 1 / 3` if and only if `9 / 8 α < Ra`. - `gttIn_Ra`, `grrIn_Ra`: the interior and exterior formulas agree at `r = Ra`. - `gttGlue_hasDerivAt`: the glued `g_tt` is differentiable at `Ra` with derivative `Ra / Rc ^ 2`. - `grrGlue_not_differentiableAt`: the glued `g_rr` is continuous but not differentiable at `Ra` (one-sided derivatives `2 Ra / (Rc ^ 2 cos χ_a ^ 4)` and `- Ra / (Rc ^ 2 cos χ_a ^ 4)`). ## iii. Table of contents - A. The input data - B. The Schwarzschild radius and the angle of the surface - C. The pressure - C.1. Pressure at the surface and at the centre - C.2. The bound `cos χ_a > 1 / 3` - D. The metric coefficients - D.1. The interior metric in the angle `χ` - D.2. The values at the surface agree - E. Derivatives of the metric coefficients at the surface - E.1. Two auxiliary derivatives - E.2. Derivatives of `g_tt` - E.3. Derivatives of `g_rr` - F. The glued metric coefficients - G. Consequences for the junction - H. A numerical instance ## iv. References - K. Schwarzschild, "Uber das Gravitationsfeld einer Kugel aus inkompressibler Flussigkeit nach der Einsteinschen Theorie", Sitzungsberichte der Koniglich Preussischen Akademie der Wissenschaften (1916), 424-434. English translation by S. Antoci, arXiv:physics/9912033. Equations (28), (29), (30), (35), (36), (39), (40) and the discussion on pages 8-9 of the translation (pressure diverging at `cos χ_a = 1 / 3`, limit `9 / 8 α`). - A. Lichnerowicz, "Theories relativistes de la gravitation et de l'electromagnetisme", Masson (1955), chapter III, sections 27-29 (junction conditions). -/ noncomputable section namespace GeneralRelativity open Real /-! ## A. The input data The sphere is specified by the curvature radius `Rc` of the interior space, the areal radius `Ra` of its surface and the constant density `ρ₀`. The sphere is a proper part of the spherical space (`Ra < Rc`, so that `χ_a < π / 2`). -/ /-- Schwarzschild's incompressible fluid sphere: the curvature radius `Rc` of the interior spherical space (`Rc ^ 2 = 3 / (κ ρ₀)`, Schwarzschild (37)), the areal radius `Ra` of the surface (Schwarzschild's `P_o`, (39)) and the constant density `ρ₀`, with `0 < Ra < Rc` and `0 < ρ₀`. -/ structure IncompressibleSphere where /-- The curvature radius of the interior spherical space. -/ Rc : ℝ /-- The areal radius of the surface of the fluid. -/ Ra : ℝ /-- The constant density of the fluid. -/ ρ₀ : ℝ /-- The curvature radius is positive. -/ Rc_pos : 0 < Rc /-- The radius of the surface is positive. -/ Ra_pos : 0 < Ra /-- The sphere is a proper part of the spherical space. -/ Ra_lt_Rc : Ra < Rc /-- The density is positive. -/ ρ₀_pos : 0 < ρ₀ namespace IncompressibleSphere variable (S : IncompressibleSphere) /-! ## B. The Schwarzschild radius and the angle of the surface These geometric parameters relate the exterior Schwarzschild radius `α` to the surface areal radius `Ra` and interior polar angle `χ_a` of the constant-density sphere. -/ /-- The Schwarzschild radius `α = (κ ρ₀ / 3) P_o ^ 3 = Ra ^ 3 / Rc ^ 2` of the sphere, Schwarzschild (40). -/ def rs : ℝ := S.Ra ^ 3 / S.Rc ^ 2 /-- The polar angle `χ_a` of the surface, `sin χ_a = Ra / Rc`, Schwarzschild (28). -/ def chia : ℝ := Real.arcsin (S.Ra / S.Rc) /-- The cosine of the angle of the surface, written as `√(1 - Ra ^ 2 / Rc ^ 2)`. -/ def cosChia : ℝ := √(1 - S.Ra ^ 2 / S.Rc ^ 2) /-! ## C. The pressure Schwarzschild's 1916 constant-density interior solution determines how the fluid pressure grows inward from the zero-pressure surface at `χ = χ_a` (`r = Ra`). -/ /-- The pressure of the fluid at the polar angle `χ`, Schwarzschild (30): `ρ₀ + p = ρ₀ 2 cos χ_a / (3 cos χ_a - cos χ)`. -/ def pressure (χ : ℝ) : ℝ := S.ρ₀ * (2 * S.cosChia / (3 * S.cosChia - Real.cos χ)) - S.ρ₀ /-! ### C.1. Pressure at the surface and at the centre -/ /-! ### C.2. The bound `cos χ_a > 1 / 3` Schwarzschild, page 9 of the translation: the pressure at the centre stays finite as long as `Ra > 9 / 8 α`. -/ /-! ## D. The metric coefficients The interior metric (35) is written in the areal radius `r = Rc sin χ`; the relation with the form in `χ` is a lemma (`gttIn_Rc_mul_sin`, `grrIn_Rc_mul_sin`), not a definition. The metric coefficients are taken up to the sign of the signature. -/ /-- The interior coefficient `g_tt` in the areal radius `r`, Schwarzschild (35): `(3 / 2 cos χ_a - 1 / 2 √(1 - r ^ 2 / Rc ^ 2)) ^ 2`. -/ def gttIn (r : ℝ) : ℝ := (3 / 2 * S.cosChia - 1 / 2 * √(1 - r ^ 2 / S.Rc ^ 2)) ^ 2 /-- The interior coefficient `g_rr` in the areal radius `r`, Schwarzschild (35): `1 / (1 - r ^ 2 / Rc ^ 2)`. -/ def grrIn (r : ℝ) : ℝ := 1 / (1 - r ^ 2 / S.Rc ^ 2) /-- The exterior coefficient `g_tt = 1 - α / r`, Schwarzschild (36). -/ def gttOut (r : ℝ) : ℝ := 1 - S.rs / r /-- The exterior coefficient `g_rr = 1 / (1 - α / r)`, Schwarzschild (36). -/ def grrOut (r : ℝ) : ℝ := 1 / (1 - S.rs / r) /-! ### D.1. The interior metric in the angle `χ` -/ /-! ### D.2. The values at the surface agree -/ /-! ## E. Derivatives of the metric coefficients at the surface Differentiating both interior and exterior metric coefficients prepares the junction verification of `C¹` continuity across the surface `r = Ra`. -/ /-! ### E.1. Two auxiliary derivatives -/ /-! ### E.2. Derivatives of `g_tt` -/ /-! ### E.3. Derivatives of `g_rr` -/ /-! ## F. The glued metric coefficients The glued coefficients use the interior formula for `r ≤ Ra` and the exterior formula beyond. The glued `g_tt` is differentiable at `Ra`; the glued `g_rr` is continuous but not differentiable at `Ra`, since its one-sided derivatives differ. -/ /-- The glued `g_tt`: interior formula for `r ≤ Ra`, exterior formula beyond. -/ def gttGlue (r : ℝ) : ℝ := if r ≤ S.Ra then S.gttIn r else S.gttOut r /-- The glued `g_rr`: interior formula for `r ≤ Ra`, exterior formula beyond. -/ def grrGlue (r : ℝ) : ℝ := if r ≤ S.Ra then S.grrIn r else S.grrOut r /-! ## G. Consequences for the junction In a Gaussian coordinate `l` along the radius, `dr / dl = 1 / √g_rr` and `d g_tt / dl = g_tt' / √g_rr`. Both quantities take the same value at `Ra` from the two formulas (Lichnerowicz, chapter III, section 28, evaluated at the surface). The coordinate `l` itself is not constructed here. -/ /-! ## H. A numerical instance The sphere with `Rc = 1`, `Ra = 3 / 5` and `ρ₀ = 1`: `cos χ_a = 4 / 5`, `α = 27 / 125`, `9 / 8 α < Ra`, central pressure `1 / 7`. -/ end IncompressibleSphere end GeneralRelativity end
Source