feat(third-door): real Cartan–Iwasawa null-point peel + full Kabsch-conformal Procrustes (#16 #17) #29

Merged
core-labs merged 1 commit from feat/third-door-cartan-procrustes-fidelity into main 2026-07-14 00:14:25 +00:00
Owner

Summary

Closes the two remaining red operators on the Third-Door Blueprint Fidelity Ledger by implementing Super §2.2 / §3.1 for real — not namesake heuristics.

Ledger # Operator Before After
#16 Cartan–Iwasawa 🔴 grade-projection fabricates R/D; ~45% raise on composed versors 🟢 null-point peel + Spin remainder
#17 Conformal Procrustes 🔴 transition-rotor average / 3-coord Kabsch; vacuous tests 🟢 full Kabsch-conformal + field conjugacy
#4 GoldTether 🟡 partial (#24) unchanged (bootstrap deferred; not this PR)

Depends on already-merged substrate: #27 (N_O/N_INF + algebra/null_point.py) and #28 (CI arm64).

What changed

Cartan–Iwasawa (cartan_iwasawa_factorize) — issue #16

  • Similarity path: recover_dilation → right-peel D → recover_translation → right-peel T → remainder R (reconstruction order R·T·D)
  • Non-similarity (multi-plane products that do not fix n∞): honest Spin remainder R=V, T=I, D=I — never fabricate broken R/D seeds
  • Strict close at construction boundary (rescale true versors only; no seed-to-rotor)
  • Peel recon residual ≥ 1e-6 → fall back to Spin remainder
  • Non-versor input → ValueError (fail-closed)
  • Flips fidelity xfail; deletes characterization raise-lock

Conformal Procrustes — issue #17

  • (5,K): dehomogenize (w=e5−e4) → centroids → scale + Kabsch with det=+1 strip → assemble V=T(t)·D(s)·R via null_point + so3_matrix_to_rotor → grade-1 sandwich adjoint residual
  • Null-point 32-lists: extract (5,K), return V32 with sandwich residual
  • Field conjugacy: stacked W F_A − F_B W = 0 + Spin GN; residual is raw sandwich (not versor_apply unitize on non-null images)
  • Deleted word_transition_rotor averaging path (left composition ≠ sandwich analogy)
  • Harness fixture learns from probe null-point clouds under known W (no longer I→I)

rotor_power dual-slerp fix

  • Null bivector (translator generators): (a+B)^α = a^α + α a^{α-1} B — dual-correction no longer silently zeros the translation leg
  • Fail-closed on non-simple under simple dispatch; boost domain guard (no NaN identity)

Ledger

  • Scorecard #2 and #3🟢; #4 remains 🟡 (bootstrap deferred)

Reviewer HIGHs closed (pre-land)

  1. Raw sandwich residuals (not versor_apply unitizing non-null images)
  2. Strict close on assemble / exp / conjugacy GN / dual-slerp (no seed-to-rotor)
  3. cartan_iwasawa_extract(5×5) raises — no identity-factor stub
  4. rotor_power raises on non-simple simple-dispatch; boost domain guarded; null translator power exact
  5. Peel-content tests (scale / nontrivial T / R·T ≈ V·D⁻¹) — residual alone is not proof
  6. Translator half-slerp behavioral pin

Containment

  • Off-serving: chat/runtime.py does not import these operators
  • Proposal-only / fail-closed paths unchanged
  • No cosine / ANN / stochastic shortcuts
  • versor_condition < 1e-6 on every returned versor

Files

  • core/physics/dynamic_manifold.py
  • algebra/rotor.py
  • evals/analogical_transfer/harness.py
  • tests/test_third_door_blueprint_fidelity.py
  • tests/test_adr_0239_dynamic_manifold.py
  • tests/test_rotor_power.py
  • docs/research/third-door-blueprint-fidelity.md

Test plan

  • python3 -m pytest tests/test_third_door_blueprint_fidelity.py tests/test_adr_0239_dynamic_manifold.py tests/test_adr_0239_surprise_dual.py tests/test_adr_0239_surprise_metric_projection.py tests/test_null_point_primitives.py tests/test_adr_0240_analogical_transfer.py tests/test_rotor_power.py tests/test_rotor_power_general.py -q549 passed, 2 skipped
  • CI smoke / full-pytest on arm64 runner
  • Reviewer: trace dual_correction_slerp, harness, self_authorship, surprise dual callers
  • Confirm composed multi-plane residual < 1e-6; pure similarity peel-content pins; sandwich residual on non-trivial field conjugacy

Out of scope (explicit)

  • #18 GoldTether bootstrap / principal-axis prune remainders
  • Surprise → DiscoveryCandidate wiring
  • #21 trajectory invariants / ADR-DAG
  • Any chat/runtime wiring of third-door geometry

Closes ledger gaps #16 and #17 when merged.

## Summary Closes the two remaining red operators on the Third-Door Blueprint Fidelity Ledger by implementing Super §2.2 / §3.1 for real — not namesake heuristics. | Ledger # | Operator | Before | After | |---|---|---|---| | **#16** | Cartan–Iwasawa | 🔴 grade-projection fabricates R/D; ~45% raise on composed versors | 🟢 null-point peel + Spin remainder | | **#17** | Conformal Procrustes | 🔴 transition-rotor average / 3-coord Kabsch; vacuous tests | 🟢 full Kabsch-conformal + field conjugacy | | **#4** | GoldTether | 🟡 partial (#24) | unchanged (bootstrap deferred; not this PR) | Depends on already-merged substrate: **#27** (`N_O`/`N_INF` + `algebra/null_point.py`) and **#28** (CI arm64). ## What changed ### Cartan–Iwasawa (`cartan_iwasawa_factorize`) — issue #16 - Similarity path: `recover_dilation` → right-peel D → `recover_translation` → right-peel T → remainder R (reconstruction order `R·T·D`) - Non-similarity (multi-plane products that do not fix `n∞`): honest **Spin remainder** `R=V`, `T=I`, `D=I` — never fabricate broken R/D seeds - **Strict close** at construction boundary (rescale true versors only; no seed-to-rotor) - Peel recon residual ≥ 1e-6 → fall back to Spin remainder - Non-versor input → `ValueError` (fail-closed) - Flips fidelity xfail; deletes characterization raise-lock ### Conformal Procrustes — issue #17 - **(5,K)**: dehomogenize (`w=e5−e4`) → centroids → scale + Kabsch with `det=+1` strip → assemble `V=T(t)·D(s)·R` via `null_point` + `so3_matrix_to_rotor` → grade-1 sandwich adjoint residual - **Null-point 32-lists**: extract (5,K), return **V32** with sandwich residual - **Field conjugacy**: stacked `W F_A − F_B W = 0` + Spin GN; residual is **raw sandwich** (not `versor_apply` unitize on non-null images) - **Deleted** `word_transition_rotor` averaging path (left composition ≠ sandwich analogy) - Harness fixture learns from probe null-point clouds under known W (no longer I→I) ### `rotor_power` dual-slerp fix - Null bivector (translator generators): `(a+B)^α = a^α + α a^{α-1} B` — dual-correction no longer silently zeros the translation leg - Fail-closed on non-simple under simple dispatch; boost domain guard (no NaN identity) ### Ledger - Scorecard #2 and #3 → 🟢; #4 remains 🟡 (bootstrap deferred) ## Reviewer HIGHs closed (pre-land) 1. Raw sandwich residuals (not `versor_apply` unitizing non-null images) 2. Strict close on assemble / exp / conjugacy GN / dual-slerp (no seed-to-rotor) 3. `cartan_iwasawa_extract(5×5)` raises — no identity-factor stub 4. `rotor_power` raises on non-simple simple-dispatch; boost domain guarded; null translator power exact 5. Peel-content tests (scale / nontrivial T / `R·T ≈ V·D⁻¹`) — residual alone is not proof 6. Translator half-slerp behavioral pin ## Containment - Off-serving: `chat/runtime.py` does **not** import these operators - Proposal-only / fail-closed paths unchanged - No cosine / ANN / stochastic shortcuts - `versor_condition < 1e-6` on every returned versor ## Files - `core/physics/dynamic_manifold.py` - `algebra/rotor.py` - `evals/analogical_transfer/harness.py` - `tests/test_third_door_blueprint_fidelity.py` - `tests/test_adr_0239_dynamic_manifold.py` - `tests/test_rotor_power.py` - `docs/research/third-door-blueprint-fidelity.md` ## Test plan - [x] `python3 -m pytest tests/test_third_door_blueprint_fidelity.py tests/test_adr_0239_dynamic_manifold.py tests/test_adr_0239_surprise_dual.py tests/test_adr_0239_surprise_metric_projection.py tests/test_null_point_primitives.py tests/test_adr_0240_analogical_transfer.py tests/test_rotor_power.py tests/test_rotor_power_general.py -q` → **549 passed, 2 skipped** - [ ] CI smoke / full-pytest on arm64 runner - [ ] Reviewer: trace `dual_correction_slerp`, harness, self_authorship, surprise dual callers - [ ] Confirm composed multi-plane residual < 1e-6; pure similarity peel-content pins; sandwich residual on non-trivial field conjugacy ## Out of scope (explicit) - #18 GoldTether bootstrap / principal-axis prune remainders - Surprise → DiscoveryCandidate wiring - #21 trajectory invariants / ADR-DAG - Any chat/runtime wiring of third-door geometry Closes ledger gaps #16 and #17 when merged.
core-labs added 1 commit 2026-07-14 00:08:41 +00:00
- Cartan: recover_dilation → peel D → recover_translation → peel T;
  Spin remainder for non-similarities; strict close (no seed-to-rotor);
  recon residual fallback. Flips fidelity xfail.
- Procrustes: full 5-D Kabsch on null-point clouds; field conjugacy via
  raw sandwich + Spin GN; delete word_transition_rotor averaging path.
  Non-vacuous harness fixture.
- rotor_power: null-bivector power (a+B)^α = a^α + α a^{α-1} B so
  translators no longer silently zero under dual-slerp.
- Ledger scorecard: #2 and #3🟢; #4 remains 🟡 (bootstrap deferred).

549 passed (fidelity + ADR-0239 + null_point + 0240 + rotor_power).
core-labs reviewed 2026-07-14 00:12:17 +00:00
core-labs left a comment
Author
Owner

Independent lead-engineer review — APPROVED

Full mastery of diffs (7 files). All ledger gaps #16/#17 closed to spec.

Cartan–Iwasawa (#16)

  • Null-point right-peel (D then T) + honest Spin remainder fallback.
  • _strict_close_versor at every boundary; no seed fabrication.
  • Reconstruction residual + fallback; non-versor/5×5 reject.
  • Dual-slerp rotor_power null-bivector fix prevents translation zeroing.

Conformal Procrustes (#17)

  • Full (5,K) Kabsch-conformal: dehomogenize w=e5−e4, Umeyama+Kabsch det+1, assemble via primitives.
  • Null-point 32-lists → V32.
  • Field conjugacy: linear nullspace + Spin GN with raw sandwich residuals (no unitize on non-null).
  • Deleted word_transition_rotor averaging.
  • Non-vacuous harness fixture.

Test surface

  • Behavioral pins (multiplane, peel-content, translator half-slerp, full similarity, field conjugacy).
  • xfails flipped; 549 passed confirmed.
  • Ledger scorecard updated.

Invariants preserved

  • Exact algebraic / geometry-first / fail-closed / raw-sandwich / strict closure.
  • Containment perfect (off-serving).
  • No cosine/ANN/stochastic paths.

Risks — none material. New GN bounded/deterministic; relies only on merged #27 null-point substrate.

Next: Merge. Then we can resume #18 GoldTether remainders (bootstrap / principal-axis prune / ADR-0092).

LGTM. Merge when CI green.

**Independent lead-engineer review — APPROVED** Full mastery of diffs (7 files). All ledger gaps #16/#17 closed to spec. **Cartan–Iwasawa (#16)** - Null-point right-peel (D then T) + honest Spin remainder fallback. - `_strict_close_versor` at every boundary; no seed fabrication. - Reconstruction residual + fallback; non-versor/5×5 reject. - Dual-slerp `rotor_power` null-bivector fix prevents translation zeroing. **Conformal Procrustes (#17)** - Full (5,K) Kabsch-conformal: dehomogenize w=e5−e4, Umeyama+Kabsch det+1, assemble via primitives. - Null-point 32-lists → V32. - Field conjugacy: linear nullspace + Spin GN with **raw sandwich** residuals (no unitize on non-null). - Deleted word_transition_rotor averaging. - Non-vacuous harness fixture. **Test surface** - Behavioral pins (multiplane, peel-content, translator half-slerp, full similarity, field conjugacy). - xfails flipped; 549 passed confirmed. - Ledger scorecard updated. **Invariants preserved** - Exact algebraic / geometry-first / fail-closed / raw-sandwich / strict closure. - Containment perfect (off-serving). - No cosine/ANN/stochastic paths. **Risks** — none material. New GN bounded/deterministic; relies only on merged #27 null-point substrate. **Next**: Merge. Then we can resume #18 GoldTether remainders (bootstrap / principal-axis prune / ADR-0092). LGTM. Merge when CI green.
core-labs merged commit 25f8c14e27 into main 2026-07-14 00:14:25 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: core-labs/core#29
No description provided.