@@ -41,20 +41,21 @@ theorem IterM.toListRev_toIter {α β} [Iterator α Id β] [Finite α Id]
4141theorem Iter.toList_toArray {α β} [Iterator α Id β] [Finite α Id] [IteratorCollect α Id]
4242 [LawfulIteratorCollect α Id] {it : Iter (α := α) β} :
4343 it.toArray.toList = it.toList := by
44- simp only [toArray_eq_toArray_toIterM, toList_eq_toList_toIterM, ← IterM.toList_toArray,
45- Id.map_eq]
44+ simp only [toArray_eq_toArray_toIterM, toList_eq_toList_toIterM, ← IterM.toList_toArray]
45+ rfl -- FIXME: defeq abuse of `Id`.
4646
4747theorem Iter.toArray_toList {α β} [Iterator α Id β] [Finite α Id] [IteratorCollect α Id]
4848 [LawfulIteratorCollect α Id] {it : Iter (α := α) β} :
4949 it.toList.toArray = it.toArray := by
50- simp only [toArray_eq_toArray_toIterM, toList_eq_toList_toIterM, ← IterM.toArray_toList,
51- Id.map_eq]
52-
50+ simp only [toArray_eq_toArray_toIterM, toList_eq_toList_toIterM, ← IterM.toArray_toList]
51+ rfl -- FIXME: defeq abuse of `Id`.
5352theorem Iter.toListRev_eq {α β} [Iterator α Id β] [Finite α Id] [IteratorCollect α Id]
5453 [LawfulIteratorCollect α Id] {it : Iter (α := α) β} :
5554 it.toListRev = it.toList.reverse := by
5655 simp [Iter.toListRev_eq_toListRev_toIterM, Iter.toList_eq_toList_toIterM, IterM.toListRev_eq]
56+ rfl -- FIXME: defeq abuse of
5757
58+ set_option linter.deprecated false in -- FIXME: defeq abuse of `Id`.
5859theorem Iter.toArray_eq_match_step {α β} [Iterator α Id β] [Finite α Id] [IteratorCollect α Id]
5960 [LawfulIteratorCollect α Id] {it : Iter (α := α) β} :
6061 it.toArray = match it.step with
@@ -63,7 +64,7 @@ theorem Iter.toArray_eq_match_step {α β} [Iterator α Id β] [Finite α Id] [I
6364 | .done _ => #[] := by
6465 simp only [Iter.toArray_eq_toArray_toIterM, Iter.step]
6566 rw [IterM.toArray_eq_match_step]
66- simp only [Id.map_eq , Id.pure_eq, Id.bind_eq, Id.run]
67+ simp only [Id.run_map , Id.pure_eq, Id.bind_eq, Id.run]
6768 generalize it.toIterM.step = step
6869 cases step using PlausibleIterStep.casesOn <;> simp
6970
@@ -76,6 +77,7 @@ theorem Iter.toList_eq_match_step {α β} [Iterator α Id β] [Finite α Id] [It
7677 rw [← Iter.toList_toArray, Iter.toArray_eq_match_step]
7778 split <;> simp [Iter.toList_toArray]
7879
80+ set_option linter.deprecated false in -- FIXME: defeq abuse of `Id`.
7981theorem Iter.toListRev_eq_match_step {α β} [Iterator α Id β] [Finite α Id] {it : Iter (α := α) β} :
8082 it.toListRev = match it.step with
8183 | .yield it' out _ => it'.toListRev ++ [out]
0 commit comments