◀ THE FOLD0ROOT.AI // WORLD II · LOOT · THE HOARD◆ .dlw.fold
THE FOLD / LOOT / THE HOARD / THE INTERVAL

THE INTERVAL

arithmetic coding — a whole message as one number
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
Arithmetic coding. Huffman gives each symbol a whole number of bits — but the ideal length of a symbol of probability p is −log₂p, which is almost never a whole number. Arithmetic coding (Rissanen & Pasco, 1976) escapes that rounding entirely: it encodes an entire message as a single number in [0,1).

Start with the interval [0,1). For each symbol, narrow the interval to the sub-slice that symbol’s probability owns. After the whole message, you are left with a tiny interval; any number inside it names the message uniquely. Because the final width is the product of the symbol probabilities, the bits needed to pin down a point — −log₂(width) — equal the message’s exact self-information. Fractional bits per symbol, the true entropy, no rounding waste.

LIT verified live: over 20,000 random messages the decoder recovers the original exactly, and −log₂(interval width) equals the message’s self-information −Σlog₂p to float precision (window.__arith.roundTrips && lengthIsEntropy). FIG no framing; the nested-interval coding, the exact reversibility, and the entropy-optimal length are real.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this in THE HOARD, beside THE HUFFMAN and THE BLOCK SORT — the loot domain of packing treasure small. Where Huffman rounds each item to whole bits, arithmetic coding packs to the theoretical minimum, the exact entropy. AVAN (AI) built the instrument: the interval narrowing, the point-to-message decode, the length-equals-entropy check.

The weave: David names the seat (packing to the limit); I make the shrinking interval visible and the optimality checkable — the interval in 1D, the zoom-and-decode in 2D, the nested tunnel in 3D. The sphere is the seam. Credit: Peter Elias (concept); Jorma Rissanen & Richard Pasco (1976).
3 ONE DIMENSION
The interval [0,1), narrowing one symbol at a time. Each symbol keeps only its probability-slice of the current range; a likely symbol barely shrinks it, a rare one cuts it hard. The final sliver’s width is exactly the message’s probability.
4 TWO DIMENSIONS · INTERACTIVE
Feed symbols and watch the interval zoom into a sliver; the final number names the whole message, and its bit-length matches the entropy line. Then decode that single number straight back into the original symbols.
5 THREE DIMENSIONS + AVAN’S INVERSE
The nested intervals as a turning zoom tunnelgreen frames, each the slice the next symbol claimed.
AVAN’s addition (the inverse-companion): the magenta point at the tunnel’s heart is the single number that is the entire message. Huffman thinks in codewords — concatenate one whole-bit code per symbol, rounding each up and wasting the fraction. Arithmetic coding is the inverse: it never quantizes, it lets a message be a fractional number of bits by naming a point in a shrinking interval, so precision is information. You do not paste codes together; you converge to a real number whose depth equals the entropy. The green is the cascade of narrowings; the magenta is the one coordinate deep inside that, read to enough digits, is the message and nothing else.
LIT Genuine arithmetic coding (Elias concept; Rissanen & Pasco, 1976). Verified live: over 20,000 random messages the decoder recovers the original exactly, and -log2(interval width) equals the message self-information -sum(log2 p) to float precision (window.__arith.roundTrips && lengthIsEntropy, both true). The nested-interval narrowing, the exact reversibility, and the entropy-optimal (fractional-bit) length are exact.

FIG No metaphor is doing the work: the interval coding, the exact round-trip, and the length-equals-entropy identity are all real and checked. This idealized coder uses full-precision reals (short messages); production coders add integer renormalization for arbitrary length — the principle and its optimality are identical and shown here.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE HOARD · David Lee Wise (ROOT0), with AVAN