@@ -28,15 +28,18 @@ theorem toList_inner :
2828 simp [toList, DHashMap.Internal.Raw.Const.toList_eq_toListModel_map,
2929 ← DHashMap.Internal.Raw.toList_eq_toListModel, Function.comp_def]
3030
31+ @[simp]
3132public theorem toList_iter :
3233 m.iter.toList = m.toList := by
3334 simp [Raw.iter, Iter.toList_map, DHashMap.Raw.toList_iter, toList_inner,
3435 Function.comp_def]
3536
37+ @[simp]
3638public theorem toListRev_iter :
3739 m.iter.toListRev = m.toList.reverse := by
3840 simp [Iter.toListRev_eq, toList_iter]
3941
42+ @[simp]
4043public theorem toArray_iter [BEq α] [Hashable α] (h : m.WF) :
4144 m.iter.toArray = m.toArray := by
4245 simp [← Iter.toArray_toList, ← Raw.toArray_toList h, toList_iter]
@@ -51,15 +54,18 @@ theorem keys_inner :
5154 m.inner.keys = m.keys :=
5255 rfl
5356
57+ @[simp]
5458public theorem toList_keysIter [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.WF) :
5559 m.keysIter.toList = m.keys := by
5660 simp only [keysIter, ← map_fst_toList_eq_keys h, DHashMap.Raw.toList_keysIter h.out]
5761 simp [HashMap.Raw.map_fst_toList_eq_keys h, keys_inner]
5862
63+ @[simp]
5964public theorem toListRev_keysIter [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.WF) :
6065 m.keysIter.toListRev = m.keys.reverse := by
6166 simp [Iter.toListRev_eq, toList_keysIter h]
6267
68+ @[simp]
6369public theorem toArray_keysIter [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.WF) :
6470 m.keysIter.toArray = m.keysArray := by
6571 simp [← Iter.toArray_toList, ← Raw.toArray_keys h, toList_keysIter h]
@@ -70,16 +76,19 @@ section ValuesIter
7076
7177variable {α β : Type u} {m : Raw α β}
7278
79+ @[simp]
7380public theorem toList_valuesIter_eq_toList_map_snd :
7481 m.valuesIter.toList = m.toList.map Prod.snd := by
7582 simp [valuesIter, DHashMap.Raw.toList_valuesIter_eq_toList_map_snd,
7683 DHashMap.Internal.Raw.toList_eq_toListModel, toList,
7784 DHashMap.Internal.Raw.Const.toList_eq_toListModel_map]
7885
86+ @[simp]
7987public theorem toListRev_valuesIter :
8088 m.valuesIter.toListRev = (m.toList.map Prod.snd).reverse := by
8189 simp [Iter.toListRev_eq, toList_valuesIter_eq_toList_map_snd]
8290
91+ @[simp]
8392public theorem toArray_valuesIter :
8493 m.valuesIter.toArray = (m.toList.map Prod.snd).toArray := by
8594 simp [← Iter.toArray_toList, toList_valuesIter_eq_toList_map_snd]
@@ -100,14 +109,17 @@ theorem toList_inner :
100109 simp [toList, DHashMap.Const.toList, DHashMap.Internal.Raw.Const.toList_eq_toListModel_map,
101110 Function.comp_def, DHashMap.toList, DHashMap.Internal.Raw.toList_eq_toListModel]
102111
112+ @[simp]
103113public theorem toList_iter :
104114 m.iter.toList = m.toList := by
105115 simp [iter, DHashMap.toList_iter, toList_inner, Function.comp_def]
106116
117+ @[simp]
107118public theorem toListRev_iter :
108119 m.iter.toListRev = m.toList.reverse := by
109120 simp [Iter.toListRev_eq, toList_iter]
110121
122+ @[simp]
111123public theorem toArray_iter :
112124 m.iter.toArray = m.toArray := by
113125 simp [← Iter.toArray_toList, toList_iter]
@@ -122,14 +134,17 @@ theorem keys_inner {α : Type u} {β : Type v} [BEq α] [Hashable α] {m : HashM
122134
123135variable {α : Type u} {β : Type u} [BEq α] [Hashable α] {m : HashMap α β}
124136
137+ @[simp]
125138public theorem toList_keysIter [EquivBEq α] [LawfulHashable α] :
126139 m.keysIter.toList = m.keys := by
127140 simp [keysIter, DHashMap.toList_keysIter, keys_inner]
128141
142+ @[simp]
129143public theorem toListRev_keysIter [EquivBEq α] [LawfulHashable α] :
130144 m.keysIter.toListRev = m.keys.reverse := by
131145 simp [keysIter, DHashMap.toListRev_keysIter, keys_inner]
132146
147+ @[simp]
133148public theorem toArray_keysIter [EquivBEq α] [LawfulHashable α] :
134149 m.keysIter.toArray = m.keysArray := by
135150 simp [← Iter.toArray_toList, keysIter, keysArray, DHashMap.toList_keysIter]
@@ -140,14 +155,17 @@ section ValuesIter
140155
141156variable {α : Type u} {β : Type u} [BEq α] [Hashable α] {m : HashMap α β}
142157
158+ @[simp]
143159public theorem toList_valuesIter_eq_toList_map_snd :
144160 m.valuesIter.toList = m.toList.map Prod.snd := by
145161 simp [valuesIter, DHashMap.toList_valuesIter_eq_toList_map_snd, toList_inner]
146162
163+ @[simp]
147164public theorem toListRev_valuesIter :
148165 m.valuesIter.toListRev = (m.toList.map Prod.snd).reverse := by
149166 simp [Iter.toListRev_eq, toList_valuesIter_eq_toList_map_snd]
150167
168+ @[simp]
151169public theorem toArray_valuesIter :
152170 m.valuesIter.toArray = (m.toList.map Prod.snd).toArray := by
153171 simp [← Iter.toArray_toList, toList_valuesIter_eq_toList_map_snd]
0 commit comments