SilverSight/docs/LIBRARY_MANIFEST.md
Allaun Silverfox 57bcd2ed7a Add SilverSight Core + Library Manifest + RRC placement
- Core/SilverSightCore.lean: 200-line minimal core
  * 8 Hachimoji states (classification alphabet)
  * Receipt format (core-library interface)
  * AVM transition function delta : S x I -> S'
  * TIC axiom (derived, not driver)
  * Loop invariant: computation generates time
  * Library interface: Library := String -> Receipt
  * Receipt validators (format, consistency, state validity)

- docs/LIBRARY_MANIFEST.md: 8-library architecture map
  * LexLib, SearchLib, MetricLib, QUBOLib
  * StructureLib, PVGSLib, EventLib, AuditLib
  * Key rule: libraries import core only, never each other

- docs/RRC_PLACEMENT.md: RRCLib positioning
  * RRC is its own library (not AuditLib, not SearchLib)
  * 3 gates: type, projection, merge (H-KdF polynomial evaluation)
  * Meta-level: receipts about receipts (hash chain)
  * Rainbow = 3 color channels, Compiler = receipt -> verdict
2026-06-21 05:59:43 -05:00

103 lines
3.3 KiB
Markdown

# SilverSight Library Manifest
## Core (SilverSightCore.lean — 200 lines)
**Defines:** HachimojiState, Receipt, Instruction, δ, TIC axiom, loop invariant
**Imports:** Nothing (only Std/Mathlib basics)
**Policy:** Never imports a library. Never depends on external code.
---
## Library Map
Each library imports the core. None are imported by the core.
```
SilverSightCore.lean
┌────────────────┼────────────────┐
│ │ │
LexLib.lean SearchLib.lean StructureLib.lean
(tokenizing) (chaos game) (chirality)
│ │ │
┌────┴────┐ ┌────┴────┐ ┌────┴────┐
│ │ │ │ │ │
MathLib AuditLib QUBOLib PVGSLib EventLib MetricLib
(tokens) (verify) (route) (quant) (count) (finsler)
│ │ │ │ │ │
└─────────┴──────┴─────────┴─────┴─────────┘
SilverSight.lean
(orchestrator)
```
---
## Library Descriptions
### LexLib — Tokenization Library
**Input:** String (LaTeX or ASCII math expression)
**Output:** List MathToken + Receipt
**Maps to:** Your `UniversalMathEncoding.lean`, `expressionToReceipt`
### SearchLib — Chaos Game Library
**Input:** MathExpressionAddress
**Output:** HachimojiState + Receipt (with convergence info)
**Maps to:** Your `chaos_game.py`, `sidon_address.py`, `spectral_profile.py`
### MetricLib — Finsler Metric Library
**Input:** Two HachimojiStates
**Output:** Distance + Receipt
**Maps to:** Your `finsler_metric.py`
### QUBOLib — Optimization Router
**Input:** Source HachimojiState, target HachimojiState
**Output:** Optimal path + Receipt
**Maps to:** Your `qubo_builder.py`, `qaoa_circuit.py`, `classical_solver.py`
### StructureLib — Chirality Classifier
**Input:** HachimojiState + token list
**Output:** ChiralClassification + Receipt
**Maps to:** Your `ChiralitySpace.lean`
### PVGSLib — Quantum Sensing Bridge
**Input:** Photon-varied Gaussian state parameters
**Output:** DualQuaternion energy + Receipt
**Maps to:** Your `PVGS_DQ_Bridge_fixed.lean`
### EventLib — TIC Counter
**Input:** List Instruction (executed)
**Output:** Nat (TIC count) + Receipt
**Maps to:** Implicit in chaos game iteration count
### AuditLib — Receipt Validator
**Input:** Receipt
**Output:** Bool (valid/invalid) + verification trace
**Maps to:** Your `pvgs_receipt_hash.py`, hash-chain verification
---
## The Key Rule
**No library ever imports another library.** Each library only imports the core.
If libraries need to compose, they do so through the orchestrator layer, not by direct dependency.
```lean
-- Library A: imports Core only
import SilverSightCore
-- Library B: imports Core only
import SilverSightCore
-- NOT this:
-- import LibraryA -- FORBIDDEN
-- Orchestrator: imports Core + all libraries
import SilverSightCore
import LexLib
import SearchLib
-- ... etc
```
This is what prevents the "hairy" problem. The core is 200 lines and never changes. Libraries come and go. The core doesn't care.