Skip to content

Comments

Add straight-line final state helpers to reduce proof boilerplate#61

Merged
jessealama merged 2 commits intomainfrom
code-simpliefier-straight-line-preservation
Jan 25, 2026
Merged

Add straight-line final state helpers to reduce proof boilerplate#61
jessealama merged 2 commits intomainfrom
code-simpliefier-straight-line-preservation

Conversation

@jessealama
Copy link
Owner

Summary

  • Adds three helper lemmas to StraightLine.lean that bundle the common 8-step proof pattern into 2-3 step proofs:
    • straight_line_transfer_final: For T instruction final value
    • straight_line_zero_final: For Z instruction final value
    • straight_line_preserves_final: For register preservation
  • Moves straight_lineFinalState_eq_of_halted from Composition/Helpers.lean to StraightLine.lean
  • Refactors 18+ theorems across PrimitiveRecursion/Preservation.lean and Minimization/Preservation.lean

Test plan

  • lake build passes (844 jobs)

jessealama and others added 2 commits January 24, 2026 22:48
Introduce three helper lemmas in StraightLine.lean that bundle the
common 8-step proof pattern into 2-3 step proofs:
- straight_line_transfer_final: T instruction final value
- straight_line_zero_final: Z instruction final value
- straight_line_preserves_final: register preservation

Also moves straight_lineFinalState_eq_of_halted from Composition/Helpers
to StraightLine.lean where it belongs.

Refactors 18+ theorems across PrimitiveRecursion/Preservation.lean and
Minimization/Preservation.lean to use these helpers, reducing total
line count by ~80 lines.
@jessealama jessealama merged commit 68440bf into main Jan 25, 2026
2 checks passed
@jessealama jessealama deleted the code-simpliefier-straight-line-preservation branch January 25, 2026 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant