Contents
Where this sits
The three implementations, each with what it draws on and what it feeds.
The pipeline
The reference is the authority: it runs the benchmarks and decides the claims. The browser core is a port, trusted because its traces match the reference’s line for line. The page runs the core live and re-checks a sample of traces every time it loads.
Four arithmetic tracks
The paper’s §8.10 runs the spinor clock on four parallel tracks. The same split is used here, so each number has exactly one job.
| Track | Arithmetic | Job here | Checked by |
|---|---|---|---|
| A | Float64 | The search: corners, costs, weights, centroids, at speed | Agreement with B within a stated tolerance |
| B | Exact rationals (BigInt fractions, Python Fraction) | Certificates: every stored state on the sheet, Helix B’s counts, the register’s holonomy | Exact identities (H1, H7, pump) |
| C | Rational approximants on a declared grid | The snap that returns each centroid to an exact point; its residual logged every step | Residual within the grid bound |
| R | Residues modulo 881 | Fingerprints of states, for the visited-state hash and the memory’s Merkle chain | Agreement with B reduced mod 881 |
Trace parity
The Galactic Lensing Part 1 page reproduces its Python verifier’s output line by line (66/66). The same discipline applies here, with one honest caveat about floating point.
- One random generator, in both languages. A small seeded generator (xoshiro128**, specified bit for bit) is written in Python and JavaScript. Neither torch’s nor the browser’s generator is used for anything that is traced.
- Exact where it can be. The traced path takes rational step lengths (t = tanh(r/2)) and Cayley rotations, so corners, probes, snapped states and Helix B’s counts are exact rationals. They must match exactly.
- A tolerance where it cannot. Softmax uses
exp, and the transcendental functions of Python’s and the browser’s maths libraries may differ in the last bit. Weights and float centroids therefore match within a relative tolerance of \(10^{-12}\), and the tolerance is printed with every comparison.
A port that matches on the exact track and agrees within a stated tolerance on the float track is trustworthy. One that is only “close” everywhere cannot be told apart from a subtly wrong one.
The Python reference (Phase 1)
It lives in reference/, and polystep is a dependency, not a copy. Planned layout:
| File | Holds |
|---|---|
| requirements.txt | polystep 1.1.1 and its CPU torch (already written) |
| hyperbolic.py | Lorentz form, boosts \(L_x\), ghost map and its inverse, Klein and Poincaré charts; float and Fraction versions |
| step.py | The hyperbolic step, using polystep’s orthoplex, rotations and SoftmaxSolver / SinkhornSolver; the curvature-0 switch (H5) |
| exact.py | Cayley rotations, rational corners, the snap; H1–H7 as exact checks |
| channels.py | The 24-frame schedule, pairing, clutch, membrane and pump (ported from the Zero-Point page’s constants) |
| problems.py | Instance generators and decoders for B1–B4; Helix B’s exact counts |
| prng.py | The shared xoshiro128** generator |
| run_traces.py, run_bench.py | Write traces/*.json; run the preregistered benchmarks and write the results |
| tests/ | pytest: H1–H7, decoder round trips, schedule constants, generator determinism |
The browser core (Phase 2)
One file, hyperbolic_core.js, beside the pages. It builds on the existing exact core (BigInt fractions and rational quaternions, already used by every tri-engine page) and exposes the same functions as the reference: charts and boosts, the step, the snap, the decoders, Helix B and the generator. Float functions do the search and exact functions the certificates, and each function is marked with its track.
The simulation page (Phase 3)
Built in Phase 3 as simulation.html. The plan was to generate it from the Zero-Point Tri-Engine’s template. It was written by hand on hyperbolic_core.js instead, because the core already holds the clock, schedule, clutch, membrane, memory and pump, checked line for line against the reference. A second copy from the template would have been code with no parity check.
Poincaré view
Each channel’s particles and incumbents in one factor, with the last step’s polytope drawn as geodesics and weighted corners; the tree in an anchor’s chart for B3; prototypes and encoded inputs for B4.
The answer
B1–B4 at their sizes, with the decoded answer (a coloured graph, a truth grid, address digits, a confusion matrix) and Helix B’s exact count.
Clock and channels
The eight-stage dial and the 24-frame strip with each packet’s stage, the register meter, the pump result, per-channel steps and costs, and the memory chain, re-verified on every redraw.
Self-test
105 trace lines replayed through the page’s own core on load, and all 169 on request.
It opens paused, takes its settings from the address, and is documented control by control in the simulation manual. Making the exact track usable live meant speeding up the core’s pump about eightyfold, with results unchanged (details).
The site build
The calculator’s generated pages are built from templates kept in scripts/geometric-build/, moved into the repository in Phase 0 so any session can rebuild them.
Test plan
| Phase | Must pass |
|---|---|
| 0 | Every page renders with no script error at desktop and phone width; every link resolves; the charts draw every node and edge; the build reproduces every existing page byte for byte |
| 1 passed | H1–H7 on random instances (1,000 each for H1, H3, H4 and H6; 1,600 for H2; H5 as a limit; H7 on 50 random and two live registers); the curvature-0 step equals polystep’s on the same rotation; decoders agree exactly; the generator matches its published vector. 80 tests; see the reference guide |
| 2 passed | Every trace line matches: exactly on tracks B, C and R, within \(10^{-12}\) on track A. Result: 169/169, in Node and live in the browser; see the core reference |
| 3 passed | The page opens paused; self-test and trace sample pass on load; the pump closes every register with H = P⁻¹; no horizontal scroll on a phone; the bar test passes. Result: frame 0 and paused on load, 105/105 on load and 169/169 in full, all four problems in both geometries under all three clutches with no script error, the exact register on B1 closed with H = P⁻¹, 390 px wide with no horizontal scroll |
| 4 passed | Benchmarks run exactly as preregistered; every cell reported with its decision; the B3 control behaves as Prop 5.13 requires. Result: 7,740 runs under Amendments 2 and 3, every cell on the results page, and the control passing for every method at every depth. One defect, found after the runs (the float membrane leaving the sheet), was fixed, its runs redone, and both sets reported |