YangBaxter.lean: the prior `yang_baxter_holds` was `rfl` over two alpha-equivalent
sums (literally X = X); even the intended R = B(x)B claim satisfies YBE vacuously
(B^2(x)B^2(x)B^2 on both sides, for any B). An exact rational search (ybe_sidon.py,
ybe_verify.py) showed the Sidon block admits no invertible, non-triangular R-matrix.
Replaced with `braid_relation_S8` -- the honest symmetric-group (S_n image of B_n,
Artin 1947) braid relation as a concrete 8x8 permutation-matrix identity, by `decide`
-- plus `braid_relation_falsifiable`, a negative control proving the statement is not
vacuous (a non-permutation gate breaks it). Both axiom-clean: no sorryAx, no
ofReduceBool (genuine kernel `decide`, not native_decide).
SidonMirrorNotch.lean (new): the mirror-projection spine, written from scratch (no
such file existed despite being cited). Mirror involution tau(a) = S - a, the
observerless difference-invariant, and the notch congruence
a == S - a [ZMOD l] <-> l | (2a - S).
Both files verified standalone via `lake env lean` (elan toolchain v4.30.0-rc2).
Known follow-up (next commit): UnifiedCovariant.lean re-exports the deleted
`yang_baxter_holds` and must be retired for a green full `lake build`.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Loads codebook/codeword/fingerprint/equation vertices with in_cluster,
shares_fingerprint and within_cartan_floor(fisher_distance) edges into
the mathblob/concepts graph, mirroring the Research Stack
load_module_graph.py conventions (pk partition key, coalesce upserts,
RU-throttle retry). Applied 2026-07-02: 273 vertices + 339 edges ok;
250 pre-existing equation vertices refreshed in place with exact values.
Docs note the Spark-side JDBC verification of ene.rrc_predictions.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
STEP 1 — integer spiral-index packing (EXACT): pack_spiral_index/
unpack_spiral_index with corpus-wide base=2·max|c|+1 and offset-encoded
digits, recorded in the codebook JSON header; round-trip verified over
all 250 matrices. Fixes the sign bug in integration_sprint.py's integer
path (unoffset signed packing collapsed (-1,1) with (1,0) in base 2).
STEP 2 — f(n) layout (DECORATIVE): per-entry radius_sq + angle_frac,
computed in decimal arithmetic (indices reach ~1e44 >> 2^52); verified
against VERIFICATION_LOG V007 f(20121); min angular separation ≈4.64e-6
of a turn reported.
STEP 3 — Cartan Δ-floor (--cartan-floor): Δ=17/1792 exact
(CartanConnection.lean:70) as Fisher-distance resolution floor on Δ₇;
13 sub-Δ pairs merge 196 fingerprints into 187 Δ-resolution codewords
vs 9 gap-rule clusters; emitted alongside, not replacing, the 3×-median
rule. Caveat asserted in tests: the |c|/Σ|c| simplex projection is
lossy (one corpus pair at Fisher distance 0) — similarity, not identity.
STEP 4 — torus-winding saturation fix: TorusWinding gains
a_exact/b_exact (plain ℤ, no Q16.16 clamp); torus_to_spiral_index
prefers them, making the round trip lossless (regression-tested at
n=1e9). BraidEigensolid.lean needs the same widening — noted, Lean
untouched.
Also corrects charpoly_codebook.py's stale docstring counts (192/180 →
196/182, cross-checked against the exact Faddeev–LeVerrier fingerprints:
identical on all 250 matrices).
Tests: 43 passed (19 new).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds python/spectral_codebook_db.py: sync codebook rows into
ene.rrc_predictions on the neon-64gb Postgres (NEON_PG convention from
scripts/auto/auto_pipeline.py, default research_stack DB).
- Row shape (flat, SQL-typed, Spark-JDBC readable): equation_id,
proxy_pred = cluster codeword C0..C8, exact_pred = shape from exact
lambda under CURRENT ClassifyN.lean thresholds (1.5/4.0 Q16.16,
integer semantics mirrored), matrix_hash =
'charpoly=<c1..c8>;pos10=<base-10 positional hash>' (similarity +
injective identity keys), confidence = 1.0 unique fingerprint / 1/k
in k-way charpoly collision class; deterministic uuid5 ids so reruns
upsert idempotently.
- SAFE BY DEFAULT: dry run prints summary + sample SQL and writes
nothing; --apply required to insert (psycopg2, with --emit-sql
data/spectral_codebook_sync.sql fallback when the driver is absent).
--apply has NOT been run; live DB untouched. --verify-schema does a
read-only column check; schema verified offline against
scripts/auto/ene_schema.sql in tests (live check left to the user
per the ask-before-DB-work rule).
- spectral_codebook.py gains --sync-db (always dry-run from that entry
point). Dry-run counts: 250 rows; C0=35 C1=20 C2=13 C3=79 C4=29
C5=15 C6=22 C7=19 C8=18; Logogram=69 Signal=131 CognitiveLoad=50;
183 rows at confidence 1.0.
- docs: 'Neon data layer' section — ENE table map, stale
ene.rrc_classifications finding (120 rows with artifact spectral
radii 0.3-0.85 predating the exact-eigenvalue fix; recommend
re-classification via this codebook), empty landing tables, Spark
JDBC snippet, arxiv-pg (podman-exec only) citation layer note.
- tests: 8 new dry-run/no-network tests (23 total).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Implements the Next Steps of docs/SPECTRAL_CODEBOOK_ANALYSIS.md as
python/spectral_codebook.py (stdlib-only; NumPy optional fast path):
- Parses the 250 8x8 braid adjacency matrices from PIST/Matrices250.lean.
- Primary fingerprint: exact integer characteristic-polynomial
coefficients via Faddeev-LeVerrier in Fraction arithmetic (196 unique
over 238 distinct matrices, vs 179 unique lambda at 4dp; 6 cospectral
non-identical groups; 11 exact-duplicate matrix groups / 23 ids).
- Corrects the analysis doc: the 9 'mid band' lambda in (0.5,1) are
power-iteration non-convergence artifacts - exact rho = 1.0 for all 9
(peripheral spectra). spectral_radius is now the exact max root
modulus (numpy eigvals or Durand-Kerner on the exact char poly);
power-iteration lambda kept only for traceability.
- Gap-aware quantization: dedupe to 238 distinct matrices, boundaries at
gaps > 3x median gap, min-support guard (>=10 distinct per cluster),
sparse-tail outlier flagging above lambda ~= 7.66. Result: 9 clusters.
- Round trip encode(matrix) -> (codeword, index) -> decode -> equation_id
verified bijective over all 250 in tests/test_spectral_codebook.py.
- 278-row RRC/Q16_16Manifold corpus: 28 extra rows are repeated ids;
boundaries reproduce exactly, no new gaps or clusters.
- Emits data/spectral_codebook.json (schema spectral_codebook_v2) with
explicit collision classes; docs/SPECTRAL_CODEBOOK_GENERATOR.md notes
the hashMatrix base-5 injectivity gap and the ClassifyN threshold
(1.5/4.0 Q16.16) vs analysis-doc (0.5/1.0) mismatch.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>