Learned contexts and current residual answers

12 October 2026. Written native construction 68. This extends the existing pending-word construction by learning a fixed number of shared prefixes from ordinary input. It is a checked serial-reuse subclass, not an independent-store join or a native SAT lower bound.

Contents

1. What sharing buys

Consider arbitrarily many rows whose two targets are Pz0 and Pz1. The shared word P may be much longer than every intermediate name. The suffixes z may be unrelated to those names: an arbitrary permutation is allowed. Copying or descending P again for each selection would repeat expensive work. Instead, retain P once, maintain the selected residual words z0,z1 in current source versions, and check P while the query itself arrives.

The important requirement is that the residual words have lengths comparable to their intermediate names. That is precisely the range in which the existing pending-word theorem maintains exact committed-plus-pending answers. This note supplies an ordinary-input producer for the missing shared context and carries the construction through a fixed number of learned contexts.

For the long-stem family in assessment 206, take aliases of length d, any permutation of the d-bit suffixes, and |P|=2^d. The new construction handles those unchanged literal sibling-pair records with one context and span one. The failed dispatcher owed a fresh traversal of P for every selection. Here selections perform no such traversal. The right input still contains, and pays for, every literal occurrence of P.

2. Exact checked language

Fix integers K,d,sK,d,s with K,d≥1K,d \ge 1 and s≥1s \ge 1. These are machine constants. Use the maintained right-first ordinary Horn syntax: right records (-01v,+1w);, left records (-00u,+01v);, then pins (+00a);(-1b);. All names are nonempty binary words; leading zeros count. Duplicate records and arbitrary interleaving of right rows are permitted. Empty right and left blocks retain their usual meanings.

During the right block, form an initially empty ordered list of immutable binary words P1,…,PkP_1,\ldots,P_k, with k≤Kk \le K. Process each actual record (v,w) as follows.

  1. If an existing PjP_j is a prefix of ww, choose the least such index. Write w=Pjyw=P_j y. Require yy to be nonempty.
  2. If no existing context is a prefix, require ∣w∣≥∣v∣+1|w| \ge |v|+1 and an unused slot. Create the next context by removing the final ∣v∣+1|v|+1 bits of ww. Its removed suffix is yy.
  3. Require ∣λ(v)−λ(y)∣≤s|\lambda(v)-\lambda(y)| \le s, where λ(x)=⌊log⁡2∣x∣⌋\lambda(x)=\lfloor\log_2 |x|\rfloor. Require at most dd distinct original targets in each right row.

Reject when any requirement fails. This deterministic rule defines the checked class. It does not ask whether some better context decomposition exists. Reordering the same right relation can change its admission. Contexts need not be prefix-free, nonempty or incomparable. A target equal to its least matching context fails the nonempty-residual gate; a later matching context cannot rescue it.

Theorem 68. For every fixed K,d,sK,d,s above, one deterministic native scaffolding machine recognizes exactly the well-formed formulas that pass these checks and are satisfiable. Its degree, observation radius, labels, control and initialization are fixed independently of all names and relation sizes. It uses bounded local work per actual symbol and answers by the final symbol, without preprocessing, padding, a supplied decomposition or EOF work.

The encoded length is the maintained ordinary length

N=∑right occurrences(9+∣v∣+∣w∣)+∑left occurrences(10+∣u∣+∣v∣)+11+∣a∣+∣b∣.N=\sum_{\text{right occurrences}}(9+|v|+|w|) +\sum_{\text{left occurrences}}(10+|u|+|v|)+11+|a|+|b|.

Any explicit phase delimiters contribute their actual fixed number as well. No normalized string is substituted into this formula for N. The native-to-PEG consequence is a PEG for the reversal of this complete checked language.

3. Learn a context without replay at its delimiter

At the beginning of a right record, traverse and suspend the ordinary dictionary path for v. At most d previously captured target receipts are now available. The actual v bits also construct a unary counter with one cell per bit and the existing unary doubling class clock. Add one counter cell in the fixed syntax transition before w starts.

Prospectively run this routine during every w, even if an old context will ultimately match. Let m=|v|. Initially a strict FIFO Q and a context FIFO F are empty. While the counter is nonempty, dequeue one counter cell and enqueue the arriving target bit into Q. A class clock counts these initial enqueues. Once the counter is empty, each further target bit removes the oldest bit of Q, appends that bit to F, and appends the arriving bit to Q.

After t target bits, the invariant is:

  • for t <= m+1, Q is the observed target prefix and F is empty;
  • for t >= m+1, F is the first t-m-1 target bits and Q is its last m+1 bits.

The induction is one FIFO removal and two appends. If a new context is needed at the delimiter, reject when the counter is nonempty. Otherwise F is its ready context receipt and Q its ready residual receipt. Nothing is cut, reversed, inserted or traversed at that delimiter. The frozen initial-fill clock gives lambda(y); it is either lambda(v) or lambda(v)+1, so the first span passes for s>=1.

The FIFO operations are the same strict persistent operations used by the previous native constructions, including their scheduling state. A copied root is a snapshot, not an uncharged copied word. Every prospective allocation and discarded FIFO is charged to the actual symbols that created it.

4. Check old contexts and bounded rows as input arrives

In parallel, start one comparator from each existing context FIFO. Each target bit consumes and compares a remaining context bit. A mismatch permanently disables that comparator for this record. After exact context exhaustion, subsequent bits are its candidate residual stream. An empty context enters residual mode immediately. A context ending at the last target bit is a prefix match with an empty residual, which the gate rejects if that context is chosen.

For every live residual stream, maintain a fresh FIFO and a reset unary class clock. Also compare it with each old row receipt carrying that context’s tag, using separate FIFO cursors, finite mismatch flags and exact exhaustion. There are at most K candidate streams and d old receipts, hence a fixed amount of parallel work. Excess residual bits after a comparison FIFO is empty set mismatch; leftover comparison bits at the delimiter also prevent equality. No word or pointer identity test is used.

At the delimiter, the finite matching mask selects the least matching context, or the ready prospective new context. Only that candidate’s validation gates apply; discard all flags and captured streams of unchosen candidates. In the existing-context case, its streamed equality tests determine whether the record is a duplicate; retain a new residual receipt only when it is distinct and the fixed row bound allows it. In the new-context case, the original target is necessarily new: a previous occurrence would already have a context prefix. Appending it needs only a bounded tuple update. Store the context tag, residual FIFO and exact class offset with each receipt. Close the suspended ordinary row path by the established capsule operation.

The class comparison is the section 15.2 unary-clock procedure: saved v class counter, one pop per residual class boundary, and a finite saturated excess. Test at most s+1 remaining cells at the delimiter. No native logarithm or unbounded integer comparison is introduced.

Stable assignment despite overlapping contexts

When a target first receives tag j, every earlier context fails to prefix it, while P_j does prefix it. Contexts never change, and later contexts have larger indices. Every repeated occurrence therefore chooses the same tag. Within one tag, deleting a fixed prefix is injective. Thus equality of tagged residuals is exactly equality of original targets among receipts actually assigned by the producer, and the tuple enforces the original row bound.

An arbitrary pair of tagged words need not enjoy this injectivity: overlapping contexts can decode different tagged residuals to one full word. That does not harm the query union, and is not used to compare producer receipts. This distinction prevents an unjustified global-code claim.

If no right record occurs, no context or target receipt is created. The frozen right dictionary denotes the empty relation. Malformed or incomplete records reject through the finite syntax controller.

5. Current selected versions use residual-scale service

For each source u, retain K instances of section 15’s length-bucket index. Bucket h in context j has a committed capsule trie T_{u,j,h} and a pending tuple B_{u,j,h} of at most d residual words. The logical predicate is their union, including while installation jobs remain unfinished.

The actual u bits open and suspend the current source capsule. During v, look up the frozen row dictionary and run the old installer window independently in all K context lanes. At name class ell, buckets from max(0,ell-s) through ell+s have their previous pending batches fully installed. The next rightmost bucket is prepared during the next doubling interval. Section 15’s bound for a batch, a d (2^(ell+s+2)+1), gives a fixed service rate per v bit. Multiplying by fixed K is still fixed local work. Partial speculative jobs are discarded with their work charged, as in that proof.

At the v delimiter, each newly revealed receipt has a tag in the fixed context tuple and an offset in [-s,s]. Its destination bucket is in the serviced window. Distribute the at-most-d receipts into the corresponding now-empty pending slots. Missing rows add nothing. Close the fixed lane tuple and outer capsule. In particular, no selection walks any P_j, and no stale right-side alias is treated as a mutable current source mark.

The inherited service invariant includes unfinished old-work disturbance: each serviced batch installs into the current lane’s committed root, never into a historical root; a partial speculative root is not published. Separate lanes share immutable word receipts but not a mutable installation workspace.

6. Query while checking the actual context

The positive pin a selects the completed current source descriptor. On each target bit of b, each of the at-most-K query lanes compares its own P_j. A mismatch makes that lane permanently false. If b ends before context exhaustion, the lane is false. If the context exhausts, the next target bit is the first residual bit and starts the inherited current/ahead residual-class readers. For an empty context the first actual bit already does so.

The first residual bit pays the fixed class-zero initialization. Thereafter the actual residual bits, counted from that point, pay exactly section 15.5’s two-step catch-up and bounded pending comparisons. No reader has to replay the long context. If no residual bit arrives, membership in that lane is false. At the final delimiter, OR the ready lane answers, then complement for satisfiability.

Different contexts can exhaust at different input positions. There are only K of them, each with its own reset clock and at most two live class readers, so the combined rate and root tuple remain fixed. Each context comparison, each old-storage observation and each speculative residual-reader step is paid. There is no loop over selected rows, an unbounded release batch, or a leaf-time inverse-name lookup.

After every completed left record the exact invariant is

⋃j,hPj(Tu,j,h∪Bu,j,h)={w:∃v (R(u,v)∧S(v,w))}.\bigcup_{j,h}P_j\bigl(T_{u,j,h}\cup B_{u,j,h}\bigr) =\{w:\exists v\ (R(u,v)\land S(v,w))\}.

Here P_j X means ordinary concatenation with every word of X. Window service preserves this union; a new row receipt adds exactly its original targets. Querying all lanes therefore tests exactly the right side, whether contexts overlap or not. The Horn bridge gives the final SAT answer. Frozen source versions remain valid snapshots; this is charged serial reuse, not unrestricted selection among inaccessible historical roots.

7. Native resource and interface boundary

All contexts, candidate words, builders, queues and directory frames are bounded-degree immutable records. Tags, masks, tuple arities and simultaneous workers depend only on K,d,s. Each symbol executes a fixed number of old-top local operations, with fixed initialization and finite control. The established simultaneous-record compiler packs these batches into fixed degree/radius with N+1 physical nodes. Total logical allocation, including discarded work and all retained history, is O_{K,d,s}(N); binary pointer serialization is O_{K,d,s}(N log(N+2)) bits. No identity, address, timing, metadata or control-flow channel supplies answers.

The mechanism is stronger than a matching-only summary contract: it uses input-built shared strings, current versions of persistent source predicates, and exact committed-plus-pending negative readout. It supplies no homomorphic matching-diagram summary for every relation. Entry 129’s imported port/state bounds retain their hypotheses and do not become a lower bound against this machine. Nor is polynomial storage alone the proof: the producer and the residual-symbol schedules above provide the access deadlines.

This is a written extension of the lab’s existing native dictionaries, queues and pending-window proof, with high confidence in that dependency classification. The additional argument is ordinary-input discovery of stable contexts and the asynchronous start of their residual readers. No external priority claim or root CLAIMS.yaml admission follows. The fixed-normalizer theorem in reader section 18 does not by itself cover a normalizer learned from the input.

8. Diagnostic payoff and the next limit

Set K=1,d=2,s=1. For arbitrary L and h=2^r, let every alias have length r>=1 and let each row have targets P c_i 0,P c_i 1, where |P|=L and the c_i are any permutation of the r-bit words. The first actual record leaves exactly r+1 bits in its rolling window and learns the actual P. Every residual has length r+1, so all rows pass. No anchor row, separator symbol, dummy target, imposed ordering or extra padding is added. Every selection subset, including repeated records and a late negative pin, is covered.

These inputs have arbitrarily many distinct parents and arbitrary aliases. The previous synchronous-map control was insufficient for arbitrary data-defined permutations, and the full-name length-span theorem is insufficient when L/r grows. The new context contraction handles both together. A literal-insertion scheduler may still incur the old lower bound; this representation avoids its per-selection stem jobs.

The general one-row-per-prefix diagnostic remains open. A fixed number of learned contexts and a checked residual-length span are substantive restrictions. The next decisive test is a hierarchy of input-learned contexts with unbounded leaves: can ordinary names pay current-version access after repeated contractions while a query starts each needed residual reader on time? Test late short-prefix contexts and long chains of nested contexts; charge all prior pending-work disturbance. Only after that access mechanism is supplied should the full clipped-cone interval profiles, their ordinary-input completeness producer and their future activation be restored. Unrestricted radial profiles and independent-store joins remain separate frontiers.

Later work: early unique routing permits unboundedly many separated groups, each with this fixed-size local kernel. It does not resolve overlapping or late shorter contexts.

Evidence

The primary finite model, independent audit, and assessment 207 review distinguish finite semantics from the written native timing proof. The model’s host-language maps and integer clocks are not native instructions.