Replace split_ifs patterns with grind tactic#58
Merged
jessealama merged 4 commits intomainfrom Jan 22, 2026
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.