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:
1 parent
a54a5f82f8
commit
af318a7d32
51 files changed
+2542
-1357
No files matched your search
@@ -173,7 +173,7 @@ theorem beginSlack_eq_of_A2a_nonbottom {db : DB} {r : RangeRead} {res : Result}
|
||||
(between db (((keyAfter last : Key) : WithTop Key)) r.begin.key).length := by
|
||||
rw [← hbetween_len]
|
||||
apply List.Sublist.length_le
|
||||
show List.Sublist
|
||||
change List.Sublist
|
||||
(db.keys.filter (fun k : Key => decide
|
||||
(resolve db r.end_ ≤ ((k : Key) : WithTop Key) ∧
|
||||
((k : Key) : WithTop Key) < r.end_.key)))
|
||||
@@ -238,7 +238,7 @@ theorem intervalCard_keyAfter_getLast_ge {db : DB} {r : RangeRead} {res : Result
|
||||
have hlen_le : (between db (resolve db r.end_) r.end_.key).length ≤
|
||||
(between db (((keyAfter last : Key) : WithTop Key)) r.end_.key).length := by
|
||||
apply List.Sublist.length_le
|
||||
show List.Sublist
|
||||
change List.Sublist
|
||||
(db.keys.filter (fun k : Key => decide
|
||||
(resolve db r.end_ ≤ ((k : Key) : WithTop Key) ∧
|
||||
((k : Key) : WithTop Key) < r.end_.key)))
|
||||
@@ -536,7 +536,7 @@ theorem exists_witness_erase_A2a {r : RangeRead} {res : Result} {k : Key}
|
||||
rw [decide_eq_true_eq]; exact hkE
|
||||
have h2 : (dbF.keys.erase k).countP
|
||||
(fun x : Key => decide ((x : WithTop Key) < r.end_.key)) = clampNonposD r := by
|
||||
rw [List.countP_erase, if_pos ⟨hk_in_F, hktrue⟩, hFall, hFlen]
|
||||
rw [List.countP_erase, ite_eq_left ⟨hk_in_F, hktrue⟩, hFall, hFlen]
|
||||
omega
|
||||
rw [h1, h2]
|
||||
have hoff : r.end_.offset = -(clampNonposD r : ℤ) := by
|
||||
@@ -560,7 +560,7 @@ theorem exists_witness_erase_A2a {r : RangeRead} {res : Result} {k : Key}
|
||||
((res.keys.getLast hne : Key) : WithTop Key) := by
|
||||
have h0 : 0 ≤ r.end_.anchor (dbw.erase k) := by rw [hanchor_erase]; omega
|
||||
have hlenErase : (dbw.erase k).keys.length = res.keys.length + clampNonposD r := by
|
||||
rw [herase_keys, List.length_append, List.length_erase, if_pos hk_in_F, hFlen]
|
||||
rw [herase_keys, List.length_append, List.length_erase, ite_eq_left hk_in_F, hFlen]
|
||||
omega
|
||||
have hlt : (r.end_.anchor (dbw.erase k)).toNat < (dbw.erase k).keys.length := by
|
||||
rw [hanchor_erase, hlenErase]
|
||||
|
||||
Reference in new issue
Block a user