Hyperbolic Lexicon · Explainer 14 · Phase 5

The 3D Page Manual

The 3D page, lexicon-3d.html, takes two segments as a BERT-style pair and shows every token at its exact address in the H³ tree, drawn in the Poincaré ball. Each token carries the frame of its quaternion. The selected address is read three ways: as a word, as an exact H³ point that decodes back, and as a vertex of X(5, q). Engram Mind’s Eye’s coupler binds the two segments. This manual covers every panel and control, where each number comes from, and how the page is tested. The page decides nothing.

Open the 3D page The view One address, three readings The coupler What it is not
decides: nothing · built on L1, L3, L4, L7, L8–L11 default pair: 17 tokens, centre organism.n engine and data checked at load in ~0.7–1.0 s Chromium: 3 widths × 2 schemes × http and file://
Contents
  1. Where this sits
  2. The view
  3. Segments A and B
  4. A frame per token
  5. One address, three readings
  6. The coupler binds A and B
  7. Click to decode in H³
  8. The shared panels
  9. How it is tested
  10. What it is not
01

Where this sits

Phase 5 builds the two pages that Explainer 3 designed in Phase 0 (its pages chapter): the 2D page, with the exact H² tree in the disk, and this one, with the exact H³ tree in the ball. Both stand on claims already decided, and neither decides one.

  • L1. The pre-processing front end (NB, WordPiece V0, ids, offsets) is byte-identical in Python, Node and Chromium. The page tokenises with that front end.
  • L3. Every noun synset has an exact, invertible, certified address in the norm-5 tree, with exact points in H³ and H². The page draws those points and decodes them.
  • L4. Exact ranking is identical across engines, and float64 is not certifiable at WordNet depth. That is why the picture is drawn from an exact chart, and why the page reports how many letters survive float64.
  • L7. One tree, three readings: address, H³ point and X(5, q) vertex. Chapter 5 shows all three for the selected address.
  • L8–L11. Language shards, the corpus manifest and the hardened verifier. The shard panel runs that code on this page’s data.

The page runs on lexicon_core.js, loaded unchanged. This is the core on which L1, L3(f), L4 and L8–L11 were decided; node tests/parity-lexicon.cjs still gives 22,586/22,586. The page engine, assets/hl-pages.js (LexiconPages), composes the core with Hyperbolic Oracles’ hyperbolic_core.js, decoder3d.js and twin3d.js and Engram Mind’s Eye’s engram_core.js. The panels both pages share are in assets/hl-panels.js. This page’s own files only draw and ask:

The WordNet data reach the page as two script wrappers, with no fetch, so the page works from file:// as well as over http. At load the page checks both texts against their pins, runs the core’s L3 rule and map A on them, and compares the results with the decisive runs’ records. Explainer 13 describes the data and its checks.

Phase 5 decides nothing

Every number on the page is computed in your browser by the code that the claims were decided on, and the tests compare those numbers with Node’s. Phase 5 ends at the Stage-1 gate: a review with the user before any encoder code is written.

02

The view

The 82,115 noun synsets (and the 8,192 V0 tokens and 13,767 verb synsets beside them) cannot be drawn at once. The view shows a bounded neighbourhood of one named node, the centre, in the centre’s own exact chart. You move by recentring.

What is drawn

Lex.view(centre) lists the drawn nodes. Its rules are the same as on the 2D page:

  • every named ancestor of the centre;
  • up to 24 siblings and 48 children, with paging;
  • four grandchildren for each of the first 12 children, when the centre has at most 48 children;
  • the pair’s tokens, plus a shard’s tokens or an Engram session’s words when you ask for them;
  • the named nodes on each lowest-common-ancestor path.

The budget is 400 nodes. For the default pair, the centre is organism.n (00004475), the lowest common ancestor of its noun tokens. The view then holds 89 named nodes and 182 virtual letters.

Edges are drawn letter by letter. Each letter of a word is one geodesic step of length ln 7 = 1.9459 in the tree, and the page samples each step on its H³ geodesic. A step after the first letter of a multi-letter edge ends on a virtual prefix: one of the L3 rule’s extra digits for families of more than five. These virtual prefixes are drawn as gold dots. A dashed edge passes named nodes that the view does not draw (an extra token joined to its nearest drawn ancestor).

The exact chart, then floats

Lex.chart(3, centre) sends every drawn point x to Mc−1x. Here Mc is the centre’s integer frame from the tree, and Mc−1 = J McT J. The result is computed in BigInt: integer numerators over the product of the two denominators. The centre lands exactly on (D, 0, 0, 0), and the parent lands on the negative x-axis. Floats enter only at the last step:

  • the distance d, from the exact cosh, correctly rounded;
  • a unit direction u, from the three spatial numerators.

So the resting picture is exact up to its final rounding, at any depth. Far from the centre, the float point is accurate only as a picture; this is L4’s finding. The readout shows how long the chart took: a few milliseconds (3–11 ms for the default pair in these tests).

ModeRadius of a point at distance dWhat it shows
Poincaré ball (default)r = tanh(d / 2s), with the rim drawn; s is the spread, ×1 to ×6, default ×3The conformal picture at s = 1. Hyperbolic lengths shrink toward the rim, so the far tree crowds there. dog.n is 25.5 from organism and sits at r = 0.9996 at ×3.
radius = distancer = d / (1.04 × the largest drawn d)Distances read straight off the radius, as on Engram Mind’s Eye’s 3D page. Far tokens line up along the parent’s direction.

From the centre, everything outside its subtree lies behind its parent, along the negative x-axis. Tokens of other roots (for example the, ##ased and [CLS], 24–36 from organism) therefore share one spot at the rim, and they share one label there too; a token within a few pixels of the selected one is named in the selection’s label. To see them, press Origin.

ControlDoes
dragTurns the view: yaw and pitch with a mouse. On touch, a horizontal drag turns the yaw and the page still scrolls; the pitch slider covers the rest.
clickSelects the nearest drawn point within 12 px (chapter 5)
double-click, long pressSelects the point and centres the view on it
Up, Back, Origin, Centre on selectionCentres on the centre’s named parent, the previous centre (a history of 50), the empty word, or the selection
searchPrefix match on first lemmas and V0 pieces (Lex.search); Enter selects the first match and centres on it
view, spread, + and −, pitchThe mode, the spread, zoom (also Ctrl + wheel, or a trackpad pinch) and pitch. All are float display transforms, applied after the exact chart.
frames, tree, labels, paths, turnToggles: the token frames (chapter 4); the edges and virtual letters; the labels; the gold lowest-common-ancestor paths; a slow turn about the vertical (off by default when the system asks for reduced motion)
◀ siblings … ▶, ◀ children … ▶Pages through a centre’s siblings or children when there are more than the view holds

The paths join consecutive distinct synset tokens of the pair, in BERT order, through their lowest common ancestor. Each path is drawn letter by letter up from one token and down to the next. For the default pair, dog–cat meets at carnivore.n and cat–tree meets at organism.n. dog and cat share 24 letters, but carnivore has 23: the longest common prefix ends inside a multi-letter edge. The 2D page’s LCA panel gives the tree path against the geodesic: dog–cat is 7 letters, a tree path of 13.62 against a geodesic of 9.06 in H³.

Why canvas, not WebGL

The renderer is the one used on Engram Mind’s Eye’s 3D page and on Hyperbolic PolyStep’s 3D pages: plain canvas 2D, with yaw and pitch, perspective 1/(1 − 0.18 z) and back-to-front painting with depth fade. It needs no library, no CDN and no GPU, so the page works offline and from file://. A few hundred points and their geodesics are well within what canvas 2D can draw each frame.

03

Segments A and B

BERT-style models read two segments at once. This page does the same, so that the two can be compared and bound (chapter 6).

The pair goes in as [CLS] A [SEP] B [SEP]. If B has no tokens, it goes in as [CLS] A [SEP]. Each segment is normalised by NB and split by WordPiece V0 on its own (Lex.analyse(A, { pair: [A, B] })). Segment id 0 covers [CLS], A and the first [SEP]. Segment id 1 covers B and the last [SEP]. The specials have no byte span. B’s spans count from B’s first byte.

  • The chips. Each shows its piece, its V0 id and its segment id. Its colour is its root, and the band under it is its segment: A in sky, B in amber. Click a chip to select its token.
  • The readout. The token counts per segment, the synset tokens, [UNK]s, and any words NB refused (code points unassigned in Unicode 15.1).
  • The id stream. The LEB128 stream of the pair’s ids, with its SHA-256.
  • The examples. “The dog chased the cat.” / “The cat climbed the tree.” (17 tokens, the default); “Is oxygen a gas?” / “Yes, and so is nitrogen.” (16); “She can run.” with B empty (6).
  • The address. The pair is kept in the address as #a=…&b=…, so a link opens the same pair; a new pair typed into the address bar is analysed at once.

Every token is placed by map A, as on the 2D page:

  • specials, digits and punctuation go to root 5, and ## pieces are spelled under root 3;
  • an entry that WordNet indexes takes the part of speech with the most tagged senses (ties: noun, verb, adjective, adverb). A noun or verb lands on its first sense’s synset; an adjective or adverb is spelled under root 2;
  • every other entry is spelled under root 4.
RootHoldsDefault pair
0 · nounentity.n.01 and its treedog, cat, cat, tree
1 · verbthe verb forest, under a virtual root–
2 · adj/advadjective and adverb lemmas, spelled–
3 · #### pieces, spelled##ased, ##bed
4 · otherother whole words, spelledthe (×4), ch, clim
5 · specialspecials, digits and punctuation[CLS], [SEP] (×2), . (×2)

One sense, no context: in “The cat sat.”, sat lands on Saturday.n (15164570), because that is its first index entry. This is map A’s rule, shown as it is.

04

A frame per token

A token’s word has a position, its H³ point, and also a frame: the rotation R(q) of its quaternion q.

The quaternion is q = HPCore.P.wordQuaternion(word), the product of the letters’ generators 1 ± 2i, 1 ± 2j, 1 ± 2k. Its norm is exactly 5n for a word of n letters. R(q) = twin3d.js’s rotOfQuat(q), computed in exact rationals, and the selected-point panel shows “RTR = I exactly ✓”. For dog.n, q = (−1048546839, −140429198, 2329719522, 950692754), the norm is 527, and R(q) is a turn of 134.8°.

The frame is not the position. Two tokens can sit near each other in the tree and carry very different frames, because each letter turns the frame as well as moving the point. The coupler (chapter 6) composes the frames.

How the frames are drawn

The engine’s Chart.frameAxes(x) gives the endpoints of three arms of hyperbolic length 0.6 at x, mapped into the chart. Near the centre these arms are visible. Far from it, the ball shrinks them below a pixel: dog.n is 25.5 from organism.n, where an arm of 0.6 covers about 10−4 of the radius at spread ×3, almost all of it radial. Their sideways part is also lost to float rounding.

So the page draws each token’s frame as a small triad of fixed screen size. The triad is turned exactly as the frame is turned at that point of the conformal Poincaré ball:

  • take the chart isometry T = Mc−1Lx, with Lx the boost to x’s exact point;
  • split T as LyK, where Ly is the boost to y = T e0 and K is a rotation (a boost’s differential at the ball’s centre is a scalar);
  • draw K’s spatial block applied to R(q)’s three columns.

T, Ly and K are exact rationals; floats enter only at the end. At the centre, these directions equal frameAxes’s; the Chromium test checks this to 10−9. Arms pointing away from you are drawn fainter. Where several tokens share one spot (the far spelled tokens), only one triad is drawn there.

The two twin triads and the triad in the selected-point panel turn with the view, as on Engram’s page. Their arms are red, green and blue, for R(q)’s columns e1, e2 and e3.

An engine request

The page computes K with the core’s integer frame (LC.h3Frames, as Lex.chart uses it) and hyperbolic_core.js’s exact boost. That is a few lines in assets/lexicon-3d.js. The page engine could offer it as Chart.frameDirs(x).

05

One address, three readings

L7 registered one tree with three readings, and showed that they agree: the address as a word, its exact point in H³, and its vertex in the LPS Cayley graph X(5, q). The selected-point panel shows all three for whatever you select: a token chip, a table row, or a point in the view.

The word

  • Name and kind. Its name, kind and offset; the tokens of the pair that map to it; the V0 ids it holds (161 addresses are shared, by 338 entries); its named depth and its length.
  • The letters. They are grouped by named edges, with virtual letters in gold.
  • The ids. The D6 id (wordId), id59 (words of up to 25 letters) and id64 (up to 27).
  • The certificate. It has three parts: the norm is 5n, right division returns the word, and the word is reduced.
  • The ancestors. Each named ancestor is a chip; click one to centre on it.

The H³ point

  • Coordinates. The four exact coordinates in lowest terms, with their numerator and denominator bits (LC.coordBits), and the point’s bits over the one denominator 7n (LC.pointBits).
  • Distances. The exact cosh of the distance from the origin and from the centre.
  • Decoding. Chapter 7.
  • float64. How many leading letters survive when the exact point is stored in float64 (each coordinate correctly rounded) and decoded exactly.
  • copy exact. Copies the full point, as key H3 p/q,….
TokenLettersH³ point bitsH² point bitsLetters kept in float64 (H³ / H²)
dog.n (02084071)27601 (coordinates 138/76, 138/76, 122/68, 95/54)57911 / 11
cat.n (02121620)2657856412 / 8
tree.n (13104059)2044046711 / 8
the (spelled, root 4)1020224110 / 10
[CLS] (root 5)468924 / 4

The X(5, q) vertex

For q = 13, 17 and 29 the panel gives:

  • the vertex number, in BFS order from the identity with the generators in P.GENS order, as reference/lexicon/lps.py numbers it;
  • its canonical 2×2 matrix mod q;
  • its distance from the identity vertex;
  • the vertex reached by walking the word’s letters, which equals the reduction of q mod p (L7(b)). The engine checks this for every word it shows.

For dog.n:

qVerticesDiameterGirth · rdog.n’s vertexMatrixFrom the identity
132,18478 · 3186[1 5; 5 1]3
174,89698 · 31277[1 8; 2 10]5
2912,18089 · 46582[1 24; 4 14]6

The engine builds each graph the first time it is asked (about 60 ms for all three in Node), and refuses it unless its size, diameter and girth equal L7’s record.

Collisions. X(5, q) is injective on reduced words of up to r = ⌊(girth − 1)/2⌋ letters (L7(c)). Longer words can share a vertex, because the graph is finite and the tree is not: dog.n’s 27 letters land on one of 2,184 vertices. The “sharing” column counts the pair’s distinct tokens that share a vertex with another of them. For the default pair it is 0 at every q.

The ball canvas. It draws the 37 vertices within distance 2 of the selected vertex: 1 + 6 + 30. Since the girth is at least 8, this ball is a tree. The six edges from the centre are labelled with the generator that leads outward (i, I, j, J, k, K, as Engram names them). The last two letters of the word’s walk are drawn in gold. Other tokens of the pair whose vertex falls inside the ball are ringed and named. The q chips choose the graph.

X(5, q) is shown for display only. It is a shard key at most, never integrity: LPS Cayley hashes have known collision attacks (Explainer 3, “Honest limits”).

06

The coupler binds A and B

Engram Mind’s Eye binds the two speakers of a dialogue with a coupler, and its claim E5 decided the law. Here the same coupler, EngramCore.Coupler, binds the pair’s two segments.

Structure 1 stands for segment A and structure 2 for segment B. The tokens are taken in BERT order. For each token, with w its word quaternion, both structures turn by the mirror law:

  • q1 ← w q1
  • q2 ← q2 w̄

Then the binding B = q2q1 is checked in exact arithmetic (Lex.couple). Under the mirror law, w̄w = |w|² is a scalar, so B never changes.

  • The triads. Two triads show R(q1) and R(q2) after the last token.
  • The strip. It has one square per check: green while B is unchanged, rose when it moves. Each square is outlined in its token’s segment colour.
  • The readout. “binding held 17/17 · twists A 9, B 8” for the default pair; #p-twin[data-held] carries the same count for the tests. The exact quaternions grow with every letter, and the cost grows faster than the number of tokens (on the sample paragraph, 192 tokens take about 0.07 s in Node and 0.13 s under the same-chirality control; 256 take 0.13 s and 0.30 s, 384 about 0.4 s and 1.1 s), so a longer pair is coupled over its first 192 tokens, and the readout says so.
  • The control: same chirality. Uses q2 ← q2 w, the control E5 registered. B moves at once: 0/17 for the default pair.
  • The tamper. “Skip one twist on structure 2” puts q2 back to its value before the chosen token’s twist, so that token’s w reaches structure 1 only. Every check from that token on fails: skipping token 5 gives 5/17, strip 11111000000000000.
A binding check only

The strip shows that the two segments’ structures were updated as mirror images, in exact arithmetic. It is not a feature of the text and not a security mechanism. It cannot tell which tokens were in A and which in B, and it says nothing about meaning. Integrity is carried by SHA-256 records: the shard panel’s chain, with its signed verifier.

07

Click to decode in H³

Clicking a drawn point selects that word, and the panel decodes its exact point back to letters.

Decoding is greedy: at each step, the decoder chooses the child direction the point lies furthest along. Two decoders run on the point:

  • h3DecodeInt, the core’s integer decoder, works on the integer numerators over 7n. It takes about 0.1 ms in Node.
  • decodeExact, Hyperbolic Oracles’ decoder3d.js through LC.h3DecodeExact, works in exact rationals. Amendment 4 item 4 names it the authority for L3(e). It takes 0.2–2.4 ms in Node for the default pair’s tokens, depending on length.

The panel marks each decoder, and says “decodes back ✓” only when the integer decoder returns the stored word and the authority agrees. #p-sel[data-decoded] is ok or bad.

In H³ this is proved, not only measured. Hyperbolic Oracles proves that greedy decoding returns every node at every depth when the step’s boost has t > 1/√2 (its E2; see Explainer 3’s chapter on exact points). The H³ tree uses t = 3/4. L3 also checked every noun.

Only drawn points are decoded. A click lands on a float pixel, which cannot name a deep word, so the page selects the nearest drawn exact point (within 12 px) and decodes that.

08

The shared panels

Three panels come from hl-panels.js and work the same on both pages. Explainer 13 describes them in full: the shard panel, Engram Mind’s Eye sessions and the data and its checks.

  • Shard. Grows, signs and verifies a language shard from the pair (A and B joined by a line break), the sample paragraph, or your own text. It follows Explainer 11’s lab, with one change: LADDR/1 is recomputed from this page’s data. Its addrTableRoot must equal the decisive run’s 30b17bc3…, and its hash must equal 83f09be9…. The tampers T1–T4 and T7–T9 break the package, and each is rejected at a named check. “Show its tokens in the tree” adds the shard’s tokens to the view and centres on their lowest common ancestor. The panel decides nothing: L8–L11 were decided in Phase 3.
  • Engram Mind’s Eye. Reads a session from this browser’s storage (read only, when the pages share an origin), from a file, or from pasted text. Engram’s own checks run on it. The packet table shows each packet’s engram/1 key beside its Lexicon address. Anagrams such as CAT, ACT and TAC share one key and have three addresses (cat.n, act.v, and tantalum.n with ##c). On this page, “with the next as A and B” takes a human turn and the STRIX reply after it as segments A and B, so Engram’s human/STRIX twin becomes the page’s segment pair. “Show the whole session in the tree” draws the session’s words coloured by speaker and sized by count.
  • Checks. The four load checks. “Recompute LADDR/1” is about half a second of work, done in short steps (the shard panel starts it once the page is idle, and both reuse it). “Check every noun’s points” writes L3(f)’s canonical point list of all 82,115 nouns and compares it with eb22bf00…; it takes several seconds and about 100 MB of memory.

The page keeps only conveniences in this browser’s storage: the last pair and the view’s toggles, under hyperbolic-lexicon/pages/1. Every access is guarded. Engram’s key is only ever read.

09

How it is tested

The engine is tested in Node by tests/pages-lexicon.cjs (62/62), including reference/traces/pages_v1.txt, the Python reference’s trace of the engine’s outputs. This page is tested in Chromium against that engine.

tests/pages-chromium-3d.cjs opens the page and this manual at 1440×900, 1024×768 and 390×844, each in dark and light, over http (a static server at the repository root on a free port) and over file://.

On every run it requires:

  • no page errors and no console errors (blocked web fonts aside);
  • no horizontal scroll;
  • body[data-ready="ok"] within 20 s;
  • in light mode, body text contrast of at least 4.5:1.

It compares the page with LexiconPages.load() in Node:

GroupChecked
pairsFive pairs, through #a=&b= and through the textareas: the token count with specials, and every token’s piece, segment and address. The exact H³ point of every token in the page equals Node’s, coordinate for coordinate.
selectionA chip, a table row and a click on the canvas each set data-selected, and the point decodes back. The X(5, q) table (vertex, matrix, distance, walk) and the drawn ball’s vertex equal Node’s for q = 13, 17 and 29, and “copy exact” gives Node’s exact point.
viewUp, Back, Origin, Centre on selection, search and a double-click move data-centre as Node predicts. Paging through city.n’s 659 children draws Node’s second page. The frames toggle, a drag (yaw and pitch), the mode and the spread change the canvas pixels, and switching the colour scheme repaints the canvas in the other scheme’s tokens. The LCA readout names Node’s ancestors. The frame directions at the centre equal Chart.frameAxes’s.
touchOn a 390 px touch screen, a tap selects the nearest point and a horizontal swipe turns the yaw; the canvas leaves vertical swipes to the page.
stateThe pair is written to the address; after a reload the pair and a toggle are kept. A 3,490-character pair (756 tokens) is analysed and drawn with every frame in under a second, and coupled over its first 192 tokens.
twin17/17 under the mirror law. The control and the skip tamper give Node’s held counts and Node’s strip.
panelsThe shard panel accepts “The dog chased the cat up the tree.”, with LADDR/1 recomputed, and rejects T8. The Engram panel imports a v2 export made in Node (CAT, ACT and TAC marked), makes one turn segment A, and loads a turn pair as A and B. After a reload it finds a session put in the origin’s storage, and leaves that storage unchanged.

The full run passes 285/285 checks in about 76 s on this container, over the test’s own static server and over python3 -m http.server. It exits 2 when Playwright or Chromium cannot launch. Screenshots are written only when HL_SHOTS names a scratch directory, and are never committed.

10

What it is not

A view of decided results, not a new result.

  • No learned d = 3 cloud, and no fence shells. Explainer 3’s Phase 0 plan listed both, and Phase 5 left them out. The d = 3 tables would need a new data file from reference/results/l6-tables, and the fence is display only and already lives on Engram Mind’s Eye’s 3D page.
  • Not semantic similarity. The tree is WordNet’s spanning hierarchy: each synset under its first hypernym or instance-hypernym pointer, the one the addresses use. Closure and other hypernyms are not shown, and a word gets one sense, with no context.
  • Positions and frames are drawn in floats. The chart is exact, and only the picture is rounded. The frames are drawn at a fixed size (chapter 4).
  • No decoding of an arbitrary clicked location. Only drawn exact points are decoded.
  • V0 only. V1 lives in the cache, not the repository. Glosses are not shipped.
  • Not WebGL. The renderer is canvas 2D (chapter 2).
  • The coupler is an integrity check of the binding only. It is not a security mechanism; the integrity of records is carried by the shard panel’s SHA-256 chain and signed verifier (chapter 6).
  • Not a claim. The page demonstrates the code that decided L1, L3, L4, L7 and L8–L11, and decides nothing itself. The Stage-1 gate comes next.