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.
- Aligned layer naming and numbering (1 to 4) with the formal Lean specifications in SilverSight.
- Implemented phi.silversight to verify rule ordering, N=8 necessity, and Lean compilation status.
- Integrated SilverSight validation checks into equation_dna_encoder.py and rigour_pipeline.py.
Build: 3307 jobs, 0 errors (lake build)