Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

PhysLib Schwarzschild spacetime parameters

Definition
PhyslibSchwarzschildCoordinates

by scuba8684 · Nov 28, 2026 · Mathlib 0df444a (Lean v4.33.1)

general-relativityphyslib-exact-spacetimes

The Schwarzschild spacetime parameters used in the comparison with Schwarzschild–de Sitter.

Definition code
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.Algebra.BigOperators.Ring.Finset
import Mathlib.Algebra.Lie.Classical
import Mathlib.Analysis.Calculus.ContDiff.Deriv
import Mathlib.Analysis.Calculus.Deriv.Add
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.Deriv.Inv
import Mathlib.Analysis.Calculus.Deriv.Mul
import Mathlib.Analysis.Calculus.Deriv.Pow
import Mathlib.Analysis.Calculus.Deriv.Prod
import Mathlib.Analysis.Calculus.FDeriv.Symmetric
import Mathlib.Analysis.ODE.ExistUnique
import Mathlib.Analysis.SpecialFunctions.Sqrt
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Inverse
import Mathlib.Data.Matrix.Basic
import Mathlib.Data.Real.Basic
import Mathlib.Data.Set.Basic
import Mathlib.LinearAlgebra.Matrix.Notation
import Mathlib.LinearAlgebra.Matrix.Symmetric
import Mathlib.Logic.Equiv.Fin.Basic
import Mathlib.Tactic.FieldSimp
import Mathlib.Tactic.FinCases
import Mathlib.Tactic.Linarith
import Mathlib.Tactic.LinearCombination
import Mathlib.Tactic.NoncommRing
import Mathlib.Tactic.NormNum
import Mathlib.Tactic.Positivity
import Mathlib.Tactic.Ring

section

/-
Copyright (c) 2026 Alex Vergara Gil. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Alex Vergara Gil
-/


/-!

# Schwarzschild black hole spacetime

Exterior Schwarzschild black hole structure `SchwarzschildSpacetime`, its radial metric function
`f(r) = 1 - 2M/r`, radial Christoffel symbols, direct coordinate-level Riemann components, and
matching to the exterior of `IncompressibleSphere`.

## i. Overview

Starting from the line element `g = diag(-f, f⁻¹, r², r² sin²θ)` with radial metric function
`f = 1 - 2M/r`, where `M` is the mass of `S : SchwarzschildSpacetime`, this module views the metric
as a `StaticSpherical.StaticSphericalMetric`, computes radial derivatives of the metric and its static Newtonian
potential `Φ = -M/r`, and evaluates the radial Christoffel symbols `Γ^t_{tr}` and `Γ^r_{rr}`
from the metric components.

Note that this module uses the `(-, +, +, +)` signature (`g_tt = -f`), whereas
`IncompressibleSphere.gttOut` stores the positive factor `f = 1 - r_s / r` directly.

## ii. Key results

- `SchwarzschildSpacetime`, `SchwarzschildSpacetime.metricFn`,
  `SchwarzschildSpacetime.toStaticSpherical`, `SchwarzschildSpacetime.toCoordinateMetric`,
  `SchwarzschildSpacetime.metric`, `SchwarzschildSpacetime.metricInv` : Schwarzschild spacetime
  structure, metric function `1 - 2M / r`, and coordinate metric.
- `SchwarzschildSpacetime.ofIncompressibleSphere`,
  `SchwarzschildSpacetime.metricFn_ofIncompressibleSphere`,
  `SchwarzschildSpacetime.metric_tt_ofIncompressibleSphere`,
  `SchwarzschildSpacetime.metric_rr_ofIncompressibleSphere` : exterior matching with
  `IncompressibleSphere`.
- `SchwarzschildSpacetime.christoffelTtr_from_metric`,
  `SchwarzschildSpacetime.christoffelRrr_from_metric` : radial Christoffel symbols derived from
  the metric.

The coordinate Riemann, Ricci, scalar, and Einstein tensors are proved in
`Schwarzschild/CoordinateCurvature.lean` from `SchwarzschildSpacetime.toCoordinateMetric`.

## iii. Table of contents

- A. Metric function and radial Christoffel symbols
- B. Exterior matching with the incompressible sphere

## iv. References

* R. M. Wald, *General Relativity* (1984), Ch. 6 (Sec. 6.1-6.2). [ref: wald_1984_general_relativity]
* C. W. Misner, K. S. Thorne, and J. A. Wheeler, *Gravitation* (1973), Ch. 23 & Ch. 31.
  [ref: mtw_1973_gravitation]
* S. M. Carroll, *Lecture Notes on General Relativity* (1997), Ch. 7
  (https://arxiv.org/pdf/gr-qc/9712019#page=168). [ref: Carroll1997]
-/


namespace GeneralRelativity

namespace Schwarzschild

/-!

## A. Metric function and radial Christoffel symbols

From the Schwarzschild metric function `f = 1 - 2M/r` and diagonal inverse metric
`diag(-f⁻¹, f, r⁻², r⁻² sin⁻²θ)`, differentiating the radial metric components determines the mixed
Christoffel symbols `Γ^t_{tr}` and `Γ^r_{rr}`.

-/

/-- Exterior Schwarzschild black hole spacetime parameterized by geometric mass `M`. -/
structure SchwarzschildSpacetime where
  /-- Geometric mass parameter `M` (`G = c = 1`). -/
  M : ℝ

namespace SchwarzschildSpacetime

/-- The Schwarzschild radial metric function `f(r) = 1 - 2M / r`. -/
noncomputable def metricFn (S : SchwarzschildSpacetime) (r : ℝ) : ℝ := 1 - 2 * S.M / r









































/-!

## B. Exterior matching with the incompressible sphere

Matching the exterior mass `M = r_s / 2` to the constant-density sphere connects the point-mass
Schwarzschild geometry to the uniform-density stellar interior. The Riemann, Ricci, scalar, and
Einstein tensors are computed from the coordinate metric in `Schwarzschild/CoordinateCurvature.lean`.

-/









end SchwarzschildSpacetime

end Schwarzschild

end GeneralRelativity

end
Source
https://github.com/BishopWolf/physlib/blob/8046e2b0cb30f5fa25306a69ff29e91ab5711f6b/PhyslibAlpha/Relativity/General/Schwarzschild/Basic.lean

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