Reproducing the Symbolic Systems of A New Kind of Science

An engineering walkthrough · the nks-symbolic project · June 2026

This is the record of reproducing, in a small Rust engine, essentially every quantitative experiment published about symbolic systems in Wolfram’s A New Kind of Science: the rewriting systems of §3.10, their combinator relatives, and the cellular-automaton emulations behind the book’s universality argument. It is also a record of how — the dead ends, the conventions that had to be excavated, and the places where the reproduction overtook the original.

35+published claims reproduced
100+numbers matched exactly
106tests
0dependencies
~5 hone evening, ten commits
24–376×faster than the kernel

Every discrepancy met along the way — 264 vs 263, the 7050, the “≈49”, the edge zeros — resolved to a counting convention or a definition. Not one was a behavioral disagreement with the book.

1  The semantics contract

The book defines an evolution step as Mathematica’s expr /. rules (p. 102; notes b and i). We treated that as a formal contract: on curried expressions it is a pre-order traversal — try the rules at each node, first match wins; on a match, emit the instantiated right-hand side and descend into neither the replacement nor the matched region; otherwise head, then argument. The consequences are subtle enough that each gets a test mirroring a kernel one-liner:

Symbolic system evolution Each line is one step; boxed regions match the rule, and bands connect each box to the rewritten region on the next line, as in NKS p. 102. With color, each pattern variable's flow is tinted. e[x_][y_] x[x[y]] e[e[e][e]][e][e] e[e][e][e[e][e][e]][e] e[e[e]][e[e[e]][e]][e] e[e][e[e][e[e[e]][e]]][e] e[e[e[e][e[e[e]][e]]]][e] e[e[e][e[e[e]][e]]][e[e[e][e[e[e]][e]]][e]] e[e][e[e[e]][e]][e[e][e[e[e]][e]][e[e[e][e[e[e]][e]]][e]]] e[e[e[e[e]][e]]][e[e[e[e[e]][e]]][e[e][e[e[e]][e]][e[e][e[e[e]][e]][e]]]] e[e[e[e]][e]][e[e[e[e]][e]][e[e[e[e[e]][e]]][e[e][e[e[e]][e]][e[e][e[e[e]][e]][e]]]]] e[e[e]][e][e[e[e]][e][e[e[e[e]][e]][e[e[e[e[e]][e]]][e[e][e[e[e]][e]][e[e][e[e[e]][e]][e]]]]]] e[e][e[e][e]][e[e][e[e][e]][e[e[e]][e][e[e[e]][e][e[e[e[e[e]][e]]][e[e][e[e[e]][e]][e[e][e[e[e]][e]][e]]]]]]] e[e[e[e][e]]][e[e[e[e][e]]][e[e][e[e][e]][e[e][e[e][e]][e[e[e[e]][e]][e[e[e[e]][e]][e[e][e[e[e]][e]][e[e][e[e[e]][e]][e]]]]]]]] e[e[e][e]][e[e[e][e]][e[e[e[e][e]]][e[e][e[e][e]][e[e][e[e][e]][e[e[e[e]][e]][e[e[e[e]][e]][e[e][e[e[e]][e]][e[e][e[e[e]][e]][e]]]]]]]]] e[e][e][e[e][e][e[e[e][e]][e[e[e[e][e]]][e[e][e[e][e]][e[e][e[e][e]][e[e[e[e]][e]][e[e[e[e]][e]][e[e][e[e[e]][e]][e[e][e[e[e]][e]][e]]]]]]]]]] e[e[e]][e[e[e]][e[e][e][e[e][e][e[e[e[e][e]]][e[e][e[e][e]][e[e][e[e][e]][e[e[e[e]][e]][e[e[e[e]][e]][e[e][e[e[e]][e]][e[e][e[e[e]][e]][e]]]]]]]]]]] e[e][e[e][e[e[e]][e[e][e][e[e][e][e[e[e[e][e]]][e[e][e[e][e]][e[e][e[e][e]][e[e[e[e]][e]][e[e[e[e]][e]][e[e][e[e[e]][e]][e[e][e[e[e]][e]][e]]]]]]]]]]]] e[e[e[e][e[e[e]][e[e][e][e[e][e][e[e[e[e][e]]][e[e][e[e][e]][e[e][e[e][e]][e[e[e[e]][e]][e[e[e[e]][e]][e[e][e[e[e]][e]][e[e][e[e[e]][e]][e]]]]]]]]]]]]]
The p. 102 system in the book’s own idiom: boxes mark matched regions, gray bands carry each one to its rewrite on the next line. The rule icon is the book’s variable-flow diagram — the x-band forks where the rule duplicates its binding.

Process. wolframscience.com 403s generic fetchers; plain curl with a browser user-agent got every page. The decisive move came before any Rust was written: a local Wolfram kernel pinned the canonical trajectory — first six states verbatim, twelve leaf counts, and “evolves after 264 steps” resolved to first fixed state at 263. Coding against pinned ground truth, the whole suite passed on its first run.

Beyond the book. The book had one implementation; now there are two. A differential fuzzer runs random rule systems on both engines and compares every state of every trajectory string-exactly against wolframscript: 48 random systems, the canonical trajectory, and a state 1,500 steps and ~1,500 levels deep — all byte-identical.

2  Golden numbers, and a race against the kernel

Page 103 makes two crisp claims, and both land: a fixed configuration of 256 opening + closing brackets after “264 steps” (fixed_at = 263), and 65,536 bracket pairs after “65,555 steps” (fixed_at = 65,554) — one counting convention, confirmed twice. The conserved quantity of note (e), val(f[a]) = 2val(f) + val(a), holds at every step, predicts both endpoints, and later became the tool for manufacturing benchmark systems of any size.

Sixty steps of the p. 102 system as the book’s p. 103 picture: each row is a state’s bracket sequence, opening dark, closing light. Straight from the CLI: run --output brackets.

Process. The 65,555-step run was the first real failure: retaining the trajectory held billions of shared nodes and the OS killed the process. The fix — streaming evolution, one state retained — brought it to 173 s in 182 MB. The deeper lesson: fixed points run 65,536 levels deep, so nothing may recurse on expression depth. Even Drop is a hand-written worklist; the standard destructor would overflow unwinding a fixed point.

Beyond the book — by an asymptotic margin. On identical Nest[# /. rule &, …] workloads, cross-verified state by state:

fixed point mstepsRustWolfram 14.1ratio
5125190.01 s0.24 s24×
1,0241,0310.04 s1.97 s49×
2,0482,0550.15 s16.6 s111×
4,0964,1060.59 s135.6 s230×
6,1446,1501.32 s496.8 s376×
65,53665,554173 s≈ a week (extrapolated)

The gap is a complexity class, not a constant: our totals grow as m2, the kernel’s as m3.04 across the whole range. Probes isolated why: the kernel’s no-match scan is excellent (linear; 8.6 ms over 65k nodes), but a rewrite at depth d costs it O(d²) to rebuild, versus O(d) for a persistent shared tree. The extrapolated week is moot anyway — with default settings the kernel hard-crashes building a fresh 16k-deep chain in one pass, a wall the big run would hit near depth 104.

A pitfall worth recording. Early probes returned results three times the expected size — at every depth, it turned out, whenever a probe script assigned a global x while the rule bound x_. Mathematica’s eagerly re-evaluates its right-hand side, so the matcher received e[x_][y_] → BIG[BIG[y]]. Documented semantics, not a bug (:> is immune) — and the suspicious data was caught in review, not by its author. All headline timings re-validated under renamed variables, matching to within run-to-run noise.

3  Numbering every symbolic system

To enumerate symbolic systems efficiently you need what the book never gives them: a rule number. The indexing is built on Szudzik’s elegant pairing function (NKS 2006) — pair(x,y) = y²+x if x<y, else x²+x+y — a bijection whose inverse needs one integer square root, and which fills square shells:

0 1 4 9 16 25 2 3 5 10 17 26 6 7 8 11 18 27 12 13 14 15 19 28 20 21 22 23 24 29 30 31 32 33 34 35 y → x →
Square shells (the paper’s slide 9): consecutive ids fill the L-shaped regions max(x,y) = s. Fed through the recursive expression numbering, square shells become depth shells.

Expressions number recursively (atoms first, then f[a] = unpair(n−A)), making the enumeration depth-ordered and downward closed. A system is pair(lhs_id, rhs_id) over {e, x, y, z}, with a restricted-growth condition giving each rule exactly one id. The paper’s own fixtures anchor it — Cantor order really does put s[s][s][s] at number 741 — and a closed-form Catalan–Stirling count cross-validates the id scan through every class up to (4,4). The p. 102 rule is system 7432.

Walking the enumeration, concretely

Decode the first ids and the depth shells fill in order — everything of height h before anything of height h+1:

idexpressionheightshell
0e1N1 = 1
1e[e]2N2 = 2
2e[e[e]]3N3 = 5
3e[e][e]3
4e[e][e[e]]3
5e[e[e[e]]]4
25e[e][e[e]][e[e][e[e]]]4N4 = 26
26e[e[e[e[e]]]]5first of the next shell

System ids stream the same way — identities flagged, α-duplicates silently absent:

$ nks-symbolic enumerate --from 0 --to 40 --list
0     1+1   id   e -> e
2     1+1   -    _ -> e
3     1+1   id   x_ -> x
16    1+2   -    e -> e[e]
17    1+2   -    _ -> e[e]
20    2+1   -    e[e] -> e
24    2+2   id   e[e] -> e[e]
26    1+2   -    x_ -> e[x]
30    2+1   -    e[_] -> e
31    2+1   -    e[x_] -> x
34    2+2   -    e[_] -> e[e]
35    2+2   id   e[x_] -> e[x]
37    1+2   -    x_ -> x[e]
ids 0..40: 40 scanned, 13 canonical systems (4 identity)

$ nks-symbolic id decode --kind rule 7432
e[x_][y_] -> x[x[y]]
lhs_id 36  rhs_id 86  leaves 3+3  vars 2  identity false
System 7432, by hand. Over leaf codes {e=0, x=1, y=2}: e[x_] is pair(0,1)+4 = 5; e[x_][y_] is pair(5,2)+4 = 36. x[y] is pair(1,2)+4 = 9; x[x[y]] is pair(1,9)+4 = 86. The system: pair(36, 86) = 86²+36 = 7432. Every id in this document unwinds the same way, one integer square root per node.

And here is the enumeration behaving — every canonical non-identity system among the first forty-odd ids, run from the book’s initial condition, with the p. 102 rule closing the set from id 7432:

The enumeration walked: collapse (2, 20, 30, 31, 42), unbounded regular growth (16, 26, 37, 41), brief transients (17, 34) — then the familiar irregular wedge at 7432. Each strip: 28 steps from e[e[e][e]][e][e].
The enumeration walked: collapse (2, 20, 30, 31, 42), unbounded regular growth (16, 26, 37, 41), brief transients (17, 34) — then the familiar irregular wedge at 7432. Each strip: 28 steps from e[e[e][e]][e][e].

Sweeping the space is then just an id range. Every system with both sides of height ≤ 3 — ids 0…163,215 — classifies in 3.3 seconds: 11,713 canonical systems; 10,868 fix, 49 go periodic, 331 outgrow the cap, 465 run on irregularly (specimens like 14462, x_[x_][y_] → y[e][x[e]], wander aperiodically). The book’s taxonomy, as a histogram:

fixed 10,868 periodic 49 capped 331 ongoing 465 log scale — 11,713 canonical systems with side heights ≤ 3, evolved from e[e[e][e]][e][e]
The p. 104 axis, exhaustively: every canonical system with side heights ≤ 3, evolved 500 steps from the book’s initial condition.

The p. 104 figure itself is reproduced too. Its six rules exist only in the page image, so they were transcribed from magnified crops of the 1588-pixel scan and validated by running them: the regenerated panels match the printed morphologies, and the maximum size-differences (48, 25, 8, 1260, 1802, 483) land on the printed plot axes (≈40, 30, 6, 1500, 2000, 400).

The NKS p. 104 figure, regenerated: six systems from one initial condition, 300 steps each; bracket evolution above, successive size differences below. Rules read out of the original scan; trajectories pinned in tests/p104.rs.
The NKS p. 104 figure, regenerated: six systems from one initial condition, 300 steps each; bracket evolution above, successive size differences below. Rules read out of the original scan; trajectories pinned in tests/p104.rs.

4  The combinator corpus, exhaustively

The densest published dataset is the combinator-properties note (p. 1122): a behavioral census of SK expressions by size, under exactly the §3.10 step. Every number reproduces — and the full census sharpens what the book sampled:

sizeexpressionsalready fixedmax stepslargest fixed pointnon-fixing
1–62 … 2,6882, 4, 12, 40, 144, 5441, 1, 2, 3, 4, 71, 2, 3, 4, 6, 10none
716,8962,1281241exactly the 2 named growers
8109,8248,544 exact70: 61 capped · 7 ongoing · 2 period-3

The size-8 sweep takes 0.75 s and turns “it appears that 49 show exponential growth” into a hard census — including a find the note doesn’t mention: its period-3 case has a sibling, s[s][s][s[s]][s][s[k]], also period 3. Trajectory details land exactly: the “7050” is the repeating cycle’s maximum (the transient peaks at 8156); the 1263→17 case fixes at step 97 under the same convention as p. 103; the two size-7 growers hit Depth 14 at steps 26 and 25 and stay.

Symbolic system evolution Each line is one step; boxed regions match the rule, and bands connect each box to the rewritten region on the next line, as in NKS p. 102. With color, each pattern variable's flow is tinted. s[x_][y_][z_] x[z][y[z]] s[s][k][s[s[s]][s]][s] s[s[s[s]][s]][k[s[s[s]][s]]][s] s[s[s]][s][s][k[s[s[s]][s]][s]] s[s][s][s[s]][s[s[s]][s]] s[s[s]][s[s[s]]][s[s[s]][s]] s[s][s[s[s]][s]][s[s[s]][s[s[s]][s]]] s[s[s[s]][s[s[s]][s]]][s[s[s]][s][s[s[s]][s[s[s]][s]]]] s[s[s[s]][s[s[s]][s]]][s[s][s[s[s]][s[s[s]][s]]][s[s[s[s]][s[s[s]][s]]]]] s[s[s[s]][s[s[s]][s]]][s[s[s[s[s]][s[s[s]][s]]]][s[s[s]][s[s[s]][s]][s[s[s[s]][s[s[s]][s]]]]]]
An SK evolution under the same step, variable flows tinted (x blue, y orange, z green). The active redex migrates rightward as a stable prefix accretes.

The single-combinator system of note p. 1123 got the treatment its minimality claim invites: all 1,033,412 single-symbol expressions of sizes 1–14, swept. Sizes ≤13 all fix; at size 14 exactly three grow — the two s→j[j] translations of the SK growers plus the book’s verbatim third. The book asserted; the sweep proves it in five minutes.

5  The universality bridge

The later chapters — nearly missed, recovered by a reader’s instinct that more material existed — carry the book’s universality argument over two constructions. Both run.

Symbolic systems emulate cellular automata (note p. 1113): ten rules — eight transcribing the CA table over {p, q} = {0, 1}, two sweeping the tape — with the exact correspondence CA step t = symbolic step t(t+n+3). States at aligned steps decode literally:

CA step t · symbolic step t(t+4) · state · decoded cells t=0 step 0 r[p][p][q][p][p][r] t=1 step 5 r[p][p][q][p][q][p][p][r] t=2 step 12 r[p][p][q][p][p][p][q][p][p][r] t=3 step 21 r[p][p][q][p][q][p][q][p][q][p][p][r] t=4 step 32 r[p][p][q][p][p][p][p][p][p][p][q][p][p][r]
Rule 90 from a single black cell, run as a symbolic system. At each aligned step t(t+4) the state decodes into the CA row — the Pascal-mod-2 triangle assembling itself inside a rewriting system. Verified for rules 90, 110, 30.

Combinators emulate rule 110 (notes pp. 1121–1122; the p. 713 figure). Each ingredient was rebuilt and verified in sequence — the ToC abstraction algorithm, Church numerals, the generic cell-update combinator (size 61 for rule 90, as printed), the verbatim size-16 rule-90 combinator, pair-encoded cell lists — then w, the one-full-step combinator, transcribed from the note’s deeply nested text: 674 leaves, and repeatedly applying it reproduces rule 110 row by row, at a cost matching the note’s “roughly (100+35n)t + 33t²”:

rule 110: w size 674 leaves; 1155 passes for t=3, n=7   (note's rough formula: 1332)
rule  90: w size 672 leaves; 1155 passes for t=3, n=7   (note's rough formula: 1332)
The padding contract. The first run of w got every cell right except the two fresh edge cells, which came out 0. Mirror-rule diagnostics showed the interior perfectly aligned — a convention, not a bug. w computes the rule over the existing window and pads a zero per side; the note’s cryptic “padding with 0 on either side” means exactly this. Pre-pad the initial condition with t zeros per side and every cell is either computed correctly or lies beyond the light cone, where zero is the truth.

6  The figures themselves

Matching the book’s aesthetics was its own small reverse-engineering job: the original page scans, magnified, dictated italic serif on a character grid, white-filled near-square boxes over opaque outlined gray bands, no step numbers, and a rule icon that is itself a variable-flow diagram. The generator reproduces all of it for any system — then goes one step past the book’s grayscale:

Symbolic system evolution Each line is one step; boxed regions match the rule, and bands connect each box to the rewritten region on the next line, as in NKS p. 102. With color, each pattern variable's flow is tinted. e[x_][y_] x[x[y]] e[e[e][e]][e][e] e[e][e][e[e][e][e]][e] e[e[e]][e[e[e]][e]][e] e[e][e[e][e[e[e]][e]]][e] e[e[e[e][e[e[e]][e]]]][e] e[e[e][e[e[e]][e]]][e[e[e][e[e[e]][e]]][e]] e[e][e[e[e]][e]][e[e][e[e[e]][e]][e[e[e][e[e[e]][e]]][e]]] e[e[e[e[e]][e]]][e[e[e[e[e]][e]]][e[e][e[e[e]][e]][e[e][e[e[e]][e]][e]]]] e[e[e[e]][e]][e[e[e[e]][e]][e[e[e[e[e]][e]]][e[e][e[e[e]][e]][e[e][e[e[e]][e]][e]]]]] e[e[e]][e][e[e[e]][e][e[e[e[e]][e]][e[e[e[e[e]][e]]][e[e][e[e[e]][e]][e[e][e[e[e]][e]][e]]]]]] e[e][e[e][e]][e[e][e[e][e]][e[e[e]][e][e[e[e]][e][e[e[e[e[e]][e]]][e[e][e[e[e]][e]][e[e][e[e[e]][e]][e]]]]]]] e[e[e[e][e]]][e[e[e[e][e]]][e[e][e[e][e]][e[e][e[e][e]][e[e[e[e]][e]][e[e[e[e]][e]][e[e][e[e[e]][e]][e[e][e[e[e]][e]][e]]]]]]]] e[e[e][e]][e[e[e][e]][e[e[e[e][e]]][e[e][e[e][e]][e[e][e[e][e]][e[e[e[e]][e]][e[e[e[e]][e]][e[e][e[e[e]][e]][e[e][e[e[e]][e]][e]]]]]]]]] e[e][e][e[e][e][e[e[e][e]][e[e[e[e][e]]][e[e][e[e][e]][e[e][e[e][e]][e[e[e[e]][e]][e[e[e[e]][e]][e[e][e[e[e]][e]][e[e][e[e[e]][e]][e]]]]]]]]]] e[e[e]][e[e[e]][e[e][e][e[e][e][e[e[e[e][e]]][e[e][e[e][e]][e[e][e[e][e]][e[e[e[e]][e]][e[e[e[e]][e]][e[e][e[e[e]][e]][e[e][e[e[e]][e]][e]]]]]]]]]]] e[e][e[e][e[e[e]][e[e][e][e[e][e][e[e[e[e][e]]][e[e][e[e][e]][e[e][e[e][e]][e[e[e[e]][e]][e[e[e[e]][e]][e[e][e[e[e]][e]][e[e][e[e[e]][e]][e]]]]]]]]]]]] e[e[e[e][e[e[e]][e[e][e][e[e][e][e[e[e[e][e]]][e[e][e[e][e]][e[e][e[e][e]][e[e[e[e]][e]][e[e[e[e]][e]][e[e][e[e[e]][e]][e[e][e[e[e]][e]][e]]]]]]]]]]]]]
Beyond the original: each pattern variable’s transport tinted, so duplication is a visible fork and the y-payload traces as a single thread through the cascade. The gray that remains is exactly what the rule consumes.

7  What remains

The honest remainder, none of it load-bearing: the inner-part depth pattern and steps-to-fix bound of note (e); the tree-form and Polish-notation representations (notes h, c); the h[t] size-formula case at combinator size 8; a growth-rate fitter to reconcile the book’s eyeballed “≈49 exponential” with our hard 70-system census; the operator-algebra translation (p. 1172); the confluent-emulation variant (note 9.11). Each is a bounded afternoon.

Appendix A — the reproduction ledger

claimsourceresulttest
First states and leaf counts of the canonical systemp. 102exactbook::first_states_match_the_kernel
“264 steps” to 256+256 brackets = Nest[e,e,256]p. 103exact (263/264 convention)book::fixed_point_at_263…
“65,555 steps” to 65,536 bracket pairsp. 103exact (65,554)book::second_initial_condition…
Conserved 2x+y invariant; all inits reach Nest[e,e,m]note (e) p. 897exactbook::invariant_is_conserved…
Expression counts Binomial[2n−2,n−1]·kⁿ/nnote (d) p. 896exactenumerate::counts_match_book_formula
No-e left-hand sides give balanced trees; x_→x[x] doublesnote (f) p. 897exactsemantics::rule_applies_at_the_root_atom
e[x_][_]→e[x[e[e][e]][e]] “can be quite complex”note (f) p. 897non-fixing ≥ 2000 stepssurvey_rules::note_f_complex…
The ReplaceAll scan-order/overlap/rescan contractp. 102; note (i)exact + kernel-differentialsemantics::*, differential::*
id = s[k][k]; b = s[k[s]][k] composesnote p. 1121exactsemantics::combinators_from_p1121
SK census sizes 1–6 (counts, fixed-now, max steps, largest fixed)note p. 112224/24 numberssurvey_combinators::sizes_1_to_6…
Size 7: 2 growers of 16,896; ≤12 steps; largest 41; 2,128 fixed-nownote p. 1122exactsurvey_combinators::size_7…
Size 8: 8,544 fixed points among 109,824note p. 1122exact; full census 70 non-fixingsurvey_combinators::size_8_aggregate…
7050-then-period-3; 1263→17 after 98 steps; fixed point of size 80note p. 1122exact (+ transient peak 8156; sibling found)survey_combinators::size_8_named_cases
Size-7 growers: Depth 14 after 26 and 25 steps, then staysnote p. 1122exactsurvey_combinators::…depth_plateau
j-system: smallest growth at size 14; the three identitiesnote p. 1123proven over 1,033,412 initssurvey_combinators::j_system…
Symbolic system emulates any elementary CA; map t(t+n+3)note p. 1113rules 90/110/30emulation::symbolic_system_emulates_*
Cell combinators: generic size 61; verbatim size-16 (rule 90)notes pp. 1121–2exact, all 8 neighborhoodsemulation::generic_cell_combinator…
w emulates rule 110; “roughly (100+35n)t+33t²”p. 713; note p. 1122exact rows; 1155 vs 1332emulation::w_combinator…
p. 104: the six depicted systems and their size-difference plotsp. 104rules transcribed from the scan; ranges match axesp104::p104_panels…
Szudzik fixtures: 741, shell grid, depth shells, orderingNKS 2006 paperexactnumbering::*, pairing::*
“≈49 exponential” at size 8 (rate bucketing)note p. 1122census 70 non-fixing; rates unfitted
Operator-algebra translation; confluence variant; h[t]; notes (c, h)pp. 1172, 1036, 1122open

Appendix B — the crate

moduleprovides
exprImmutable Rc-shared application trees; cached hash, LeafCount, Depth, height; iterative Eq/Drop.
pattern, matchingPatterns (atom/blank/app), templates with constant folding, ordered rule sets; SameQ repeats.
rewritestep = exact ReplaceAll; first-match mode; replace_repeated; tracing: match positions, source→target pairs, per-variable flows.
evolveevolve (NestList) and evolve_stream (O(1) retention); fixed-point detection, growth caps.
classify, surveyFixed / Periodic / Capped / Ongoing with cycle detection; rule-axis and init-axis sweep drivers.
pairing, godelElegant and Cantor pairing, exact isqrt; expression and system codecs with canonicality and depth shells.
parse, printMathematica-notation subset in; InputForm-identical out; bracket rows; marked/spanned printing for figures.
enumerate, invariantNote (d)’s expression generator; the 2x+y conserved quantity.

CLI: run (summary | exprs | sizes | brackets | matches), reduce, id encode/decode, enumerate, survey rules|inits. examples/p102.rs replays the book checks; examples/trace_svg.rs draws every trace figure here; docs/fig_*.py regenerate the rest.

Appendix C — implementation notes

The nks-symbolic repository · sources: wolframscience.com/nks (§3.10 pp. 102–104 and notes; notes pp. 1113, 1121–1123, 1145, 1172; main text pp. 711–714) and szudzik.com/ElegantPairing.pdf.