mirror of
https://github.com/allaunthefox/Research-Stack.git
synced 2026-07-31 03:05:21 +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.5 KiB
1.5 KiB
| description | mode | model | permission | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Prove the energy surplus theorem in QFactor.lean by adding required Q16_16 lemmas. Use ONLY when asked to fix QFactor sorry. | subagent | anthropic/claude-sonnet-4-6 |
|
STATUS: RESOLVED — energyBalancePreserved sorry eliminated 2026-05-28. Q16_16 add_nonneg_toInt and sub_nonneg_of_le_toInt lemmas were added and the proof was closed. No remaining sorry in QFactor.lean.
Fix QFactor.lean sorry
Resolution
The sorry at line 175 (energyBalancePreserved) was eliminated by adding the required Q16_16 lemmas:
Q16_16.add_nonneg(both operands non-negative → sum non-negative on .toInt)Q16_16.sub_nonneg_of_le(a ≥ b → a - b ≥ 0 on .toInt)
The lemmas were added to the shared location or locally in QFactor.lean.
What to do (original instructions, kept for reference)
The sorry at line 175 (energyBalancePreserved) needs three lemmas:
Q16_16.add_nonneg: if a ≥ 0 and b ≥ 0 then a + b ≥ 0 (on .toInt)Q16_16.sub_nonneg_of_le: if a ≥ b then a - b ≥ 0 (on .toInt)- Bridge lemmas connecting
toIntthrough the UInt32 saturating arithmetic.
Steps
- Read
QFactor.leanlines 155-176 to understand the theorem and lemmas needed - Add
add_nonneg_toIntlemma (can copy from PistSimulation.lean or FixedPoint.lean) - Add
sub_nonneg_of_le_toIntlemma if not already available - Close the sorry
- Build:
lake build Semantics.QFactor - Build:
lake build Compiler