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>