The script src/21-gravity/make_notebook.py of the validation package of the paper 21-grav, rendered with an anchor per line. ▶ run the predicates on Google Colab.
1"""Builds 21-gravity-main.ipynb (the Colab driver of the 21-gravity validation package). Run: python3 make_notebook.py"""2import json3import gravcommon as gc45NB = "21-gravity-main.ipynb"6PKG = "21-gravity"7COLAB = f"https://colab.research.google.com/github/gamayos/finite-ring-space/blob/main/src/{PKG}/{NB}"8cells = []9def md(s): cells.append({"cell_type": "markdown", "metadata": {}, "source": s})10def code(s): cells.append({"cell_type": "code", "metadata": {}, "execution_count": None, "outputs": [], "source": s})1112GROUPS = [13 ("The Newtonian and relativistic layers", ["newton", "ppn", "branch", "fp_gauge", "fierz_pauli", "radiative", "orderone"],14 "The lattice Green's function and the inverse-square law; the PPN and classical-test factors; the nonlinear completion (cut-flux law, the exponential reading unique); the discrete Fierz–Pauli gauge invariance and its uniqueness; the radiative sector; the order-one constants and the Carrier-register residues."),15 ("The strong field and the rotating solution", ["strongfield", "rotating", "fold_echo"],16 "The static profile with its photon sphere, shadow, ISCO and accretion efficiency; frame dragging as the quarter-turn dual; the fold-return criterion at dev scale (no prompt echo)."),17 ("The floor, the crossover and registration", ["rar", "deepregime", "deepregime_orbit", "inertia", "defect", "counting", "fluxnoise"],18 "The acceleration floor against SPARC; the registration crossover and its orbital response; the two-shift update law; the projection defect; the unified counting checks; flux conservation under drive noise."),19 ("The two-body sector and the primordial spectrum", ["2pn", "1pn_eih", "binding", "primordial"],20 "The 2PN inputs and the J0737−3039 excess; the 1PN equivalence lemma; the binding bookkeeping; the scale-invariant spectrum."),21]2223md(f"""[]({COLAB})2425## Gravitation as Phase Synchronisation over Finite Holographic Substrate (Akhtman & Voether, 2026)2627**Validation Package.** `finite-ring-space/src/{PKG}` — the paper's twenty-one validation scripts as written, run through one registry: a28family check is one script's verdict (`grav.<stem>`), its micro-checks the script's labelled checks and every PASS/FAIL line it29prints; each family names the row(s) of the paper's predicate ledger it witnesses (the paper's Section "Status", subsection30"Predicate ledger", rows cited as `21:XN`; public copy at `docs/21-gravity/21-gravity-ledger.html`), and the ledger's source column31cites the family ids in return. Where a row is proved in Lean (`lean/FrcCore/Gravity.lean` with no axioms, or32`lean/FrcLedger/Gravity.lean` on Mathlib — the Carrier register, the count face and the merger law, the cover forcing, the operational33cut and the photon sphere, the registration root and the crossover's limits, the shift theorem, with the shadow, ringdown, efficiency,34floor, tilt and interpolant numerals bracketed), the check here is the instance the reader can run. Master-ledger rows of the corpus35reached through the paper rows: `00:A9`, `00:D1`, `00:D3`, `00:D5`, `00:B7`, `00:E1`, `00:D15`, `00:E3`–`00:E7`, `00:E10`, `00:L1`,36`00:L7`, `00:L8`, `00:T1`, `00:T4`, `00:T5`, `00:Z7`.3738**Kinds.** `EXACT`: decidable identities over finite fields, exact rationals or symbolic identities, no tolerance in the verdict.39`CHART`: a continuum reading or a comparison with measured data, tagged [approx]/[data] in the script, verdict by stated tolerance.40`SIM`: a seeded stochastic simulation, verdict by stated tolerance on time averages.4142**Run.** Cell by cell, or *Runtime → Run all*; ≈ 1–2 minutes on Colab. The last cell writes `results.json` and fails loudly if any family fails.""")4344code(f"""# --- environment: clone the package if this notebook is not already running inside it (Colab). numpy and sympy are present on Colab.45import os46if not os.path.exists("gravcommon.py"):47 if not os.path.exists("finite-ring-space"):48 !git clone --filter=blob:none --sparse https://github.com/gamayos/finite-ring-space.git49 os.chdir("finite-ring-space")50 !git sparse-checkout set src/{PKG}51 os.chdir("src/{PKG}")52 else:53 os.chdir("finite-ring-space/src/{PKG}")54print("working directory:", os.path.join(*os.getcwd().split(os.sep)[-3:]))""")5556code("""import importlib, gravcommon as gc57importlib.reload(gc) # a fresh registry if the notebook is re-run58print("families registered:", len(gc.LABELS))""")5960def rowkey(r):61 lab = r.split(":")[1]62 return (lab[0], int(re.sub(r"[^0-9]", "", lab) or 0), lab)63import re64for title, stems, desc in GROUPS:65 ids = ["grav." + s for s in stems]66 rows = sorted({r.strip() for i in ids for r in gc.LEDGER[i].split(",")}, key=rowkey)67 table = "| id | script | kind | claim | ledger rows |\n|---|---|---|---|---|\n" + "\n".join(f"| `{i}` | `{gc.script_of(i)}.py` | {gc.KIND[i]} | {gc.LABELS[i]} | {gc.LEDGER[i]} |" for i in ids)68 md(f"## {title}\n{desc}\n\n{table}\n\nLedger rows witnessed: {', '.join(rows)}.")69 code("for fam in " + json.dumps(ids) + ":\n print(f\"\\n— {gc.script_of(fam)}.py\"); gc.run_block(fam)")7071md("""## Summary72Writes `results.json` (one record per family: id, the ledger row(s) witnessed, script, kind, claim, PASS/FAIL, the micro-check count) and raises if any family failed.""")73code("""ok = gc.summary(write=True)74failed = [r["id"] for r in gc.RESULTS if not r["ok"]]75assert ok, f"FAILED families: {failed}"76print(f"all {len(gc.RESULTS)} families pass ({len(gc.MICRO)} micro-checks); records in results.json")""")7778for k, c in enumerate(cells):79 c["id"] = f"cell-{k}"80nb = {"cells": cells, "nbformat": 4, "nbformat_minor": 5,81 "metadata": {"kernelspec": {"display_name": "Python 3", "language": "python", "name": "python3"},82 "language_info": {"name": "python"}, "colab": {"provenance": [], "toc_visible": True}}}83try:84 import nbformat85 nbf = nbformat.from_dict(nb); nbformat.validate(nbf); nbformat.write(nbf, NB)86except ImportError:87 with open(NB, "w") as f:88 json.dump(nb, f, indent=1, ensure_ascii=False)89print(f"wrote {NB} with {len(cells)} cells")90