Finite Carry-slot Sampling
Abstract
A stationary carry table needs only a bounded slot control to preserve every fair-tape output and charge.
Definition 1.1 (Stationary state and action orbit).
Formalization. D5/S3/Arith/FibonacciAtomic/CarryGraphFiniteSampler.policyPath (✓ std3).
Source. Repository-derived.
Commentary.
A legal stationary table determines the successive carry states and actions. The path may begin at any legal state; the sampler uses the root.
Definition 1.2 (Bounded active controls).
Formalization. D5/S3/Arith/FibonacciAtomic/CarryGraphFiniteSampler.Active (✓ std3).
Source. Repository-derived.
Commentary.
S(m) contains exactly the legal integer carry states. The slot j is a natural number below r, so an active control has positive width. The stored fields are r, e and j; no depth or history word is stored.
Definition 1.3 (Root control).
Formalization. D5/S3/Arith/FibonacciAtomic/CarryGraphFiniteSampler.initial (✓ std3).
Source. Repository-derived.
Commentary.
The root has r=1 and e=m, with its unique slot numbered zero.
Definition 1.4 (One-bit control transition).
Formalization. D5/S3/Arith/FibonacciAtomic/CarryGraphFiniteSampler.step (✓ std3).
Source. Repository-derived.
Commentary.
An output control is absorbing. At an active control (s,j), apply the legal action f(s), form the increasing list L of its fixed labels, and set z=2j+toNat(u). If z is below the length of L, output L[z]. Otherwise move to the carry successor and slot z-length(L). A slot guard totalizes the definition by retaining the old active control when the guard fails; the correspondence proves this case is never taken from the root.
Definition 1.5 (Control and separate invoice).
Formalization. D5/S3/Arith/FibonacciAtomic/CarryGraphFiniteSampler.execute (✓ std3).
Source. Repository-derived.
Commentary.
At an output control, execution returns the previous control and invoice directly. Only the active branch takes the next tape bit and increments the invoice. Only the control and that bit enter step; the invoice is an external execution observation.
Definition 1.6 (First output with its invoice).
Formalization. D5/S3/Arith/FibonacciAtomic/CarryGraphFiniteSampler.sample (✓ std3).
Source. Repository-derived.
Commentary.
Take the first execution index whose control is an output, and return its label and invoice. The sample is absent if no finite output occurs.
Definition 1.7 (Every active step is charged).
Formalization. D5/S3/Arith/FibonacciAtomic/CarryGraphFiniteSampler.bill (✓ std3).
Source. Repository-derived.
Commentary.
The sum is nonnegative extended-real. A divergent execution has infinitely many active steps and therefore an infinite bill.
Theorem 1.8 (Every tape preserves the carry slot and invoice).
Proof. Machine-checked in Lean as D5/S3/Arith/FibonacciAtomic/CarryGraphFiniteSampler.coupling (✓ std3). ∎
Source. Repository-derived.
Commentary.
For any legal stationary table and any tape, a returned scan label and charge equal the controller output and invoice. A continuing scan slot lifts to an active control with the current orbit state and the same slot, while its invoice equals the number of bits read. The relation holds without a positive-anchor or optimality assumption.
Theorem 1.9 (Finite control attains the critical bit bill).
Proof. Machine-checked in Lean as D5/S3/Arith/FibonacciAtomic/CarryGraphFiniteSampler.result (✓ std3). ∎
Source. Repository-derived.
Commentary.
For every m at least two, every legal stationary table whose positive anchor and path cost satisfy C=alpha(m) times the anchor has a finite slot machine. Its policy path gamma starts at the root, and p is the law obtained from that path’s fixed label digits. At every index on every tape, a returned scan label and charge agree with the machine control and invoice; a continuing scan slot agrees with the machine’s carry state and slot. Thus their first-return samples and total bills coincide even on exceptional divergent tapes. In the display, core(x) is the stored carry state and slot(x) is its natural slot; treeSample and treeBill denote the existing fixed-label tree sample and bill.
The active-control bound is m squared times (m-1) divided by two, with m additional absorbing output labels. The output law is rational, strictly positive and normalized, its minimum is the positive anchor, its label probabilities are the digit sums, and its stopping tail is r(d)/2 raised to d. It returns almost surely and every returned invoice equals the total bill. The expected bill equals the policy-path cost, the dyadic cost of p and alpha(m) times the anchor.
The finite stationary root orbit repeats a state. Equal tail digit streams at two distinct indices, together with the finite-prefix identity for ofDigits, give a rational expression for each probability. The statement gives no minimum-state claim or uniform bound on the number of bits read.
References
- Truth anchor:
D5/S3/Arith/FibonacciAtomic/CarryGraphFiniteSampler.Active - Truth anchor:
D5/S3/Arith/FibonacciAtomic/CarryGraphFiniteSampler.bill - Truth anchor:
D5/S3/Arith/FibonacciAtomic/CarryGraphFiniteSampler.coupling - Truth anchor:
D5/S3/Arith/FibonacciAtomic/CarryGraphFiniteSampler.execute - Truth anchor:
D5/S3/Arith/FibonacciAtomic/CarryGraphFiniteSampler.initial - Truth anchor:
D5/S3/Arith/FibonacciAtomic/CarryGraphFiniteSampler.policyPath - Truth anchor:
D5/S3/Arith/FibonacciAtomic/CarryGraphFiniteSampler.result - Truth anchor:
D5/S3/Arith/FibonacciAtomic/CarryGraphFiniteSampler.sample - Truth anchor:
D5/S3/Arith/FibonacciAtomic/CarryGraphFiniteSampler.step - Dependency: D5/S3/Arith/FibonacciAtomic/CarryGraphRealization
- Dependency: D5/S3/Arith/FibonacciAtomic/OptimalLawStrictSlope