Kenneth W. Bingham · valuesai.online

Dimensional Programming · z = x·y

This is a way of looking, not a programming language: represent data the way an AI already holds it, as nested points on a math surface. Each thing is a point that contains other points; it stores only what is irreducible and derives everything derivable on demand; and it hands a model exactly the slice it asks for, at the scale it asks for. The payoff is concrete, and it is not "smarter AI" (which only worries people) but cheaper and more reliable AI: roughly 99.7% fewer tokens on a focused question (tokens cost money), and the same focusing discipline that cut one verifier's made-up output from about 39% to 0%. It focuses the model, it does not change it. The library here is real and runs in your browser and in Node. Below: the two hello-worlds, the saving measured in tokens, and the full reference.

STORED irreducible data the library keeps (a name, a colour, a mass). DERIVED computed on every read from the shape. Never cached, never stored.

Hello world, twice: the Russian Doll and the Car

Both structures below are built live by dp.js on this page. Click a part to zoom inward; ascend to step back out. Stored facts are gold, derived lenses are green and recomputed each time you move.

Why this helps an AI, measured

A model is asked one localized question over a large nested structure. The naive way dumps the whole flattened tree into the prompt. The dimensional way lets the model navigate to the region and read the answer, pulling only that slice. Real numbers from dp.js, computed live:

naive: whole structure in the prompt
dimensional: navigate to the region
The honest limit. This saving exists because the question is localized. If the model genuinely needs the whole structure, you send the whole structure and there is no saving. The win is for targeted questions over large nested data, and for derived facts that never go stale because they were never stored. It is ordinary retrieval over structure, framed as navigating a manifold. It does not make a model reason better; it stops making it read what it does not need.

The code

This is the entire Russian Doll program and the entire Car program, with the real output printed underneath. Nothing is hidden.

russian-doll.js
car.js


  

API reference

The whole surface. DP is the global in the browser, or require('./dp.js') in Node.

MemberReturnsWhat it does
DP.point(name, {x,y})PointCreate a point. x,y are its coordinate; default spread keeps demos deterministic.
p.contains(...children)pNest points inside this one. The Russian doll. Chainable.
p.fact(key, value)pSTORE irreducible data. One arg reads it back.
p.lens(name, fn)pRegister a DERIVATION. fn(p) runs fresh on every read.
p.derive(name)anyCompute a lens now. Nothing is cached; recomputed each call.
p.znumberThe coordinate value x·y. A getter; derived, never stored.
p.zoom() / p.ascend()parts / parentStep inward to the contained points, or outward to the container.
p.locate(path)PointFind a nested point by slash path, eg lot-A/car/engine.
p.path() / p.depthOf()string / numberAbsolute slash path from the root, and nesting depth.
p.walk(fn) / p.count()p / numberVisit every point inward; count all points from here.
p.toContext(depth)stringThe compact, self-describing slice an AI reads. Omit depth for the whole subtree.
DP.ai(root)AIAn interface the model drives. .command('ZOOM x' | 'ASCEND' | 'DERIVE n' | 'LOCATE path' | 'WHERE'), .context(depth), .cost() tokens used.
DP.estTokens(str)numberA rough ~4 chars/token estimate, labelled an estimate wherever shown.

What it is, and what it is not

What is solid. The nested point is scale recursion, the same structure behind scene graphs and fractals; it runs here, you can click it. Derived attributes really are computed from the shape and never stored; there is no result cache in dp.js. The token reduction for localized questions is real and measured on this page.

What is a model, not a proof. That fitting representations to geometry reduces the drift and hallucination caused by paradigm mismatch is a conjecture under test, not a settled result. This API is one honest foothold on it: structured, navigable context with derived-not-stored attributes. It does not reprogram the model and it does not make a model reason better. It makes the program speak to the model in the model's own shape, so the model reads less and reconstructs less. The geometry is an organizing principle; it gives no raw compute speedup. The theory and its boundaries live at dimensionalprogramming.com.
⨳ Powered by Butterflyfx Manifold · valuesai.online · the library on this page is dp.js, dependency-free, browser and Node

Concept and direction: Kenneth W. Bingham. Built with the help of Claude AI under a standing directive to be skeptical, to insist on proof, and to allow no claim that is not demonstrated in tested code. The ideas are the author's; the AI implemented and verified them, it did not originate them.