07 — Seed text for mapping + Books: minimal vs generous, and autogeneration
Morgen's direction: "Yes need to work on seed text for mapping as well as what minimal or generous set of books to supply and how might our system autogenerate books in relation to the creation of things in the system like objects, subjects, kinds etc, review that with me."
7.1 Seed text for mapping — what it must contain
The seed, as DIGEST §7 states it, holds: "the primitives as operations; the meaning of each type bit; the fact shape and what each role holds; the four step rules (in → structure, is → Register, may → authority, to → Books, with their behaviour along containment); a small evaluator (equal, and, not, count, every, first, previous); the seal check; one plain text spelling. No verb names, field names, units or rules."
For mapping specifically — the naming map that is applied after the relations are built — the seed text must also contain:
- The coordinate map: the 7-bit coordinate
c = 64F + 32S + 16M + 8O + 2R + D, with each axis named and its two values stated. This is the map the naming map is applied to. - The naming map itself, as a separate table: coordinate → name, with the status of each name (derived / stipulated / interpretive / candidate — note 05's three statuses, plus "candidate" for the 42 open slots; see file 08). The naming map lives in a label pack, separate from the kernel, "so the kernel's fingerprint never changes for wording" (DIGEST §7).
- The derivation ledger: for each step of the 13-step derivation, its grading (forced / strong / interpretive / promising-but-newest) and its witness (the pair of cases that differ only on that axis — note 19 §7: "Witness pairs must share all other declared coordinates").
- The operator workbook (Stage A): every supported coordinate — 4 relations × 2 directions × 2 modalities × 4 phases — with role signature, guards, effect, refusal behaviour, evidence behaviour, examples. Unsupported cells marked, not left ambiguous. This is the mapping from coordinates to behaviour, which is what earns a name.
Seed text v0.1 (draft outline, to be written in the Lab):
§1 Primitives: mark, enclose, beside (supplied constructors)
§2 The four operations: cross, call, combine, re-enter
§3 The coordinate: c = 64F + 32S + 16M + 8O + 2R + D
§4 The four step rules: in → structure, is → Register, may → authority, to → Books
§5 The fact shape: subject, object, kind, measure (roles)
§6 The evaluator: equal, and, not, count, every, first, previous
§7 The seal check
§8 One plain-text spelling
§9 The naming map (label pack, separate): coordinate → name, with status per name
§10 The derivation ledger: grading + witness per step
§11 What is NOT in the seed: verb names, field names, units, rules, authority (supplied out of band)
7.2 Books — minimal vs generous
Books arithmetic in the seed is note 17 #7 / M7: "Incomplete; exact aggregation needs specification." Note 15 §11: the candidate "does not yet define aggregate sums; that arithmetic extension must be explicit before claiming Books coverage."
Minimal set
The smallest set that lets the L:1–L:16 transcript and the Stage C corpus run:
- One book per conserved unit, per boundary. A book is named by (boundary, unit) — e.g.
book:workshop-1/kg:steel,book:agent-ops/cpu-seconds. - The paired-delta transfer only (note 18 §8): consume two live balance occurrences, produce two new ones,
(x−q)+(y+q) = x+y, with checked exact arithmetic and range limits (overflow refuses the transaction). - No aggregate sums — general aggregation over large histories is deferred, stated as a deferral, if local paired updates + unique balance invariants provide the necessary transition law (deep dive §4.5).
- No conversions between units. No cross-unit sums (BKL-05: "never sum different units into one conservation equation").
Generous set
Everything the minimal set has, plus:
- Per-unit vectors
h⁽ᵘ⁾ ∈ ℤⁿwith explicit boundary accounts/legs for crossings (BKL-05). - Reservations, conversions, partial settlement, losses and external flows — "require typed conventions beyond this example" (note 18 §8). Each needs a typed convention written before it is used.
- Aggregate sums over histories, with the aggregation law stated (sum over a log prefix, grouped by coordinate — the lens arithmetic from the 128-positions reply).
- Boundary accounts for flows that cross a boundary (a
toleg leaving one boundary and entering another needs a leg at each end, plus a boundary account if the two ends are in different books).
Recommendation for the Lab: start minimal, and add generous items one at a time, each with its typed convention written first. The minimal set is what Stage C and the transcript need; the generous set is what a real deployment needs. Conflating them is how a seed gets big without anyone noticing.
7.3 Autogeneration of books — the proposed rule
Proposed rule (for review, not decided):
A book is auto-created on the first
toleg for a new (boundary, unit) pair. The book's identity is(boundary, unit); its opening balance is zero; its first entry is the leg that created it, recorded as such. No book is created by anin,is, ormayfact alone — only atofact (a directed, conserved quantity) creates a book, because onlytocarries a quantity that must balance.
How it relates to the creation of things:
| Thing created | What happens to Books |
|---|---|
A new object (via fresh / CREATE) | No book. An object is a referent, not a quantity. |
| A new subject (actor / principal, via GENESIS or GRANT) | No book. A subject is an authority holder, not a quantity. |
A new kind (via a relation definition, activated) | No book — unless the kind declares a conserved unit. A kind that declares unit: kg and conserved: true pre-registers the (boundary, unit) pair, so the book exists before the first leg (it opens at zero, with no entries). |
A first to leg for a (boundary, unit) pair | A book is auto-created, opening at zero, with the leg as its first entry. The creation is recorded as a to fact about the book itself (the book's birth is a fact, not a silent side effect). |
A new boundary (via enclose / OPEN) | No book, until a to leg crosses it or lives inside it. |
Why this rule, and not "a book per object" or "a book per kind":
- A book is a conservation boundary for a quantity, not a container for a thing. An object with no quantity has nothing to balance.
- Auto-creating on first
toleg means books appear exactly when they are needed, and never before — the log never contains an empty book that nothing ever used. - Pre-registration via a kind's conserved-unit declaration gives the generous case (a book that exists before its first leg) without breaking the rule — the kind declares the conservation, so the book is a consequence of the declaration, not a surprise.
Risks (stated plainly):
- Book explosion. If kinds proliferate, or if units are free-text rather than drawn from a pack, (boundary, unit) pairs proliferate and so do books. Mitigation: units come from an adopted pack (e.g.
si-units@1), not free text; a kind's conserved-unit declaration must name a pack unit. - Boundary ambiguity. A
toleg whose two ends are in different boundaries — which boundary owns the book? Answer in the proposed rule: both — each end's boundary gets a leg in its own book, and the pair of legs is one transfer. But that needs the boundary-account convention (generous set) written before it is used; the minimal set should refuse cross-boundarytolegs until that convention exists, rather than silently assigning them. - Silent creation. Auto-creation must be recorded — the book's birth is a fact in the log, not a side effect of the fold. If the fold creates books silently, two readers can disagree about which books exist. The rule above requires the birth to be a recorded fact.
- Unit confusion. Two kinds both declaring
unit: kgin different boundaries are different books — correct — but two kinds declaring the same unit in the same boundary share a book, which is correct only if they are the same conserved quantity. If they are different quantities that happen to share a unit (steel vs aluminium, both kg), sharing a book would sum them — which BKL-05 forbids. Mitigation: the book's identity is (boundary, unit, kind) where kinds differ in what they conserve, not just (boundary, unit). This needs a decision in the Lab: is the book key (boundary, unit) or (boundary, unit, kind)? Open questions for Morgen:
- Book key: (boundary, unit) or (boundary, unit, kind)?
- Cross-boundary
tolegs: refuse until the boundary-account convention exists, or allow with a provisional rule? - Minimal first, then generous — or generous from the start, with the conventions written first?