BioSight/python
openresearch 5117fcb4c7 feat(embed): exact arithmetic encoder, no floats in compute path
Replace the entire float-based encoding pipeline with exact arithmetic:
- _float_to_3bit (round(x*7)) -> sign-only quantization (G/T/C above/below uniform)
- compute_F (c/total float division) -> _compute_F_exact (Fraction(c, total))
- compute_tau (float weights) -> _compute_tau_exact (Fraction weights)
- New: p-adic valuations of raw character counts (primes 2,3,5)
- New: negative pi sequence (variable-name ordinals / pi)

Three techniques combined:
1. Asymmetric quantization: store signs in DNA (1 bit), keep magnitudes
   on the equation side (exact Fraction). Inspired by mixedbread's
   asymmetric quantization for retrieval.
2. P-adic valuations: partial logarithms of raw counts. Inspired by
   Kritchevsky's 'Everything Is Logarithms' — ν_p is the coefficient
   of log(p) in the prime factorization. Unique factorization = Sidon.
3. Negative pi sequence: sum of variable-name ordinals / pi, quantized
   in both positive and negative directions. Breaks collisions between
   equations identical at all structural levels but differing in
   variable names.

Result: 20/20 injectivity (0 collisions) on the test suite.
Previous float encoder: 17/20 (3 collisions).

Schema bumped to phi_embedding_v3.
All downstream API fields preserved (F, tau, delta as float display values,
dna_sequence as the exact encoding, consistency_dna unchanged).

EDICT: floats are the last resort. There is always machinery to
approximate them with exact arithmetic. This commit implements
that principle for the encoder.
2026-07-03 10:12:25 +00:00
..
7-Pipeline feat(dna): align layer naming and integrate SilverSight receipt verification 2026-06-27 22:51:03 -05:00
phi feat(embed): exact arithmetic encoder, no floats in compute path 2026-07-03 10:12:25 +00:00
equation_dna_encoder.py feat(test): implement verified test units matching Lean oracle witnesses 2026-06-27 23:20:23 -05:00
pyproject.toml feat(init): initial BioSight commit — equation-to-DNA Φ encoding 2026-06-23 18:27:35 -05:00