Research repository for "The Divergence Theorem for Regime Transition Detection: Multi-Scale Estimator Disagreement as a Cross-Domain Early Warning Signal" — a standalone paper under the Discovery Lattice / Lagging Truth program.
Built under the Research-to-Publication Standard v1.8. The contract:
A number may appear in the paper only if a committed script, run on hashed input data, regenerates it on demand. No script, no number. The script is the truth; the paper quotes it. Done =
verify.pyexits green.
There is no outside gatekeeper: the paper is posted as a work-in-progress, comments welcome, and is refutable by anyone because the data dictionary, code, and review transcript are public.
A fast-window trailing estimator minus a slow-window trailing estimator of the same
observable — the divergence operator D(t) = Ŷ_f(t) − Ŷ_s(t) — is a single
construct of which the familiar folk early-warning indicators (the MACD in finance,
the Sahm Rule in macroeconomics, rising-variance signals in ecology) are special
cases. The Persistence-Sign Theorem fixes the sign of the operator's forward
association from the observable's autocorrelation alone, and critical slowing down
is shown to be a strict special case of divergence. That same-observable sign law is
the central falsifiable test; the paper reports a mixed verdict — it holds in
five of seven domains and is contradicted in none, with solar physics its strongest
confirmation and the headline equity-volatility panel failing its own pre-registered
gate.
| Path | Contents |
|---|---|
THESIS.md |
Phase 0 — the claim, why it matters, the gap, the falsifier. |
DESIGN.md |
Phase 1 — each experiment's exact operator, decision rules, spec counts, and the data manifest. Amended dated, never overwritten. |
OUTLINE.md |
Phase 1 — the section-by-section manuscript plan, reconciled against the paper by verify.py. |
COVERAGE.md |
Phase 1 — the map from claims to evidence to manuscript location. |
analysis/SOURCES.md |
Every input series: source, exact identifier, date range, full SHA-256, project-local store location, and replicator tolerances. |
analysis/ |
One script per domain (e1_financial.py … e7_econ.py) plus the shared divergence_pipeline.py; each reads hashed data and writes its result to analysis/outputs/ as JSON. |
analysis/outputs/ |
Committed JSON results — what the paper quotes. |
analysis/proofs/ |
The symbolic/numeric proof-checking scripts for the theorems. |
claims.lock |
Phase 3 — the ledger: one row per load-bearing number → script, input hashes, value, tolerance, CIC flags. Generated by build_claims.py. |
cic.py |
The claim-integrity-check helper used by the ledger and verify.py. |
verify.py |
Phase 3 — the checker. Green = done. Re-hashes inputs, re-runs the domain scripts and the proofs, and checks the ledger and the manuscript anchors. |
render.py |
Substitutes the ledger's values into the manuscript's {{LB-…}} markers, producing paper/paper.rendered.md. |
build_pdf.ps1 |
Builds the typeset PDF from the rendered manuscript (pandoc → xelatex). |
paper/ |
Phase 4 — the manuscript (the-divergence-theorem.md, the marker source), the rendered manuscript, and the typeset PDF. The plain-English companion's canonical copy lives at LaggingTruth.com (series one-copy rule, 2026-08-08); it is not duplicated here. |
verification/ |
Phase 5 — the capped adversarial-review prompt, transcript, and per-finding dispositions, plus the clean-room reproduction record. |
CORRECTIONS.md |
Public post-publication corrections log (initialized at publication; errors found in the published record are handled here, in the open). |
DECISIONS.md |
Append-only research notebook: decisions, dead ends, surprises. |
requirements.txt |
Pinned Python environment. |
# 1. Environment (Python 3.12)
pip install -r requirements.txt
# 2. Obtain the input data (not committed)
# Each series is documented in analysis/SOURCES.md by source, identifier,
# date range, and full SHA-256. Place the files in one folder.
# 3. Run a domain analysis (e.g. the solar test)
# The scripts read the data folder from the DIVERGENCE_STORE environment
# variable and write JSON to analysis/outputs/.
DIVERGENCE_STORE=/path/to/data python analysis/e4_solar.py
# 4. Verify everything (re-runs all domains + proofs, checks the ledger and paper)
python verify.py --paper paper/the-divergence-theorem.md --proofs
The paper draws on seven domains. Some series — the financial instruments — are
vendor exports of exchange-licensed market data, whose terms permit analysis but not
redistribution of the raw series. The rest are public scientific and economic
datasets (sunspot, hydrologic, epidemiological, climatic, and macroeconomic
records). This repository follows standard practice: the code is public and the
data sources are documented precisely enough to be reproduced — every file
pinned by identifier, observation count, date range, and full SHA-256 in
analysis/SOURCES.md. A within-tolerance mode in verify.py accepts a replicator's
own export against the declared per-series tolerance.
This project is a rebuild of previously completed work under the Standard; see the
dated provenance entry in DECISIONS.md. Git timestamps document the rebuild, not
the original formation of the hypotheses.
Three kinds of material, three licenses — full text and file lists in LICENSE:
the manuscript CC BY-NC-ND 4.0; the plain-English companion CC BY-NC 4.0;
the code MIT. Raw input data is not in this repository (see analysis/SOURCES.md).
This repository is tagged and archived to Zenodo. Concept DOI 10.5281/zenodo.20820524 (resolves to the latest version; the published versions live under it). Recommended citation:
Kim, Jae (2026). "The Divergence Theorem for Regime Transition Detection: Multi-Scale Estimator Disagreement as a Cross-Domain Early Warning Signal." Working paper, v1.0.1. doi:10.5281/zenodo.20820524.