BioSight/python/7-Pipeline/rigour_pipeline.py
allaun 295130c078 feat(dna): align layer naming and integrate SilverSight receipt verification
- 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)
2026-06-27 22:51:03 -05:00

40 lines
1.4 KiB
Python

import sys
import os
import json
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from phi.embed import encode_phi
def run_rigour_pipeline(expression):
print(f"--- Rigour Pipeline ---")
print(f"Input Expression: {expression}")
# 1. BioSight Encoding (DNA Signature)
dna_result = encode_phi(expression)
dna_sequence = dna_result["dna_sequence"]
print(f"DNA Signature: {dna_sequence} (Length: {len(dna_sequence)})")
# 2. Component Breakdown
print(f" - F_dna: {dna_result['F_dna']}")
print(f" - tau_dna: {dna_result['tau_dna']}")
print(f" - delta_dna: {dna_result['delta_dna']}")
print(f" - Consistency: {dna_result['consistency_dna']}")
# 3. Hand-off to Lean
print(f"Formalizing & Verifying with SilverSight...")
from phi.silversight import verify_pipeline_receipt
results = verify_pipeline_receipt()
overall = True
for check, passed in results.items():
print(f" - {check}: {'🟢 PASSED' if passed else '🔴 FAILED'}")
if not passed:
overall = False
status = "Verified" if overall else "Verification Failed"
print(f"Status: [DNA Signature -> Lean Proof Verification: {status}]")
if __name__ == "__main__":
if len(sys.argv) < 2:
print("Usage: python3 7-Pipeline/rigour_pipeline.py \"expression\"")
else:
run_rigour_pipeline(sys.argv[1])