Skip to content

Comments

Replace split_ifs patterns with grind tactic#58

Merged
jessealama merged 4 commits intomainfrom
grind-compression
Jan 22, 2026
Merged

Replace split_ifs patterns with grind tactic#58
jessealama merged 4 commits intomainfrom
grind-compression

Conversation

@jessealama
Copy link
Owner

No description provided.

Use grind to simplify embedding lemmas and arithmetic proofs
that previously used split_ifs with omega/rfl/simp fallbacks.

Key replacements:
- split_ifs <;> first | rfl | omega → grind
- split_ifs <;> first | omega | (congr 1; omega) → grind
- split_ifs followed by simp/congr → grind

Files: PrimitiveRecursion/Halting, Minimization/Halting,
Arithmetic, PartrecPrime
Use grind to simplify case analysis proofs that previously used
simp_all or simp followed by omega.

Files: Execution, StandardForm, Shift, Concat, Composition/Core
Mark length calculation definitions as @[simp] lemmas:
- PrimitiveRecursion/Construction.lean: pr_setup_phase_length,
  pr_base_case_prologue_length, pr_base_case_phase_length,
  pr_loop_prologue_length, pr_loop_epilogue_length, pr_loop_body_length
- Minimization/Construction.lean: setup_phase_length, loop_prologueLength

This allows simp to automatically unfold these definitions when not
using simp only, which simplifies writing new proofs that involve
length calculations.
Add is_straight_line_append, is_straight_line_cons, is_straight_line_singleton,
and Instr.*_is_non_jumping lemmas to StraightLine.lean. These provide reusable
building blocks for proving composite programs are straight-line.

Update Preservation.lean files in Minimization and PrimitiveRecursion to use
the new composition lemmas, making the proof structure more explicit.
@jessealama jessealama merged commit ee01a64 into main Jan 22, 2026
2 checks passed
@jessealama jessealama deleted the grind-compression branch January 22, 2026 10:34
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