mirror of
https://github.com/allaunthefox/Research-Stack.git
synced 2026-07-31 03:05:21 +00:00
Ports the motif scoring surface from pist_trace_classify_mcp.py (lines 136–149)
into a provable Lean module:
score = frequency / max(library_size, 1) + (0.3 if tactic_family matches)
New module: Semantics.PIST.Motif (201 lines)
§1 familyMatchBonus constant (ofRatio 3 10 = 19660 raw)
§2 MotifInputs, baseScore, motifScore
§3 MotifCandidate record, mkCandidate constructor
§4 rankMotifs / topKMotifs (mergeSort desc, motifId tie-break)
§5 8 executable #eval witnesses with -- expect: annotations
§6 6 proved invariants:
motifScore_bonus_pos (decide)
motifScore_match_ge_base_witness (decide, concrete)
motifScore_zero_freq_base (simp)
motifScore_zero_freq_no_match (simp)
motifScore_zero_freq_match_witness (decide, concrete)
rankMotifs_match_beats_no_match (native_decide — mergeSort sort witness)
Full workspace build: 3570 jobs, 0 errors.
pist_trace_classify_mcp.py PARTIAL BOUNDARY updated: motif score + rank order
now explicitly point to Semantics.PIST.Motif as authoritative.
Generated with [Devin](https://cli.devin.ai/docs)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
||
|---|---|---|
| .. | ||
| core | ||
| lean | ||
| otom | ||
| receipts | ||
| rust/ftdi_gimbal | ||
| README.md | ||
0-Core-Formalism
Purpose: Formal foundations for the entire Research Stack — Lean modules, bind primitive, Triumvirate consensus, core source.
No external dependencies. All other layers depend on this.
Contents (Target)
| Source | Destination |
|---|---|
0-Core-Formalism/lean/Semantics/ |
0-Core-Formalism/lean/Semantics/ |
core/ |
0-Core-Formalism/core/ |
Concepts
- bind — State → (State → Action) → State
- TriumvirateClock — ternary consensus (ADD/PAUSE/SUBTRACT)
- Builder/Judge/Warden — roles mapped to hardware registers
- OTOM — Ordered Transformation & Orchestration Model
Build
cd "0-Core-Formalism"
lake build