Fix all Lean build warnings

- Update deprecated lemmas (ite_eq_left/right, ENat casts, List.Sublist, ...)
- Replace push_neg with push Not and resolve unused-variable warnings
- Convert flexible simp/simp_all calls to explicit simp only lists
- Remove unscoped maxHeartbeats options, open scoped Classical, and unused tactics
- Add missing module docstrings and clean up style linter hits
- Wrap over-long lines and flatten the deeply nested
  minimal_conflictRangeClosedForm_total proof

`lake build` now completes with zero warnings.
This commit is contained in:
andrew committed 2026-11-17 10:04:35 -05:00
1 parent a54a5f82f8
commit af318a7d32
51 files changed
+2542 -1357

No files matched your search

+7 -7
View File
@@ -60,24 +60,24 @@ theorem minimal_closedForm_of_offset_one_total {r : RangeRead} {res : Result}
Minimal r res (closedFormOffsetOneTotal r res) := by
unfold closedFormOffsetOneTotal
by_cases hcross : r.end_.key < r.begin.key
· rw [if_pos hcross]
· rw [ite_eq_left hcross]
by_cases hmore : res.more = true
· rw [if_pos hmore]
· rw [ite_eq_left hmore]
have hend := crossed_end_offset_ge_two_truncated hread hmore (by omega) hcross
by_cases hrev : r.reverse = true
· rw [if_pos hrev]
· rw [ite_eq_left hrev]
exact minimal_closedForm_of_offset_one_truncated_rev_fullC_crossed hread hmore
hrev hbegin hcross hend
· rw [if_neg hrev]
· rw [ite_eq_right hrev]
have hrevf : r.reverse = false := by
cases hr : r.reverse <;> simp_all
exact minimal_truncatedForwardClosed_of_crossed hread hmore hrevf hne hbegin
hcross hend
· rw [if_neg hmore]
· rw [ite_eq_right hmore]
have hfalse : res.more = false := by
cases hm : res.more <;> simp_all
exact minimal_completeClosed hread hfalse hne hbegin
· rw [if_neg hcross]
· rw [ite_eq_right hcross]
have hcf : r.begin.key ≤ r.end_.key := not_lt.mp hcross
exact minimal_closedForm_of_offset_one_universal hread hne hbegin hcf
@@ -103,6 +103,6 @@ theorem closedFormOffsetOneTotal_eq_universal {r : RangeRead} {res : Result}
(hcross : r.begin.key ≤ r.end_.key) :
closedFormOffsetOneTotal r res = closedFormOffsetOneUniversal r res := by
unfold closedFormOffsetOneTotal
rw [if_neg (not_lt.mpr hcross)]
rw [ite_eq_right (not_lt.mpr hcross)]
end FormalConflictRange