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

@@ -26,7 +26,6 @@ necessary by a toggle witness on the reported keys.
open FormalConflictRange
set_option maxHeartbeats 1200000
namespace FormalConflictRange
@@ -1242,7 +1241,8 @@ theorem compatible_of_agree_negCross_trunc_nonclamp_lowEndSmall {r : RangeRead}
rw [hcr]
exact ⟨hk1, hk2⟩
obtain ⟨hL2, hpart2⟩ := begin_eq_head_and_window_of_agree_negCross_trunc_nonclamp
hrev hmore hne hbegin hcross hnonclamp_eq hc1 (fun k hk1 hk2 => hmk k hk1 (by simpa [hupper] using hk2))
hrev hmore hne hbegin hcross hnonclamp_eq hc1 (fun k hk1 hk2 => hmk k hk1 (by simpa [hupper]
using hk2))
have hEhead' : r.end_.key < ((head : Key) : WithTop Key) := by rw [hhead]; exact hEhead
have hsmall' : intervalCard r.end_.key ((head : Key) : WithTop Key) +
(res.keys.length : ℕ∞) ≤ (((r.end_.offset - 1).toNat : ℕ) : ℕ∞) := by
@@ -1318,7 +1318,8 @@ theorem compatible_of_agree_negCross_trunc_nonclamp_lowEndBig {r : RangeRead} {r
intro k hk1 hk2
exact hmkE k (le_trans (le_of_lt hEhead') hk1) hk2
obtain ⟨hL2, hpart2⟩ := begin_eq_head_and_window_of_agree_negCross_trunc_nonclamp
hrev hmore hne hbegin hcross hnonclamp_eq hc1 (fun k hk1 hk2 => hmk k hk1 (by simpa [hupper] using hk2))
hrev hmore hne hbegin hcross hnonclamp_eq hc1 (fun k hk1 hk2 => hmk k hk1 (by simpa [hupper]
using hk2))
have hpart2' : db2.keys.filter (fun k : Key => decide
(((head : Key) : WithTop Key) ≤ (k : WithTop Key) ∧ (k : Key) ≤ last)) = res.keys := by
simpa [hhead, hlast] using hpart2
@@ -1427,12 +1428,12 @@ theorem necessary_negCross_trunc_between_end_head {r : RangeRead} {res : Result}
have hlt : e1 < G + rl := by
have hb := hbig'
rw [← hG] at hb
rw [← ENat.coe_add] at hb
exact ENat.coe_lt_coe.mp hb
rw [← ENat.natCast_add] at hb
exact ENat.natCast_lt_natCast.mp hb
have hGle : n + 1 ≤ G := by
rw [hn]; omega
rw [← hG]
exact ENat.coe_le_coe.mpr hGle
exact ENat.natCast_le_natCast.mpr hGle
obtain ⟨dbK, hKrange, hkK, hKlen⟩ :=
exists_db_keysIn_avoid (B := r.end_.key) (E := ((head : Key) : WithTop Key))
(k := k) (m := n) hcard