mirror of
https://github.com/allaunthefox/Research-Stack.git
synced 2026-07-30 18:56:16 +00:00
Editor rules updated (.cursorrules, .clinerules, copilot-instructions, .roo): - Build: 3571 jobs, 0 errors - Sorry inventory: 8 across 4 files (all documented) - Q16_16 compliance, new modules list, FPGA info - Fixed stale path in copilot-instructions Opencode agents: - 3 marked RESOLVED (pist-simulation, qfactor, ssms) - 2 new agents created (adjugate-matrix, hamiltonian-mechanics) - 1 updated (hyperbolic-statesurface) SORRY_AUDIT.md: updated to 8 sorries across 4 files
1.7 KiB
1.7 KiB
| description | mode | model | permission | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Prove the ACI preservation theorem in SSMS.lean by adding required Q16_16 triangle inequality lemmas. Use ONLY when asked to fix SSMS sorry. | subagent | anthropic/claude-sonnet-4-6 |
|
STATUS: RESOLVED — aciPreservedByMlgruStep sorry eliminated 2026-05-28. The proof was completed using abs_sub_comm, mul_mono_left, q16Clamp_id_of_inRange, and f_eps/omf_eps sub-lemmas. No remaining sorry in SSMS.lean.
Fix SSMS.lean sorry
Resolution
The sorry at line 576 (aciPreservedByMlgruStep) was eliminated. The proof uses:
abs_sub_commwith correct argument ordering (lines 559–571)f_epsandomf_epssub-lemmas proved viamul_mono_left+one_mul(lines 605–614)omf_toIntequality proved viaq16Clamp_id_of_inRange(lines 575–599)h_ft_rangehypothesis added to theorem signature (line 546)
What to do (original instructions, kept for reference)
The sorry at line 576 (aciPreservedByMlgruStep) needs Q16_16 lemmas:
- Triangle inequality:
abv_add_leor similar mul_le_of_nonneg_of_lesub_eq_add_negfor Q16_16
The blocker comment (lines 529-533) says: "Q16_16 uses saturating arithmetic over UInt32, which makes these algebraic lemmas non-trivial."
Approach
The simplest fix may be to prove a weaker version that works for the specific case: if all inputs are non-negative and in range, the saturating arithmetic behaves like standard integer arithmetic.
Steps
- Read
SSMS.leanaround lines 529-576 to understand the theorem - Assess which Q16_16 lemmas are missing
- Either add them locally or use existing lemmas
- Close the sorry
- Build:
lake build Semantics.SSMS - Build:
lake build Compiler