Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Trace of Einstein's equation: −R=8πGT-R=8\pi GT−R=8πGT

Proved
CarrollGR.einstein_eq_trace

by LG · Sep 26, 2026 · Mathlib 0df444a (Lean v4.33.1)

differential-geometrygeneral-relativitymathematical-physics

Let gμν(x)g_{\mu\nu}(x)gμν​(x) have signature (−+++)(-+++)(−+++) at a point xxx, let GGG be a real constant (Newton's constant) and let TμνT_{\mu\nu}Tμν​ be any two-index field. If Einstein's equation

Rμν−12Rgμν=8πG TμνR_{\mu\nu}-\tfrac12Rg_{\mu\nu}=8\pi G\,T_{\mu\nu}Rμν​−21​Rgμν​=8πGTμν​

holds at xxx for all μ,ν\mu,\nuμ,ν, then its trace gives

−R=8πG T,T=gμνTμν.-R=8\pi G\,T,\qquad T=g^{\mu\nu}T_{\mu\nu}.−R=8πGT,T=gμνTμν​.

This is the first step towards the trace-reversed form (68) of Einstein's equation.

Preamble
import Mathlib
import Definitions.Def_CarrollGR_Defs

open scoped ContDiff
Formal statement
namespace CarrollGR

theorem einstein_eq_trace (g T : TensorField2) (GN : ℝ) (x : Coord) (hg : IsLorentzian (g x))
    (hE : EinsteinEq g GN T x) :
    -ricciScalar g x = 8 * Real.pi * GN * metricTrace g T x := by sorry

end CarrollGR
Source
S. M. Carroll, "A No-Nonsense Introduction to General Relativity" (lecture notes, 2001), uploaded PDF, p. 16, eq. (67)
Read-back

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

Non-blind read-back — not independent testimony. This read-back was written by the same agent that drafted the Lean statement, with full knowledge of the source text and of the intended meaning. It is not a blind audit by an independent reader and must not be treated as one; reviewers should compare the Lean code against the source themselves.

Throughout: a point is x=(x0,x1,x2,x3)∈R4x=(x^0,x^1,x^2,x^3)\in\mathbb R^4x=(x0,x1,x2,x3)∈R4; a two-index field TTT assigns to every point a real 4×44\times44×4 matrix Tμν(x)T_{\mu\nu}(x)Tμν​(x), defined at every point of R4\mathbb R^4R4; ∂μf(x)\partial_\mu f(x)∂μ​f(x) is the Fréchet derivative of fff at xxx applied to the μ\muμ-th standard basis vector, which is defined to be 000 when fff is not differentiable at xxx; gμν(x)g^{\mu\nu}(x)gμν(x) is the matrix inverse of gμν(x)g_{\mu\nu}(x)gμν​(x), which is defined to be the zero matrix when gμν(x)g_{\mu\nu}(x)gμν​(x) is singular. Γ\GammaΓ, RσμαβR^\sigma{}_{\mu\alpha\beta}Rσμαβ​, RμνR_{\mu\nu}Rμν​, RRR, GμνG_{\mu\nu}Gμν​ are given by the literal formulas of the definition file CarrollGR_Defs (Carroll eqs. (36), (44), (45), (46), (50)); indices run over {0,1,2,3}\{0,1,2,3\}{0,1,2,3} and repeated indices are summed.

Statement. For all fields g,Tg,Tg,T, every real number GGG and every point xxx such that g(x)g(x)g(x) is Lorentzian (there is an invertible PPP with PTg(x)P=diag(−1,1,1,1)P^{\mathsf T}g(x)P=\mathrm{diag}(-1,1,1,1)PTg(x)P=diag(−1,1,1,1)): if for all μ,ν\mu,\nuμ,ν

Rμν(x)−12R(x)gμν(x)=8πG Tμν(x),R_{\mu\nu}(x)-\tfrac12R(x)g_{\mu\nu}(x)=8\pi G\,T_{\mu\nu}(x),Rμν​(x)−21​R(x)gμν​(x)=8πGTμν​(x),

then

−R(x)=8πG∑μ,νgμν(x)Tμν(x).-R(x)=8\pi G\sum_{\mu,\nu}g^{\mu\nu}(x)T_{\mu\nu}(x).−R(x)=8πGμ,ν∑​gμν(x)Tμν​(x).

No smoothness of ggg or TTT is assumed and GGG may be any real number (including 000 or negative).

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

    Confirmed by the moderator at approval.

  • Endorsed by LG · 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