scroll # The GEMS Formula — Glob-Euler Mapping ofSubu *A scroll on how a count becomes a die.*## The question Every collection wants ashape. A deck of fifty-two cards, ten globsriding the SubuGlass tanks, the nine optionsof a HexCube cell — each is just a **countof things** waiting to be held. The questionthe GEMS Formula answers is the oldest one inthe substrate: *given N things to show, whichdice do I need, and how many?* **GEMS** readsas **G**lob-**E**uler **M**apping of **S**ubu— the marriage of two maths that werealready living on the runeboard withoutknowing each other's names. ## The gate —Euler Leonhard Euler (Swiss, not French —the French claim on dice is Pascal and Fermat,who founded probability on a gambler'squestions; a different theorem for a differentday) gave us the law that governs every closedpolyhedron: > **V − E + F = 2** Verticesminus edges plus faces, always two, for anysolid without a hole. It is a brutal filter.Demand that a die be *fair* — every faceidentical, every vertex identical — andEuler permits exactly five answers. ThePlatonic solids. The whole legal alphabet ofdice: | die | solid | V | E | F ||-----|-------|---|---|---| | d4 | tetrahedron| 4 | 6 | 4 | | d6 | cube | 8 | 12 | 6 | | d8| octahedron | 6 | 12 | 8 | | d12 |dodecahedron | 20 | 30 | 12 | | d20 |icosahedron | 12 | 30 | 20 | There is no d10here, no d7, no d100 — not because we lackthe will, but because geometry refuses. Theface-counts **{4, 6, 8, 12, 20}** are the onlyletters the formula will spell. EverythingGEMS builds, it builds from these. ## The map— glob to dice Take the count N. Choose amultiset of legal dice that *covers* it. Thereare exactly two ways to cover, and theruneboard already shows both: - **PRODUCT**— the dice are read like the digits of anumber, positional, each one a coordinate.Capacity is the product ∏ Fᵢ. This is the**HexCube**: dice nested inside dice, anaddress space. Three d6 spell 216 cells. -**SUM** — the items are spread one to aface, laid out rather than multiplied.Capacity is the sum Σ Fᵢ. This is the**SubuGlass**: globs riding the faces of thetanks, each glob a face, each face a glob.Between two valid coverings, the cheaper wins:**fewest dice first, then least waste** (thespare faces, capacity minus N). ## Therevelations - **A deck of cards is twoicosahedra and a dodecahedron.** 52 → d20 +d20 + d12. The sum is exactly 52. No waste. Adeck was always this shape; we simply hadn'tasked Euler. - **Ten globs are a singledodecahedron** (d12, two faces to spare) —or, if you want it exact, a tetrahedron and acube (d4 + d6 = 10). The cost knob decideswhich: economy of dice, or economy of waste. -**Two hundred sixteen is the cube of cubes.**216 → d6 × d6 × d6, the product regime inits purest form. ## The corollary Euler doesnot only build the dice — it *names thedifference* between the two primitives theruneboard is made of: - a **die**, a cube, anysolid body → **χ = 2**, the signature of asphere, a thing that is whole. - a **ring**, aflat puck, the annular arcs of Pulse andGrimoire → **χ = 0**, the signature of atorus, a thing with a hole through it. So whenyou look at the runeboard and see rings arounddice, you are seeing two Euler characteristicsin conversation. The hole and the whole. ##Where it lives GEMS is not code. It is a Thingin Portal (`onyx=gems-formula`,`sapphire=formula`) — the legal face-set,the two regimes, the cost order, allmachine-readable in its gems. The geometrygenerator does not *contain* this math; it*reads* it. A world declares "I hold 52," GEMSreturns `[d20, d20, d12]`, Euler certifieseach die can be built, and Houdini lays themesh. The script is a shadow the formulacasts, never the formula itself. When thefirehose returns, this scroll federates. Untilthen it rests in the Hexocampus, waiting.