[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"EZTqsi9sqV":3},"# Mathematical Physics in Lean 4\n\n**From Groups to Gravitational Waves — a from-scratch formalization of the mathematical\nstructures of physics in dependent type theory.**\n\n![Lean](https://img.shields.io/badge/Lean-4.26.0-blue)\n![Mathlib](https://img.shields.io/badge/dependencies-none%20(no%20Mathlib)-6f42c1)\n![Files](https://img.shields.io/badge/modules-63-informational)\n![sorry](https://img.shields.io/badge/sorry-0-brightgreen)\n![axioms](https://img.shields.io/badge/axioms-365-orange)\n![CI](https://github.com/TataSatyaPratheek/mathematical-physics-lean/actions/workflows/lean_action_ci.yml/badge.svg)\n\nA single machine-checked development that builds the core language of mathematical physics —\ngroup, ring, module, Lie and Clifford algebra; topology, smooth manifolds, differential forms,\nfibre bundles, de Rham and Chern–Weil theory; and then **general relativity** — entirely in **pure\nLean 4, with no Mathlib dependency**. Everything is **dimension-parametric**: Minkowski space,\nLorentz groups, curvature, and the Einstein equations are stated for general `n` and specialized to\n4.\n\nA **30-chapter companion book** ([`book/main.pdf`](./book/main.pdf)) is generated alongside the\nformalization: *Mathematical Physics in Lean 4 — From Groups to Gravitational Waves*.\n\n## Honesty note (please read)\n\nThis is a **formalization**, and it is explicit about its trust surface:\n\n- **0 `sorry`** — nothing is left as an unfinished proof.\n- **365 `axiom`s** — foundational results (standard analysis/topology facts that Mathlib would\n  otherwise supply, plus the physical field equations themselves) are stated as named axioms, and\n  **everything else is derived from them with complete proofs**. Because the library deliberately\n  takes **no Mathlib dependency**, the analytic scaffolding is axiomatized rather than re-proved.\n  Verify both numbers yourself:\n\n  ```bash\n  grep -rE '\\bsorry\\b' MathPhysics --include='*.lean' | grep -v 'no sorry'   # expect: nothing\n  grep -rcE '^\\s*axiom\\b' MathPhysics --include='*.lean' | awk -F: '{s+=$2} END{print s}'  # 365\n  ```\n\n  and `#print axioms \u003Cname>` in any file shows exactly which axioms a given theorem depends on. The\n  axioms concentrate in the geometry core (`Curvature.lean`, `ChernWeil.lean`), so that is where the\n  trust surface actually lives.\n\n**Versus Mathlib-based formalizations.** This library re-derives its own algebra → geometry tower\nand therefore axiomatizes the analytic scaffolding (limits, integration, topology) that Mathlib would\nsupply as theorems. The payoff is a self-contained, dependency-free, sub-minute clean build; the cost\nis a larger trusted axiom base — which is precisely why every module documents its axioms.\n\nSo the claim is not \"general relativity proved from the axioms of type theory.\" The claim is:\n*a coherent, dimension-parametric, machine-checked framework in which the theorems of the subject\nare stated precisely and their derivations are gap-free above a clearly labelled axiom base.* Each\nmodule documents the axioms it introduces.\n\n## The headline result: dimension and gravitational waves\n\nThe Einstein tensor behaves differently in different dimensions, and the library makes this precise\n(`MathPhysics/Relativity/EinsteinN.lean`):\n\n| Dimension | Statement | Declaration | Trust |\n|:--|:--|:--|:--|\n| `n = 2` | Einstein tensor vanishes identically → no gravitational dynamics | `einstein_vanishes_2d_n` | **axiom** |\n| `n = 3` | vacuum ⇒ flat → **no gravitational waves** (Weyl vanishes) | `vacuum_3d_implies_flat` | **axiom** |\n| `n ≥ 4` | vacuum admits non-flat solutions → **gravitational waves exist** | `vacuum_nontrivial_4d` | **axiom** |\n\n**Read this honestly:** these three dimensional facts are stated as **axioms** — they *are* the\nclassical GR results, taken as premises. What is *proven* is the framework around them: the Einstein\nequations for general `n` (`EinsteinEquationsN`), the contracted-Bianchi ⇒ energy–momentum\nconservation chain, and the vacuum-plus-Λ reduction `G = −Λg` (`vacuum_cosmological_reduces`, a real\n~15-line proof). So \"**four spacetime dimensions is the minimum in which gravitational waves can\npropagate**\" is here a precisely-stated, machine-checked *framework* built on a postulated dimensional\nthreshold — not a derivation of that threshold from first principles.\n\n## What's inside\n\n| Area | Modules (selected) |\n|:--|:--|\n| **Algebra** | groups, rings, modules, ordered fields, Lie algebras & groups, quadratic forms, Clifford & super-algebras, representations |\n| **Topology & manifolds** | topological spaces, charts, tangent spaces, geometric structures |\n| **Differential geometry** | differential forms, de Rham, fibre & principal bundles, Chern–Weil |\n| **Algebraic topology / TDA** | homology, cohomology, simplicial complexes |\n| **Relativity** | Minkowski (4 and `n`), Lorentz & Poincaré groups, pseudo-Riemannian geometry, Levi-Civita connection, curvature, geodesics, Einstein equations (4 and `n`), Schwarzschild, cosmology, causal structure, singularity theorems, ADM, black-hole thermodynamics, Cartan formulation, spinor bundles |\n| **Foundations** | type theory, homotopy type theory (HoTT), category theory |\n\n63 modules, ~1,370 declarations, ~21,400 lines of Lean.\n\n## Build\n\n```bash\nlake build          # builds the whole MathPhysics library (no external dependencies)\nlake exe mathphysics\n```\n\nRequires the Lean toolchain pinned in `lean-toolchain` (`leanprover/lean4:v4.26.0`). Because there is\nno Mathlib dependency, a clean build is fast.\n\n## Continuous integration\n\nEvery push and pull request runs [`leanprover/lean-action`](https://github.com/leanprover/lean-action)\non GitHub's `ubuntu-latest`, doing a full `lake build` — see\n[`.github/workflows/lean_action_ci.yml`](./.github/workflows/lean_action_ci.yml). Green CI means the\nentire library type-checks (0 `sorry`) against its axiom base.\n\n## The book\n\n`book/` contains the LaTeX source and the built PDF of the 30-chapter monograph that mirrors the\nformalization, from Chapter 1 (groups) to Chapter 30 (advanced topics), with Chapter 18 (Einstein\nequations) and **Chapter 19 (dimension)** covering the gravitational-wave threshold above.\n\n## Citation\n\n```bibtex\n@misc{tata2026mathphyslean,\n  title  = {Mathematical Physics in Lean 4: From Groups to Gravitational Waves},\n  author = {Tata, Satya Pratheek},\n  year   = {2026},\n  note   = {Pure Lean 4 formalization, no Mathlib; 63 modules, 0 sorry, 365 axioms},\n  url    = {https://github.com/TataSatyaPratheek/mathematical-physics-lean}\n}\n```\n\n## Author\n\n**Satya Pratheek Tata** — [satyapratheek2000@gmail.com](mailto:satyapratheek2000@gmail.com)\n· [github.com/TataSatyaPratheek](https://github.com/TataSatyaPratheek)\n· [LinkedIn](https://linkedin.com/in/satyapratheek-tata)\n\nPersonal research project.\n\n## License\n\nMIT © 2026 Satya Pratheek Tata.\n",1793473265781]