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

@@ -24,7 +24,6 @@ of complete keys at or above `end_.key` is at most `end_.offset - 1`, for *every
namespace FormalConflictRange
set_option maxHeartbeats 1200000
/-! ### Reduction to the offset-one read at the reported last -/
@@ -151,7 +150,7 @@ theorem closedFormNegCrossTruncRevResidual_begin_le_last {r : RangeRead} {res :
/-- The residual closed form's end is at or above `begin.key`. -/
theorem closedFormNegCrossTruncRevResidual_end_ge_begin {r : RangeRead} {res : Result}
(hmore : res.more = true) (hne : res.keys ≠ []) :
(_hmore : res.more = true) (_hne : res.keys ≠ []) :
r.begin.key ≤ (closedFormNegCrossTruncRevResidual r res).end_ := by
unfold closedFormNegCrossTruncRevResidual
dsimp only
@@ -781,12 +780,12 @@ theorem compatible_iff_topEnd_of_residual_top {db : DB} {r : RangeRead} {res : R
have hre : resolve db r.end_ = (⊤ : WithTop Key) :=
resolve_end_eq_top_of_count_lt hcomp hmore hrev hne hend hLE hlt
have hck : RangeRead.completeKeys db r = RangeRead.completeKeys db r' := by
simp [RangeRead.completeKeys, RangeRead.inRange, hrev, hrev', hre, hresEnd', r']
simp [RangeRead.completeKeys, RangeRead.inRange, hrev, hre, hresEnd', r']
exact (compatible_congr_completeKeys hck hlim').mp hcomp
· intro hcomp'
by_cases hretop : resolve db r.end_ = (⊤ : WithTop Key)
· have hck : RangeRead.completeKeys db r = RangeRead.completeKeys db r' := by
simp [RangeRead.completeKeys, RangeRead.inRange, hrev, hrev', hretop, hresEnd', r']
simp [RangeRead.completeKeys, RangeRead.inRange, hrev, hretop, hresEnd', r']
exact (compatible_congr_completeKeys hck hlim').mpr hcomp'
· exfalso
set L : Key := res.keys.getLast hne with hL
@@ -886,7 +885,7 @@ theorem minimal_closedForm_of_negCross_trunc_rev_residual_begin_le
obtain ⟨hmore, hrev, hbeg, hne, _, _⟩ := h
refine minimal_closedForm_of_nonpos_revTrunc hread ⟨hmore, hrev, by omega, ?_⟩
unfold leastReported
rw [if_pos hrev]
rw [ite_eq_left hrev]
exact hBLE
/-! ### A bound on the reported keys below the begin selector -/