THE FOLD / GLITCH / STACK OVERFLOW / THE SPACE FILLING
THE SPACE FILLING
a line that becomes a plane
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
A curve is one-dimensional and a square is two-dimensional, and in 1890 Peano produced a continuous curve that passes through every point of the square. Hilbert’s version a year later is the one people draw: recursively subdivide, order the quadrants so each connects to the next, and repeat. At every finite order it is a walk that visits each cell exactly once; in the limit it is continuous and onto. What it buys, and the reason it is used for image storage and database indexing, is that positions close along the curve stay close in the plane — within a constant times the square root of the gap.
LIT verified live at order 6: all 4096 cells visited exactly once, with 0 consecutive pairs more than one cell apart; the maximum spatial distance between any two indices at most k apart divided by √k stays bounded at 1.000, 1.581, 1.904, 2.069, 2.152, 2.194 for k = 1 to 1024; row-major indexing has no such bound, putting cells 63 apart at a single index step; and Hilbert beats row-major at every window size up to 256.
LIT verified live at order 6: all 4096 cells visited exactly once, with 0 consecutive pairs more than one cell apart; the maximum spatial distance between any two indices at most k apart divided by √k stays bounded at 1.000, 1.581, 1.904, 2.069, 2.152, 2.194 for k = 1 to 1024; row-major indexing has no such bound, putting cells 63 apart at a single index step; and Hilbert beats row-major at every window size up to 256.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at STACK OVERFLOW: a recursion that keeps going until a line has overflowed into a plane.
AVAN (AI) got the locality claim backwards and the measurement said so. The first version asserted that Hilbert preserves locality better than row-major and measured it the obvious way — for spatially adjacent cells, how far apart are their positions along the curve. Hilbert scored 39.05 against row-major’s 32.50 and lost. The claim was not badly measured; it was pointed the wrong way. Hilbert’s guarantee runs index → space, not space → index: near in the ordering implies near in the plane, with a √k law. There is no matching promise in the other direction, and two cells that touch can sit half the curve apart. The published claim is now the one that holds, and the disproved one is kept because a locality guarantee with an unstated direction is the kind of thing that gets designed into a database.
AVAN (AI) got the locality claim backwards and the measurement said so. The first version asserted that Hilbert preserves locality better than row-major and measured it the obvious way — for spatially adjacent cells, how far apart are their positions along the curve. Hilbert scored 39.05 against row-major’s 32.50 and lost. The claim was not badly measured; it was pointed the wrong way. Hilbert’s guarantee runs index → space, not space → index: near in the ordering implies near in the plane, with a √k law. There is no matching promise in the other direction, and two cells that touch can sit half the curve apart. The published claim is now the one that holds, and the disproved one is kept because a locality guarantee with an unstated direction is the kind of thing that gets designed into a database.
3 ONE DIMENSION
The √k law, and the direction where it does not hold.
4 TWO DIMENSIONS · INTERACTIVE
Deepen the recursion and watch a line fill a square.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: the curve lifted, its index becoming height.
AVAN’s addition (the inverse-companion): the forward reading is “a line can fill a square.” The inverse is that the curve does not raise the line’s dimension, it destroys the square’s. Continuity survives the limit and injectivity does not — some points of the square are hit more than once — and that is exactly the concession that makes the impossible thing possible. Dimension is preserved by homeomorphisms, and this map is not one. Read backwards, Peano’s curve is not a paradox about dimension but a demonstration of which property was carrying the concept: give up one-to-one and dimension stops being a barrier at all.
LIT at order 6, all 4096 cells visited exactly once with 0 consecutive pairs more than one cell apart; the maximum spatial distance between indices at most k apart, divided by sqrt(k), stays bounded at 1.000, 1.581, 1.904, 2.069, 2.152, 2.194 for k = 1 to 1024; row-major indexing has no such bound, putting cells 63 apart at a single index step; and Hilbert beats row-major at every window size up to 256
FIG The locality claim was written BACKWARDS and the measurement said so. The first version asserted Hilbert preserves locality better than row-major and measured the obvious way - for spatially adjacent cells, how far apart along the curve. Hilbert scored 39.05 against row-major's 32.50 and LOST. The claim was not badly measured, it was pointed the wrong way: Hilbert's guarantee runs index -> space, not space -> index. There is no matching promise in the other direction, and two cells that touch can sit half the curve apart. The disproved claim is kept because a locality guarantee with an unstated direction is the kind of thing that gets designed into a database.
FIG The locality claim was written BACKWARDS and the measurement said so. The first version asserted Hilbert preserves locality better than row-major and measured the obvious way - for spatially adjacent cells, how far apart along the curve. Hilbert scored 39.05 against row-major's 32.50 and LOST. The claim was not badly measured, it was pointed the wrong way: Hilbert's guarantee runs index -> space, not space -> index. There is no matching promise in the other direction, and two cells that touch can sit half the curve apart. The disproved claim is kept because a locality guarantee with an unstated direction is the kind of thing that gets designed into a database.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of STACK OVERFLOW · David Lee Wise (ROOT0), with AVAN