Research-Stack/0-Core-Formalism/lean/Semantics/Semantics/PIST
allaun 9cf0c77e4e feat(lean,infra): SilverSight-first offline PIST trace classifier
Moves all classification authority from Python into Lean:

- Adds `0-Core-Formalism/lean/Semantics/PistClassifyTrace.lean` executable.
  Reads a raw trace JSON and emits spectral radius, RRC shape, and tactic
  family using `Semantics.PIST.Spectral` and `Semantics.PIST.Classify`.
- Registers `pist-classify-trace` in `lakefile.toml`.
- Fixes `Semantics.PIST.Spectral` power iteration to handle directed
  transition matrices:
  - `symmetrize` now preserves half-integer weights as Q16_16 raw values.
  - `matVecMul` uses saturated Q16_16 arithmetic to prevent overflow.
- Rewrites `4-Infrastructure/shim/pist_trace_classify_offline.py` as a pure
  I/O wrapper: reads JSON, calls the Lean classifier, optionally calls
  `rrc-watchdog`, and emits the combined JSON. Removes Python-side spectral
  computation, shape thresholds, tactic heuristic, and KNN.
- Updates `AGENTS.md` and `4-Infrastructure/AGENTS.md` with the new build
  baseline and shim contract.

Verification:
- `lake build` → 8604 jobs, 0 errors
- Canary trace outputs match previous Python outputs to within Q16_16 rounding
  (e.g., apply_chain λ_q16 = 59044 vs 59045).
- `python3 -m py_compile` on the rewritten shim passes.
2026-06-22 01:11:17 -05:00
..
Classify.lean feat(lean,infra): Corpus278→250 rename + SLOS-calibrated braid defaults 2026-06-18 22:16:52 -05:00
Matrices250.lean feat(lean,infra): Corpus278→250 rename + SLOS-calibrated braid defaults 2026-06-18 22:16:52 -05:00
Motif.lean feat(lean): add ofRawInt_monotone + add_nonneg_monotone to FixedPoint; generalise Motif §6.2 2026-05-26 23:51:18 -05:00
Spectral.lean feat(lean,infra): SilverSight-first offline PIST trace classifier 2026-06-22 01:11:17 -05:00