Skip to content

Commit 374ef1f

Browse files
committed
wip
1 parent 8566728 commit 374ef1f

File tree

1 file changed

+3
-3
lines changed
  • src/Std/Data/Iterators/Lemmas/Combinators

1 file changed

+3
-3
lines changed

src/Std/Data/Iterators/Lemmas/Combinators/Take.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ theorem Iter.atIdxSlow?_take {α β}
5454
cases k <;> cases l <;> simp
5555

5656
theorem Iter.toList_take_of_finite {α β} [Iterator α Id β] {n : Nat}
57-
[Finite α Id] [IteratorCollect α Id] [LawfulIteratorCollect α Id]
57+
[Finite α Id] [IteratorCollect α Id Id] [LawfulIteratorCollect α Id Id]
5858
{it : Iter (α := α) β} :
5959
(it.take n).toList = it.toList.take n := by
6060
induction it using Iter.inductSteps generalizing n with | step it ihy ihs =>
@@ -70,13 +70,13 @@ theorem Iter.toList_take_of_finite {α β} [Iterator α Id β] {n : Nat}
7070
· simp
7171

7272
theorem Iter.toListRev_take_of_finite {α β} [Iterator α Id β] {n : Nat}
73-
[Finite α Id] [IteratorCollect α Id] [LawfulIteratorCollect α Id]
73+
[Finite α Id] [IteratorCollect α Id Id] [LawfulIteratorCollect α Id Id]
7474
{it : Iter (α := α) β} :
7575
(it.take n).toListRev = it.toListRev.drop (it.toList.length - n) := by
7676
rw [toListRev_eq, toList_take_of_finite, List.reverse_take, toListRev_eq]
7777

7878
theorem Iter.toArray_take_of_finite {α β} [Iterator α Id β] {n : Nat}
79-
[Finite α Id] [IteratorCollect α Id] [LawfulIteratorCollect α Id]
79+
[Finite α Id] [IteratorCollect α Id Id] [LawfulIteratorCollect α Id Id]
8080
{it : Iter (α := α) β} :
8181
(it.take n).toArray = it.toArray.take n := by
8282
rw [← toArray_toList, ← toArray_toList, List.take_toArray, toList_take_of_finite]

0 commit comments

Comments
 (0)