# Running the working files of The Unfolding Map

This folder is the working tree behind The Unfolding Map, *How to Write Matthew from Revelation* (Alexanarch #1812) and *Parallelomania Is Reefer Madness* (#1819). Each count in those papers was made by a script here, run against the corpora seated in the Alexanarch repository. The tree is kept in the repository at `rebuild/unfolding-map/` and published at revelationfirst.com/unfolding/notebook/work/.

## 1. Setup

1.1. Python 3.11 or later. The scripts use the standard library, except `dss/tfload.py`, which needs Text-Fabric (`pip install text-fabric`).

1.2. The seated corpora. In the Alexanarch repository they are found without setting anything. For the copy published on revelationfirst.com, clone the Alexanarch repository beside the revelationfirst.com repository (`git clone https://github.com/leesharks000/alexanarch`), or set `ALEXANARCH_CORPORA` to its `data/corpora` folder. `sources/m2.py` and `sources/inventory.py` also read the unfoldings of revelationfirst.com; they find them the same way, or by `REVFIRST_UNFOLDING`. Every path is taken from `paths.py` at the root of this folder.

1.3. Run each script from its own folder (`cd dss && python3 check.py`). Scripts read the files beside them and in neighbouring folders by relative path.

## 2. Run order

2.1. **The scrolls (#1819; #1812 section D).** `cd dss`, then `python3 tfload.py` first: it builds `dss_words.pkl`, the word table of the non-biblical scrolls, from the Text-Fabric seat (ETCBC/dss 1.9). The file is about 13 MB and is not kept in the repository. Then, in any order: `rows_sealed.py` and `rows2_sealed.py` (the sealed lists; each prints its hash), `check.py` and `check2.py` (rows against the seats, with the exchanged-pairings control), `ledger_reach.py`, `bridge.py`, `search.py`, `thorough.py`, `calibrate.py`, `philo_control.py`, `union.py`. The account is `DSS-AND-MATTHEW.md`.

2.2. **Revelation's sealed list (#1819 sections 5 to 7).** `cd dss/rev`, then `python3 rev_check.py`, which checks `rev_rows_sealed.py` against its seal before it runs.

2.3. **The challenge (#1819 section 4).** `cd dss/challenge`, then `search.py`, `search_ungated.py`, `score.py` (the first scoring, kept), `score2.py` (the rescoring after the reviews). The blind readers' packs and returns are in `blind2/` and `blind3/`, as they were given and received.

2.4. **The economy count (#1812 section O).** `cd sources`, then `python3 occam.py`, which checks `OCCAM.sealed.md` against its hash and writes `occam.json` (354 to 544 of 1,068 verses; 131 in the remit of the two posited documents). `codes.py` is the first coder; `agreement.py` measures the blind second reader against it; `SCHEME.md` and `blind_codebook.md` are the scheme and the codebook the second reader was given.

2.5. **Direction (#1812 XIV.7a).** `cd arrow`, then `arrow.py`, `arrow2_quot.py`, `arrow2.py`, `arrow3.py`, `arrow3_sealed_order.py`, `rev_lxx_sealed.py`, `diag.py`. The design of each was sealed before its run (`*.seal.txt`). The account is `ARROW.md`.

2.6. **Episodes.** `cd episodes && python3 dump.py "Matt 26:20-29" "Rev 19:6-9"` prints the seated Greek of named spans (Matthew, Revelation or a book of the Septuagint) for reading whole. `EPISODES.md` is the reading.

2.7. **Older folders.** Every other folder here belongs to earlier versions of the notebook and runs the same way. `layer/bg.py` reads `philo/matt-philo-pairs.json`, which `philo/philo.py` writes.

## 3. What a rerun reproduces

3.1. Checked on 30 November 2026: every script in sections 2.1 to 2.6 was run twice under one fixed hash seed, once before the paths were moved into `paths.py` and once after, and the output was the same, byte for byte.

3.2. Most scripts give the same output under any hash seed. Four do not: `arrow/arrow2.py`, `arrow/arrow3.py`, `layer/bg.py` and `layer/bh.py`. They iterate over Python sets, and where rows tie, the order of the set decides which row is taken. In `layer/` only the order of a printed list changes. In `arrow/` the counts move by a few rows. Under eight seeds, `arrow2.py` gave 713 to 717 rows of Kingdoms into Chronicles. The verb-to-noun measure, reported in #1812 XIV.7a as 78 and 75 per cent, came out at 69.5 to 77.1 per cent and 70.7 to 74.5 per cent, and it passed on both retellings under every seed. On the ledger it was defined on 26 of 158 rows and abstained under every seed. Under two seeds, `arrow3.py` gave rank correlations of 0.60 and 0.45 for the two retellings, reported as 0.57 and 0.48, and −0.06 for Matthew against Revelation under both. The figures in the papers are those of one run without a fixed seed. For a repeatable run, set the seed: `PYTHONHASHSEED=0 python3 arrow2.py`.

3.3. Every sealed file carries its hash. A script that runs a sealed design checks the hash first and stops if the file has changed.
