File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -228,6 +228,17 @@ theorem get?_set_of_lt' (a : α) {m n} (l : List α) (h : m < length l) :
228
228
229
229
@[deprecated (since := "2024-05-06")] alias length_removeNth := length_eraseIdx
230
230
231
+ /-! ### tail -/
232
+
233
+ theorem length_tail_add_one (l : List α) (h : 0 < length l) : (length (tail l)) + 1 = length l := by
234
+ simp [Nat.sub_add_cancel h]
235
+
236
+ @[simp] theorem getElem?_tail (l : List α) : l.tail[n]? = l[n + 1 ]? := by cases l <;> simp
237
+
238
+ @[simp] theorem getElem_tail (l : List α) (h : n < l.tail.length) :
239
+ l.tail[n] = l[n + 1 ]'(by simp at h; omega) := by
240
+ cases l; contradiction; simp
241
+
231
242
/-! ### eraseP -/
232
243
233
244
@[simp] theorem extractP_eq_find?_eraseP
Original file line number Diff line number Diff line change 1
- {"version" : " 1.0 .0" ,
1
+ {"version" : " 1.1 .0" ,
2
2
"packagesDir" : " .lake/packages" ,
3
3
"packages" : [],
4
4
"name" : " batteries" ,
You can’t perform that action at this time.
0 commit comments