Research-Stack/4-Infrastructure/shim
Brandon Schneider d1017fbbbd feat(lean): port receipt-density scoring to Semantics.RRC.ReceiptDensity
Adds Semantics/RRC/ReceiptDensity.lean — a new Lean module that ports
the entire scoring pipeline from pist_receipt_density_injector.py into
Lean-native Q16_16 fixed-point arithmetic:

  spectralQuality   ← spectral_quality()   (0.24/0.18/0.18/0.12/0.12/0.16 weights)
  shapeAgreement    ← shape_agreement()    (exact=1.0, proxy=0.82, any=0.35)
  axisScore         ← axis_score()         (hits/4, capped at 1.0)
  statusScore       ← status_score()       (BLOCKED=0, HOLD=0.12 … VERIFIED=0.84)
  computeDensity    ← compute_density()    (density: 26/24/26/24, confidence: 20/20/28/32)

No Float in compute paths — all arithmetic is Q16_16 (raw Int, scale=65536).
Two #eval witnesses verify CANDIDATE/VERIFIED case outputs.

Build: lake build Compiler → 3311 jobs, 0 errors (baseline preserved).

Update shim BOUNDARY comments:
  pist_receipt_density_injector.py → Semantics.RRC.ReceiptDensity
  rrc_pist_shape_alignment.py      → Semantics.RRC.Emit

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-26 22:48:55 -05:00
..
authentik_agent_manager WIP: accumulated changes 2026-05-25 16:24:21 -05:00
lake_compile_bridge style(compile-bridge): format GPU verifier 2026-05-20 18:46:49 -05:00
netwatch WIP: accumulated changes 2026-05-25 16:24:21 -05:00
tang9k_ipc_worker WIP: accumulated changes 2026-05-25 16:24:21 -05:00
batch_embed_artifacts.py refactor(rds): consolidate 14 psycopg2 connect patterns into shared rds_connect module 2026-05-26 15:09:34 -05:00
beaver_mask_freshness_negative_controls.py Stage stack solidification source slice 2026-05-11 22:08:10 -05:00
build_corpus278.py feat(rrc): 278-equation corpus — AVM sole output boundary, RRC classifier feeds it 2026-05-26 22:23:56 -05:00
clean_rrc_pist_validation.py feat(pist): add RRC PIST validation report cleaner 2026-05-26 15:38:07 -05:00
combined_theorems.py feat(pist): scaled Tier 2B batch — 21/64 theorems, RRCShape 71.4% 2026-05-26 10:34:32 -05:00
compare_tier1_vs_tier2.py feat(pist): Tier 2 beats Tier 1 on 5/6 independent targets 2026-05-26 09:57:10 -05:00
credential_loader.py refactor(rds): consolidate 14 psycopg2 connect patterns into shared rds_connect module 2026-05-26 15:09:34 -05:00
dataset_ingest_rds.py refactor(rds): consolidate 14 psycopg2 connect patterns into shared rds_connect module 2026-05-26 15:09:34 -05:00
decompose_tier2b_traces.py feat(pist): Tier 2B spectral decomposition — first real proof-path spectra 2026-05-26 03:08:05 -05:00
ene_migrate_and_tag.py cleanup(ene): remove hardcoded schema path, drop inline schema fallback, add legacy shim strip receipt 2026-05-26 16:22:40 -05:00
ene_substrate_schema.sql Expand devcontainer with full Python stack, add MCP servers (Notion/AWS), strengthen Lean theorems 2026-05-19 01:52:14 -05:00
ene_wiki_body_reingest.py refactor(rds): consolidate 14 psycopg2 connect patterns into shared rds_connect module 2026-05-26 15:09:34 -05:00
failure_flexure_bank.py feat(pist): Route-Repair v1.1 — 60 failure flexures ingested, obstruction-type voting 2026-05-26 12:17:42 -05:00
genus0_sphere_shell_demo.py feat(pist): add genus-0 sphere shell projection demo 2026-05-26 14:10:17 -05:00
gpu_fpga_ipc_symbol_surface.py WIP: accumulated changes 2026-05-25 16:24:21 -05:00
hutter_jxl_starfield_eigenprobe.py Stage JXL starfield replay slice 2026-05-11 22:08:44 -05:00
hutter_jxl_starfield_replay_verify.py Stage JXL starfield replay slice 2026-05-11 22:08:44 -05:00
ingest_57_flexures.py refactor(rds): consolidate 14 psycopg2 connect patterns into shared rds_connect module 2026-05-26 15:09:34 -05:00
ingest_flexure_joints.py feat(pist): flexure features v2 — full spectral profile per joint 2026-05-26 11:00:31 -05:00
joint_classifier.py refactor(rds): consolidate 14 psycopg2 connect patterns into shared rds_connect module 2026-05-26 15:09:34 -05:00
label_canary_theorems.py chore(infra): stage pist canary labeling and training shims + flexure report 2026-05-26 22:32:13 -05:00
lean_trace_bridge.py feat(pist): Tier 2 trace bridge — tactic-level goal transitions 2026-05-26 02:28:16 -05:00
lean_trace_bridge_v2.py feat(pist): 57/64 theorem batch — 89.5% proof status LOOCV 2026-05-26 11:20:17 -05:00
Modelfile.gemma-physics-math Track remaining source and documentation inventory 2026-05-11 22:18:31 -05:00
pist_canary_batch.py feat(pist): canary batch — 42 real Lean theorems through full pipeline 2026-05-26 02:09:08 -05:00
pist_classify.py refactor(rds): consolidate 14 psycopg2 connect patterns into shared rds_connect module 2026-05-26 15:09:34 -05:00
pist_enrich_and_train.py chore(infra): stage pist canary labeling and training shims + flexure report 2026-05-26 22:32:13 -05:00
pist_prove_and_classify.py refactor(rds): consolidate 14 psycopg2 connect patterns into shared rds_connect module 2026-05-26 15:09:34 -05:00
pist_receipt_density_injector.py feat(lean): port receipt-density scoring to Semantics.RRC.ReceiptDensity 2026-05-26 22:48:55 -05:00
pist_route_repair.py feat(pist): Route-Repair Loop v1 — 11% recovery rate 2026-05-26 11:38:01 -05:00
pist_trace_classify_mcp.py refactor(rds): consolidate 14 psycopg2 connect patterns into shared rds_connect module 2026-05-26 15:09:34 -05:00
pist_trace_decompose.py feat(pist): Tier 2 trace canary — 24 multi-tactic Lean theorems 2026-05-26 02:37:22 -05:00
pist_train.py feat(pist): validation + calibration harness 2026-05-26 01:49:21 -05:00
pist_train_ground_truth.py chore(infra): stage pist canary labeling and training shims + flexure report 2026-05-26 22:32:13 -05:00
rds_connect.py refactor(rds): consolidate 14 psycopg2 connect patterns into shared rds_connect module 2026-05-26 15:09:34 -05:00
route_repair_v11.py feat(pist): Route-Repair v1.1 — 60 failure flexures ingested, obstruction-type voting 2026-05-26 12:17:42 -05:00
route_repair_v12.py feat(pist): Route-Repair v1.2 — 36% recovery from 0% 2026-05-26 12:38:17 -05:00
route_repair_v13a.py feat(pist): Route-Repair v1.3a — PIST-NUVMAP database-backed ranking 2026-05-26 12:49:29 -05:00
route_repair_v13b.py feat(pist): v1.4a — 100% recovery across 35 theorems 2026-05-26 14:03:59 -05:00
route_repair_v14.py feat(pist): Route-Repair v1.4 — 71% recovery 2026-05-26 13:09:37 -05:00
route_repair_v14a.py chore: remove unused import subprocess from v14a (handled by rds_connect) 2026-05-26 15:11:11 -05:00
routing_benchmark.py feat(pist): routing benchmark — 30% tactic family prediction vs 20% baseline 2026-05-26 11:28:05 -05:00
rrc_pist_shape_alignment.py feat(lean): port receipt-density scoring to Semantics.RRC.ReceiptDensity 2026-05-26 22:48:55 -05:00
run_scaled_trace.py feat(pist): scaled Tier 2B batch — 21/64 theorems, RRCShape 71.4% 2026-05-26 10:34:32 -05:00
run_trace_canary.py feat(pist): Tier 2 trace canary — 24 multi-tactic Lean theorems 2026-05-26 02:37:22 -05:00
run_trace_v2_canary.py feat(pist): Tier 2B — instrumented trace bridge with real transition matrices 2026-05-26 02:56:46 -05:00
seed_flexure_dataset.py refactor(rds): consolidate 14 psycopg2 connect patterns into shared rds_connect module 2026-05-26 15:09:34 -05:00
stack_fail_closure_register.py Stage stack solidification source slice 2026-05-11 22:08:10 -05:00
stack_solidification_audit.py Stage stack solidification source slice 2026-05-11 22:08:10 -05:00
sync_wiki_to_rds.py refactor(rds): consolidate 14 psycopg2 connect patterns into shared rds_connect module 2026-05-26 15:09:34 -05:00
tang9k_uart_beacon_probe.py Stage stack solidification source slice 2026-05-11 22:08:10 -05:00
test_pist_receipt_density_injector.py test(pist): add receipt-density injector regression harness 2026-05-26 15:16:40 -05:00
trace_canary_theorems.py feat(pist): Tier 2 trace canary — 24 multi-tactic Lean theorems 2026-05-26 02:37:22 -05:00
validate_receipt_density_sidecar.py feat(pist): add receipt-density sidecar readback validator 2026-05-26 15:18:11 -05:00
validate_rrc_predictions.py feat(pist): receipt canonicalization v2 with structural math features 2026-05-26 01:55:09 -05:00