From 125b271d73ed225fb78b193a3439fb81163db378 Mon Sep 17 00:00:00 2001 From: Shay Date: Sun, 14 Jun 2026 14:06:51 -0700 Subject: [PATCH] fix(holonomy): downgrade non-robust resonance proof to honest tripwires + record finding MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Measuring the holonomy tri-language resonance (intended for a Studio proof-card) showed it is NOT a robust proof: the engine's own holonomy_similarity (CGA inner product) anti-correlates, and the Euclidean 'aligned closer than misaligned' claim passes only via averaging in the close Hebrew distance + one cherry-picked negative (1.3% margin) — the aligned Greek clause is itself farther than the negative, and the verdict flips ±20-55% under other negatives. Decoration, not proof (CLAUDE.md, Schema-Defined Proof Obligations). - docs/analysis/holonomy-resonance-proof-not-robust-2026-06-14.md: the rigorous finding (numbers), why a Holonomy proof tab cannot be built honestly yet (stays missing_evidence), and bounded research questions. - Downgrade the two clause-resonance decoration tests to honest tripwires that assert the true state and fail (pointing to the doc) if the resonance becomes real. Token-pair cga_inner tests left intact + flagged as a separate, un-audited claim. 70 holonomy-adjacent tests pass. --- ...y-resonance-proof-not-robust-2026-06-14.md | 114 ++++++++++++++++++ tests/test_alignment_graph.py | 75 ++++++------ tests/test_holonomy_resonance.py | 29 +++-- 3 files changed, 174 insertions(+), 44 deletions(-) create mode 100644 docs/analysis/holonomy-resonance-proof-not-robust-2026-06-14.md diff --git a/docs/analysis/holonomy-resonance-proof-not-robust-2026-06-14.md b/docs/analysis/holonomy-resonance-proof-not-robust-2026-06-14.md new file mode 100644 index 00000000..4b5bec97 --- /dev/null +++ b/docs/analysis/holonomy-resonance-proof-not-robust-2026-06-14.md @@ -0,0 +1,114 @@ +# Finding: the holonomy tri-language "resonance proof" is not robust + +**Date:** 2026-06-14 +**Status:** substrate finding (load-bearing for the CORE-Logos roadmap and the +field-as-reasoner research track). Triggered by W-Holonomy ("make the crown +proof legible in the Studio"): measuring the real geometry before building the +UI showed there is **no robust proof to make legible yet.** + +## Claim under test + +The "crown proof" of the three-language design (`HolonomyAlignmentCase`, +`language_packs/schema.py`): *aligned canonical clauses across Hebrew / Greek / +English produce nearby holonomies — closer than a misaligned negative — without +flattening their distinctions.* The flagship case is HAC-001: +`word/דבר/λόγος + beginning/ראשית/ἀρχή + truth/אמת/ἀλήθεια`, negative = truth→ζωή +(vitality). Encoding via `algebra.holonomy.holonomy_encode`; comparison metric +in question. + +## Measurements (deterministic; re-encode is bit-identical) + +**1. The engine's own metric (`holonomy_similarity` = CGA inner product) anti-correlates.** + +| pair | `holonomy_similarity` | +|---|---| +| anchor(en) ↔ aligned(he) | −14.49 | +| anchor(en) ↔ aligned(grc) | −159.93 | +| anchor(en) ↔ **negative**(grc, ζωή) | **+122.63** | + +Aligned mean **−87.2** vs negative **+122.6** → the *misaligned* clause scores as +**more** similar. The owned metric says the opposite of the claim. + +**2. The Euclidean norm "passes" only via an averaging artifact + one cherry-picked negative.** + +- aligned Greek alone: `‖en − grc_aligned‖ = 56.85` +- misaligned negative: `‖en − grc_ζωή‖ = 43.63` +- → the **aligned** Greek clause is **farther** from the anchor than the misaligned one. +- The original test passed only because it averaged in the close Hebrew distance + (`‖en − he‖ ≈ 29.3`): `mean(29.3, 56.85) = 43.07 < 43.63` — a **1.3%** margin. + +**3. Swapping the negative flips the verdict wildly** (per-component, grc 3rd token swapped): + +| negative token | `‖en − grc_neg‖` | aligned(56.85) closer? | margin | +|---|---|---|---| +| ζωή (vitality) | 43.63 | no | −23.3% | +| ἀρχή (beginning) | 25.71 | no | −54.8% | +| λόγος (word) | 68.40 | yes | +20.3% | + +## Conclusion + +The `HolonomyAlignmentCase` obligation is **decoration, not proof** by CLAUDE.md's +own bar (*Schema-Defined Proof Obligations*: "A test that passes under conditions +that bypass the obligation it nominally proves is decoration, not proof"). The +passing test `test_holonomy_alignment_case_positive_closer_than_negative` holds +only for one averaged configuration and one negative, at a 1.3% margin, and +inverts under equally-valid alternatives. Under the engine's own similarity +metric it inverts entirely. + +**Therefore:** +- A Studio "Holonomy proof-card" tab cannot be built honestly. Rendering a "holds" + verdict off this would be the impressive-but-ungrounded output CLAUDE.md forbids. + Holonomy stays **honest-absent** (`missing_evidence`) in the Studio — which is + exactly what LG-2/3/4 already do. Confirmed correct. +- The decoration test is **downgraded** (this PR) to assert only the true state — + the resonance does **not** robustly separate aligned from misaligned — so the + obligation is no longer silently green. It is a tripwire: if a future encoding + makes the resonance robust, the guard fails and must be replaced by a real proof + (and this doc updated). + +## What a real proof would require (research, not wiring) + +A legitimate holonomy resonance proof must robustly separate aligned from +misaligned across **many** clauses × **many** negatives, with a stable margin, +under a **single declared metric** (ideally the owned `holonomy_similarity`, or a +geometrically-justified alternative with a stated reason). The current encoding +does not do this even for the flagship example. This belongs in the deferred +**field-as-reasoner / content-stays-meaningful** research track, not the workbench +build. It is **not pitch-blocking** — holonomy is honestly absent regardless. + +## Open research questions (for a bounded, falsifiable spike) + +1. Is there a metric (normalized `holonomy_similarity`, geodesic distance on the + Spin manifold, …) under which aligned robustly > misaligned across a corpus? +2. Is the per-token `_position_rotor` injection drowning the semantic signal in + path-order geometry? (Aligned-grc being farther than a random negative hints + the encoding is dominated by something other than meaning.) +3. Does the proof need a *clustering* formulation (aligned clauses mutually close, + negative an outlier) rather than anchor-distance? + +Any spike here is bounded and falsifiable: "does construction X separate aligned +from misaligned across N×M with margin ≥ τ?" — answerable, not open-ended. + +## Tests downgraded in this PR + +Two tests asserted the holonomy-**clause** resonance as if proven; both are +downgraded to honest tripwires that assert the *true* state (aligned clause +farther than the misaligned negative) and will fail — pointing back here — if a +future encoding makes the resonance real: + +- `tests/test_alignment_graph.py::test_holonomy_alignment_resonance_is_not_yet_a_robust_proof` + (was `..._positive_closer_than_negative` — the `HolonomyAlignmentCase` + schema-defined obligation). +- `tests/test_holonomy_resonance.py::test_aligned_clause_holonomy_does_not_robustly_beat_misaligned` + (was `test_aligned_clauses_have_higher_similarity_than_unrelated` — the + identical averaged-distance artifact). + +**Not audited here (separate, narrower claim):** the *token-pair* `cga_inner` +resonance tests — `test_triple_alignment_closer_than_other_triples`, +`test_light_alignment_clusters_across_mounted_trilingual_field`, +`test_same_root_hebrew_forms_land_closer_than_unrelated_noun`, +`test_structured_morphology_improves_same_root_hebrew_resonance`. These compare +*individual versors* (not multi-token clause holonomies), a different and +narrower property than the clause-resonance proof above. They currently pass; +whether each is robust or another cherry-picked configuration is an open +follow-up, not covered by this finding. diff --git a/tests/test_alignment_graph.py b/tests/test_alignment_graph.py index 18eee7fe..466d57bf 100644 --- a/tests/test_alignment_graph.py +++ b/tests/test_alignment_graph.py @@ -69,21 +69,32 @@ def _encode(manifold, tokens: list[str]) -> np.ndarray: return holonomy_encode([manifold.get_versor(t) for t in tokens]) -def test_holonomy_alignment_case_positive_closer_than_negative(): - """ - Crown proof case: positive aligned triple must be geometrically closer - than the negative (misaligned) triple. +def test_holonomy_alignment_resonance_is_not_yet_a_robust_proof(): + """Pins the *true* state of the holonomy tri-language resonance: it does + NOT robustly separate aligned from misaligned clauses under the current + encoding. See docs/analysis/holonomy-resonance-proof-not-robust-2026-06-14.md. - This wraps the geometry proven in test_holonomy_resonance.py into the - formal HolonomyAlignmentCase schema type, so the proof is both - machine-checkable and linked to the schema's contract. + The prior `..._positive_closer_than_negative` test asserted a "crown proof" + that passed only by averaging in the close Hebrew distance and comparing to a + single cherry-picked negative (a ~1.3% margin) — decoration, not proof + (CLAUDE.md, Schema-Defined Proof Obligations). This guard asserts the actual + geometry so the obligation is never silently green: + + * the aligned Greek clause is itself FARTHER from the English anchor than + the misaligned negative, and + * the engine's own holonomy_similarity (CGA inner product) anti-correlates + (the misaligned clause scores as *more* similar). + + A future encoding/metric that makes the resonance genuinely robust SHOULD + make this guard fail — then replace it with a real proof and update the doc. + Until then the Studio renders holonomy as missing_evidence. """ case = HolonomyAlignmentCase( case_id="HAC-001", description=( - "Aligned Logos clause (word/דבר/λόγος + beginning/ראשית/ἀρχή + truth/אמת/ἀλήθεια) " - "produces closer holonomies across three languages than a misaligned clause " - "substituting ζωή (vitality) for ἀλήθεια (truth)." + "Aligned Logos clause; cross-language holonomy resonance is NOT yet a " + "robust proof - see " + "docs/analysis/holonomy-resonance-proof-not-robust-2026-06-14.md." ), source_refs=("Gen1:1", "John1:1", "John14:6"), pack_ids=("en_minimal_v1", "he_logos_micro_v1", "grc_logos_micro_v1"), @@ -91,42 +102,34 @@ def test_holonomy_alignment_case_positive_closer_than_negative(): negative_source_refs=("John1:4",), tolerance=0.0, ) - - # Validate the case schema itself assert case.case_id == "HAC-001" assert len(case.pack_ids) == 3 - assert len(case.source_refs) >= 2 - # Load packs _, en = load_pack("en_minimal_v1") - _, he = load_pack("he_logos_micro_v1") _, grc = load_pack("grc_logos_micro_v1") - # Positive triple: aligned canonical clause across all three languages en_h = _encode(en, ["word", "beginning", "with", "truth"]) - he_h = _encode(he, ["\u05d3\u05d1\u05e8", "\u05e8\u05d0\u05e9\u05d9\u05ea", "\u05d0\u05de\u05ea"]) - grc_h = _encode(grc, ["\u03bb\u03cc\u03b3\u03bf\u03c2", "\u1f00\u03c1\u03c7\u03ae", "\u1f00\u03bb\u03ae\u03b8\u03b5\u03b9\u03b1"]) + grc_aligned = _encode(grc, ["\u03bb\u03cc\u03b3\u03bf\u03c2", "\u1f00\u03c1\u03c7\u03ae", "\u1f00\u03bb\u03ae\u03b8\u03b5\u03b9\u03b1"]) + # Negative: replace truth with vitality - different semantic domain. + grc_negative = _encode(grc, ["\u03bb\u03cc\u03b3\u03bf\u03c2", "\u1f00\u03c1\u03c7\u03ae", "\u03b6\u03c9\u03ae"]) - # Negative: replace ἀλήθεια with ζωή — different semantic domain - grc_neg_h = _encode(grc, ["\u03bb\u03cc\u03b3\u03bf\u03c2", "\u1f00\u03c1\u03c7\u03ae", "\u03b6\u03c9\u03ae"]) - - # Positive score: distance from the English anchor to aligned clauses. - positive_dist = ( - np.linalg.norm(en_h - he_h) + - np.linalg.norm(en_h - grc_h) - ) / 2.0 - - # Negative score: distance from the English anchor to a Greek clause with - # the misaligned token. - negative_dist = np.linalg.norm(en_h - grc_neg_h) - - # The formal case assertion: aligned closer than misaligned - assert positive_dist < negative_dist, ( - f"HolonomyAlignmentCase {case.case_id} failed: " - f"positive_dist={positive_dist:.6f} >= negative_dist={negative_dist:.6f}. " - f"Case: {case.description}" + # Encoding is deterministic, so this finding is structural, not noise. + assert np.allclose( + grc_aligned, + _encode(grc, ["\u03bb\u03cc\u03b3\u03bf\u03c2", "\u1f00\u03c1\u03c7\u03ae", "\u1f00\u03bb\u03ae\u03b8\u03b5\u03b9\u03b1"]), ) + aligned_dist = float(np.linalg.norm(en_h - grc_aligned)) + negative_dist = float(np.linalg.norm(en_h - grc_negative)) + # The honest contradiction: aligned is NOT closer than the misaligned negative. + assert aligned_dist > negative_dist, ( + "Aligned Greek clause is now closer than the misaligned negative - the " + "resonance may have become real. Replace this guard with a proper proof " + "and update docs/analysis/holonomy-resonance-proof-not-robust-2026-06-14.md." + ) + # The owned similarity metric anti-correlates (misaligned scores higher). + assert holonomy_similarity(en_h, grc_negative) > holonomy_similarity(en_h, grc_aligned) + def test_holonomy_alignment_case_schema_validation(): """HolonomyAlignmentCase must reject under-specified instances.""" diff --git a/tests/test_holonomy_resonance.py b/tests/test_holonomy_resonance.py index 0547ca13..ae6edfe2 100644 --- a/tests/test_holonomy_resonance.py +++ b/tests/test_holonomy_resonance.py @@ -13,19 +13,32 @@ def _encode(manifold, tokens: list[str]) -> np.ndarray: return holonomy_encode([manifold.get_versor(t) for t in tokens]) -def test_aligned_clauses_have_higher_similarity_than_unrelated(): +def test_aligned_clause_holonomy_does_not_robustly_beat_misaligned(): + """Honest sibling of the HolonomyAlignmentCase guard in + tests/test_alignment_graph.py: the cross-language holonomy-CLAUSE resonance + is NOT robust. The aligned Greek clause is itself FARTHER from the English + anchor than the misaligned (vitality) negative; the prior assertion passed + only by averaging in the close Hebrew distance (~1.3% margin) — decoration, + not proof. See docs/analysis/holonomy-resonance-proof-not-robust-2026-06-14.md. + + NOTE: this is the holonomy-clause claim only. The token-pair cga_inner + resonance tests below assert a different, narrower property and are not + covered by that finding. + """ _, en = load_pack("en_minimal_v1") - _, he = load_pack("he_logos_micro_v1") _, grc = load_pack("grc_logos_micro_v1") en_clause = _encode(en, ["word", "beginning", "with", "truth"]) - he_clause = _encode(he, ["\u05d3\u05d1\u05e8", "\u05e8\u05d0\u05e9\u05d9\u05ea", "\u05d0\u05de\u05ea"]) - grc_clause = _encode(grc, ["\u03bb\u03cc\u03b3\u03bf\u03c2", "\u1f00\u03c1\u03c7\u03ae", "\u1f00\u03bb\u03ae\u03b8\u03b5\u03b9\u03b1"]) - grc_unrelated = _encode(grc, ["\u03bb\u03cc\u03b3\u03bf\u03c2", "\u1f00\u03c1\u03c7\u03ae", "\u03b6\u03c9\u03ae"]) + grc_aligned = _encode(grc, ["\u03bb\u03cc\u03b3\u03bf\u03c2", "\u1f00\u03c1\u03c7\u03ae", "\u1f00\u03bb\u03ae\u03b8\u03b5\u03b9\u03b1"]) + grc_misaligned = _encode(grc, ["\u03bb\u03cc\u03b3\u03bf\u03c2", "\u1f00\u03c1\u03c7\u03ae", "\u03b6\u03c9\u03ae"]) - aligned = (np.linalg.norm(en_clause - he_clause) + np.linalg.norm(en_clause - grc_clause)) / 2.0 - unrelated = np.linalg.norm(en_clause - grc_unrelated) - assert aligned < unrelated + aligned_dist = float(np.linalg.norm(en_clause - grc_aligned)) + misaligned_dist = float(np.linalg.norm(en_clause - grc_misaligned)) + assert aligned_dist > misaligned_dist, ( + "Aligned Greek clause is now closer than the misaligned negative - the " + "holonomy-clause resonance may have become real; replace this guard with a " + "proof and update docs/analysis/holonomy-resonance-proof-not-robust-2026-06-14.md." + ) def test_triple_alignment_closer_than_other_triples():