SilverSight/python/phi/__init__.py
allaun 1794299a6c chore(quality): native_decide migration, docs, and phi pipeline cleanup
Systematic native_decide → dec_trivial/rfl migration across all Lean modules
to comply with AGENTS.md rule 5 (no native_decide unless only option):
- CoreFormalism: BraidEigensolid, BraidField, ChentsovFinite, HachimojiBase,
  HachimojiBridging, HachimojiCodec, HachimojiLUT, HachimojiManifoldAxiom,
  Q16_16Numerics
- BindingSite: BindingSiteCodec, BindingSiteEntropy, BindingSiteHachimoji
- SilverSight: ProductSchema, ProductWireFormat, PolyFactorIdentity, Schema, WireFormat
- PVGS_DQ_Bridge: all three files (native_decide->dec_trivial)
- UniversalEncoding/ChiralitySpace

Additional changes:
- gemma4_mcp.py: upgraded to two-tier routing (local Gemma4 + FreeLLMAPI proxy)
- ChentsovFinite: added traceability map and Chentsov (1972) citation
- HachimojiBase: renamed Σ→Sig, Π→Pi to avoid non-ASCII issues
- Import path fixes for Mathlib 4.30.0-rc2 compatibility
- Doc updates: PURE_FORMULAS, SOS_CERTIFICATE, fundamental math derivations
- Build log: 2026-06-26 session findings
- BRKGLASS_NR_BRACKET_PROPOSAL: updated to REAL-DATA VALIDATED status
- New docs: FOUNDATIONAL_GUIDANCE, PURE_EQUATION_MAP, CHENTSOV_FINITE_MATH,
  BREAKGLASS_FUSION_REVIEW_SPEC, COLD_REVIEWER_FORMULA
- New python: phi pipeline (equation_dna_encoder, ast_parse, charclass,
  consistency, embed, output), nr_bracket_validation with receipt

Build: lake build SilverSightRRC — passes on all committed modules.
  Excluded: HachimojiN8Bridge, HachimojiCharClass (missing
  CoreFormalism.HachimojiManifoldAxiom olean — WIP)
2026-06-27 01:56:54 -05:00

22 lines
841 B
Python

"""
phi — SilverSight Equation-to-DNA Φ Encoding Pipeline
Independent modules, each reusable without the others:
charclass Layer 1: 8-class byte histogram → Δ₇
ast_parse Layer 3: AST parsing → τ and δ distributions
consistency Layer 4: 6 consistency rules → ADMIT/QUARANTINE
embed Core Φ: (F, τ, δ) → 30-base hachimoji DNA sequence
output FASTQ, Adleman graph, PCR primer protocol
Usage:
from phi import encode_phi
result = encode_phi("d_F(p,q) = 2*arccos(sum(sqrt(p_i*q_i)))")
print(result["dna_sequence"])
"""
from .embed import encode_phi
from .output import to_fastq, to_adleman_graph, design_filtering_protocol, PRIMER_DESIGN
from .charclass import compute_F
from .ast_parse import compute_tau, compute_delta
from .consistency import check_consistency, CONSISTENCY_RULES