r/LLMPhysics • u/Ambitious-Prompt-975 • 1d ago
Question Looking for feedback on our Lean 4 formalization of Birkhoff's theorem (coordinate-free Lorentzian manifolds + Killing fields)
Hi everyone!
Up front: everything in this repository (definitions, statements, proofs and a paper draft) - even the initial draft for this very post - was written by AI; mostly Claude running in teams of agents. I'm not an expert in general relativity, and before going further I'd like a blunt outside opinion on whether this is worth anything**. And how "sloppy" it is.** (There are 3 actual questions at the end of this post.)
That is because I want to understand if I should spend more time/resources working on this topic. I always loved physics but I am not the smartest person and my professional carreer got me into (enterprise) software development instead.
I started this repository because I wanted to understand the maths behind some concepts like quantum mechanics, pilot waves, superdeterminism; So I started with generating some explainer-pages about vectors and matrices, very simple stuff for most of you - and somehow, because I kept asking stupid questions about gravitiy - we ended up with something where Claude told me it *could* be paper-worthy; especiall the upcoming parts.
The big work is still to come (I quote the LLM: "`G2`, which would say a complete space-time of this kind is exactly Kruskal's or one of its four folded versions. It needs paths of free fall on a curved space, which neither this project nor Lean's library has yet."). Since that would probably require me to scale up even more, I'm pausing here to get a real opinion.
Repo: https://github.com/flujo-app/gravity-in-lean (Lean 4.36.0, mathlib pinned)
Paper draft: https://github.com/flujo-app/gravity-in-lean/blob/main/paper/paper.md (PDF, LaTeX)
What it claims
Birkhoff's theorem starting from a manifold rather than from a coordinate form: a smooth Lorentzian metric on a 4-manifold that is Ricci-flat and has three Killing fields with so(3) brackets and 2-dimensional spacelike orbits is locally Schwarzschild. This holds at every point, the horizon and the bifurcation sphere included (there the chart goes to Kruskal–Szekeres), with one mass per connected region, and the converse holds too.
On a simply connected region: one local isometry into Kruskal–Szekeres (or Minkowski, or negative-mass Schwarzschild), unique up to an isometry of the model.
Things it needed that mathlib doesn't have: existence and uniqueness of the Levi-Civita connection for any signature, joint smoothness of flows in time and initial point, and adapted coordinates for three fields with so(3) brackets and rank 2.
How it was checked
Each final statement was written as a `def … : Prop` before any proof existed, and the agents were not allowed to change it. `Audit.lean` checks `example : Statement := theorem` for each one, and checks that all 2,605 declarations use only `propext`, `Classical.choice` and `Quot.sound`. `lake check --paranoid` with all six bundled checkers accepts an export of the headline theorems. That run was outside the sandbox, because this is a Windows machine.
What Claude & I already know is weak
The mathematics is classical (Jebsen 1921, Birkhoff 1923), and ProjectAinos proved a coordinate version in Lean a few days earlier.
Symmetry is assumed as three Killing fields, not as an SO(3) action. That an action gives the fields is argued only on paper.
About 39,000 lines in about 27 hours (real world time; including Lean builds, checks, etc.). Roughly 630 helper lemmas have been read by no human.
The names are unusual: `IsEmptyOn` means Ricci-flat, `LengthMeasure` is the metric, `Arrows` are vector fields.
Three questions
Is any of this worth writing up, and if so, where? Or is it a big pile of AI-written Lean that nobody needs?
Do the definitions mean what a relativist means? They're in `GravityInLean/Curved/Basic.lean` (359 lines), `Curved/Goal.lean` (220) and `Goals/EveryPoint.lean` (194).
Has anyone machine-checked Birkhoff's theorem from the symmetry, rather than from a coordinate form? We found ProjectAinos (coordinate form), grlab (the static last step) and Lightlike's orbit charts (cosmology), and nothing else.
Blunt answers are very welcome, including "don't bother" or pointing me towards a better place to ask this.
Thanks a ton, I appreciate y'all.