Research-Stack/.opencode/agents/resolve-canon-serialization.md
Brandon Schneider ede983168c feat(lean): complete goldenContractionEnergyDecrease proof + PIST predictions pipeline v2
- PistSimulation.lean: proven goldenContractionEnergyDecrease (no sorry)
  7 supporting lemmas, h_u'_nonneg + h_pt hypothesis, fold induction
- Connectors.lean: restored zeroIsVoid theorem with Q16_16 proof
- CanonSerialization.lean: removed dead theorem, documented blocker
- FixedPointBridge.lean: eliminated Float from compute paths

PIST predictions pipeline:
- pist_matrix_builder.py: reproducible matrix-only builder (SHA256)
- build_pist_matrices_278.py: generates PIST/Matrices278.lean
- PIST/Classify.lean: classifyProxy/classifyExact stubs (v2 surface)
- PIST/Matrices278.lean: 250-entry matrix HashMap
- build_corpus278.py: reads predictions artifact, uses classify*
- Pipeline contract documented in root AGENTS.md

Cleanup:
- Archived 5 orphan pist_* shims, 5 old route_repair variants
- Quarantined PIST/Repair.lean (no external callers)
- Created 4 opencode agents for remaining TODO items

Build: PistSimulation 3309, Compiler 3313, Full 3571 (0 errors)
2026-05-27 12:40:16 -05:00

1.1 KiB

description mode model permission
Resolve the "implement or remove" TODO(lean-port) in CanonSerialization.lean. Use ONLY when asked to clean up CanonSerialization or resolve ambiguous TODO markers. subagent anthropic/claude-sonnet-4-6
edit bash read
allow allow allow

Resolve CanonSerialization TODO

Context

Semantics/CanonSerialization.lean has two TODO(lean-port) markers:

  • Line 265: TODO(lean-port): Implement canonicalize function or remove this theorem.
  • Line 327: TODO(lean-port): Re-enable when proof is completed.

What to do

  1. Read Semantics/CanonSerialization.lean fully.
  2. For line 265: Determine whether canonicalize is needed or the theorem can be removed.
    • Check if any module imports or references CanonSerialization symbols.
    • If no callers exist and the function is not part of an active pipeline, remove the theorem and the TODO.
  3. For line 327: Check if the proof blocker has been resolved. If not, add a specific description of what's needed.
  4. Run lake build Compiler to verify no build breaks.
  5. Run lake build to verify full workspace.