Skip to content

Commit 9ffff1f

Browse files
committed
fix(phi_spiral): correct unverified BGZ17 annotation against bgz17_bridge.rs
The atom16 / precision-ladder / two-axes docs annotated BGZ17 as "offset ≈17..27, stride {2,4}" — figures from a chat description that do NOT appear in the source. First-party read of src/hpc/bgz17_bridge.rs: BASE_DIM=17, GOLDEN_STEP=11 (coprime → table (i*11) mod 17 visits all 17 positions, Quintenzirkel-like phase), Base17=[i16;17], built by lossy golden-step octave averaging of a 16384-bit plane. The atom's two 2-bit fields are now labelled plan-inspired placeholders, not grounded BGZ17 parameters. Removes a fabricated constant from a pushed branch per the PR #200 audit discipline (source files are evidence; chat/plan descriptions are not). Note: this module remains an unmerged sketch — flat-disk manifold (the ASG/KHR correction makes the directional lane spherical) and built from the LeafPlanetarium inspiration doc. Superseded by the forthcoming ASG-leaf canon entry; not for merge as-is. https://claude.ai/code/session_01HbqooFZHAjaUtFEzhA1R2u
1 parent 82595ed commit 9ffff1f

1 file changed

Lines changed: 49 additions & 30 deletions

File tree

src/hpc/phi_spiral.rs

Lines changed: 49 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -12,37 +12,50 @@
1212
//! CAM_PQ removes the meaning direction → residual ⊥ meaning
1313
//! PolarQuant projects onto magnitude/similarity → LOSES the perpendicular location
1414
//! PhiSpiral256 addresses that orthogonal location → recovers what PolarQuant discarded
15-
//! BGZ17 golden offset/stride schedule → remembers how to recover it
15+
//! BGZ17 phase: golden/coprime cyclic step → ≈ Quintenzirkel (circle of fifths)
1616
//! ```
1717
//!
1818
//! PhiSpiral256 is **orthogonal to PolarQuant**: PolarQuant carries the
1919
//! radial magnitude scalar and throws away angular position; PhiSpiral256
2020
//! carries exactly that thrown-away position. It is *not* a meaning lane
2121
//! (that is CAM_PQ) and *not* a magnitude lane (that is PolarQuant).
2222
//!
23-
//! # Design trajectory: phase-centric splat encoding (the goal)
23+
//! # Two axes: BGZ17 phase × Poincaré clustering
24+
//!
25+
//! The golden spiral decomposes into exactly two independent axes, which
26+
//! correspond to two distinct lanes — PhiSpiral256 does not replace either,
27+
//! it *carries* both:
28+
//!
29+
//! - **Angle = BGZ17 phase.** BGZ17 *is* a phase encoding — a golden /
30+
//! coprime cyclic step akin to the **Quintenzirkel** (circle of fifths),
31+
//! where a coprime interval visits every position in a maximally-spread
32+
//! order. The golden angle `θ_k = 2π·frac(k/φ)` is the continuous limit
33+
//! of that step (the most-irrational rotation), so the spiral's **angle
34+
//! is the BGZ17 phase**. BGZ17's own coprime step is `GOLDEN_STEP = 11`
35+
//! over `BASE_DIM = 17` (verified in `hpc::bgz17_bridge`: the table
36+
//! `(i·11) mod 17` visits all 17 positions); the atom's two 2-bit `bgz`
37+
//! fields are plan-inspired placeholders, **not** those constants.
38+
//! - **Radius + spread = Poincaré clustering.** Poincaré is its own thing:
39+
//! **spatial location clustering** on the hyperbolic radial chart (see
40+
//! [`SpiralChart::Poincare`]) — a hemispheric chart around the parent
41+
//! anchor rather than a flat plane. This is the axis the cluster lives on.
42+
//!
43+
//! # Design trajectory: splat, not point (the goal)
2444
//!
2545
//! This module currently implements the **anchor layer**: a 256-point
2646
//! golden-spiral codebook with nearest-anchor lookup. The intended end
27-
//! state is bigger, and the anchor layer is the substrate it sits on:
47+
//! state, on the Poincaré (clustering) axis, is bigger:
2848
//!
29-
//! - **Phase-centric, not offset/stride.** BGZ17 addresses location by a
30-
//! recoverable offset/stride *sampling schedule* over Base17. PhiSpiral256
31-
//! instead makes the golden-angle **phase** itself the address — the
32-
//! `spiral_id` is a quantized phase on the disk, not a sample index.
33-
//! - **A splat, not a point.** A leaf does not address one anchor; it
34-
//! addresses a **Gaussian splat** — an anchor (phase) plus a 2D spread
35-
//! (covariance) — so it encodes *spatial clustering* of the orthogonal
36-
//! residual, not a single location. This is the same object the graphics
37-
//! renderer already produces: the 2D conic `Σ_img` in
38-
//! `hpc::splat3d::project` and the SPD covariance in `hpc::splat3d::spd3`
39-
//! *are* the splat spread. PhiSpiral256's location splat reuses that math.
40-
//! - **Hemispheric / Poincaré-flavored.** The placement is the
41-
//! Poincaré-disk golden step (see [`SpiralChart::Poincare`]), i.e. a
42-
//! hemispheric chart around the parent anchor rather than a flat plane.
43-
//! - **Maybe magnitude.** The splat may also carry a weight/opacity
44-
//! (spatial magnitude), making the leaf a weighted cluster rather than a
45-
//! bare location. Left as a forward extension, not yet encoded.
49+
//! - **A Gaussian splat, not a point.** A leaf addresses a **cluster** —
50+
//! an anchor plus a 2D spread (covariance) — encoding *spatial location
51+
//! clustering* of the orthogonal residual, not a single location. This is
52+
//! the same object the graphics renderer already produces: the 2D conic
53+
//! `Σ_img` in `hpc::splat3d::project` and the SPD covariance in
54+
//! `hpc::splat3d::spd3` *are* the splat spread. The location splat reuses
55+
//! that math.
56+
//! - **Maybe spatial magnitude.** The splat may also carry a weight /
57+
//! opacity, making the leaf a weighted cluster. Forward extension, not
58+
//! yet encoded.
4659
//!
4760
//! So the trajectory is: anchor codebook (here) → splat = anchor + 2D
4861
//! covariance (reuse `splat3d` Spd/conic) → optional magnitude. The point
@@ -87,10 +100,12 @@
87100
//!
88101
//! # Precision ladder (location)
89102
//!
90-
//! BGZ17 is the *coarse* recoverable-sampling skeleton — Base17 (17 levels),
91-
//! with a golden offset family in ≈17..27 and a stride family in `{2, 4}`.
92-
//! When precise location is needed, the residual is addressed at higher
93-
//! resolution than Base17:
103+
//! BGZ17 is the *coarse* recoverable-sampling skeleton — Base17 with
104+
//! `BASE_DIM = 17` and `GOLDEN_STEP = 11` (verified in `hpc::bgz17_bridge`;
105+
//! the coprime golden step `(i·11) mod 17` visits all 17 positions),
106+
//! reducing a 16384-bit plane to a **lossy** `[i16; 17]` by golden-step
107+
//! octave averaging. When precise location is needed, the residual is
108+
//! addressed at higher resolution than Base17:
94109
//!
95110
//! ```text
96111
//! BGZ17 / Base17 17 levels coarse recoverable sampling skeleton
@@ -310,14 +325,18 @@ impl PhiSpiral256 {
310325
/// ```text
311326
/// bits 0..=7 phi_spiral_id (location address, 0..255)
312327
/// bits 8..=11 mag4 (magnitude band, 0..15)
313-
/// bits 12..=13 offset family (index into BGZ17 offsets ≈17..27, 0..3)
314-
/// bits 14..=15 stride family (index into BGZ17 strides {2, 4}, 0..3)
328+
/// bits 12..=13 bgz family lo (plan-inspired 2-bit carrier, 0..3)
329+
/// bits 14..=15 bgz family hi (plan-inspired 2-bit carrier, 0..3)
315330
/// ```
316331
///
317-
/// The offset/stride fields are *family indices*, not the BGZ17 values
318-
/// themselves: BGZ17 operates on Base17 with a golden offset in ≈17..27 and
319-
/// a stride of 2 or 4. The 2-bit index selects which family the leaf used;
320-
/// the family→value table is a caller/BGZ17 concern.
332+
/// The two `bgz` fields are **plan-inspired placeholders**, not grounded
333+
/// BGZ17 parameters. The real BGZ17 (`hpc::bgz17_bridge`) is Base17 with
334+
/// `BASE_DIM = 17` and `GOLDEN_STEP = 11` (the coprime golden-step table
335+
/// `(i·11) mod 17` visits all positions — a Quintenzirkel-like phase),
336+
/// reducing a 16384-bit plane to a lossy `[i16; 17]` by golden-step octave
337+
/// averaging. These 4 bits do not encode those constants; a real BGZ17
338+
/// binding is a follow-up, not specified here. (The earlier "offset 17..27 /
339+
/// stride 2,4" annotation was an unverified chat description — corrected.)
321340
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
322341
#[repr(transparent)]
323342
pub struct PhiSpiralLeafAtom16(pub u16);

0 commit comments

Comments
 (0)