Critical bug fix: dna_codec.py used biological base ordering (ATGCBSPZ)
instead of ASCII-ordered spec ordering (ABCGPSTZ). This violated the core
monotonicity axiom (int rank = lexicographic rank) that the entire monotone
LUT pipeline depends on.
Changes:
- python/dna_codec.py: BITS_TO_BASE, HACHIMOJI_BASES, LATIN_TO_GREEK
corrected to ABCGPSTZ ordering; encode_binary_vector parameter renamed
bases_per_var; module docstring updated
- tests/test_dna_codec.py: hardcoded byte→DNA expectations updated for new
ordering (0xFF→ZZT, 0xd1→TPC); bases_per_var parameter name updated;
31/31 tests green
- formal/CoreFormalism/HachimojiLUT.lean: replace fragile
canonical_phases_preserved.2.2.2.2.2.1 chains with named obtain
destructuring in pythagorean_position and contradiction_position
- docs/UNIFIED_THEORY.md: add ground-truth caveat to epigenetic optimizer
results table (n≥24 results are local optima, not verified global minima)
Note: test_dna_nn.py has 4 pre-existing failures (Ising chain correlations)
unrelated to this fix — dna_qubo_nn.py has its own base encoding and does
not import dna_codec.py.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Ports three Research Stack RRC gates into formal/SilverSight/RRC/ using the existing CoreFormalism braid and Q16_16 surfaces.
Adds a Lean ↔ C ↔ Python Q16_16 roundtrip test:
- c/q16_canonical.c: canonical saturating Q16_16 C library
- exe/Q16_16Roundtrip.lean: Lake extern_lib linked executable
- tests/test_q16_roundtrip.py: Python ↔ C harness (revived from quarantine)
Updates lakefile.lean with q16-roundtrip executable and extern_lib q16_canonical.
Build: lake build SilverSightRRC 3006 jobs, 0 errors; q16-roundtrip 5949 jobs, 0 errors