@@ -106,22 +106,22 @@ Lemma merge_spec (a1 a2 b : loc) (l1 l2 : list Z) (l : list val) :
106106 wp_pures.
107107 destruct l1 as [|x1 l1].
108108 {
109- rewrite nil_length Nat.add_0_l in H.
109+ rewrite length_nil Nat.add_0_l in H.
110110 wp_pures.
111111 iApply (wp_array_copy_to with "[$Hb $Ha2]").
112112 - by rewrite H.
113- - by rewrite fmap_length .
113+ - by rewrite length_fmap .
114114 - iIntros "!> [Hb Ha2]".
115115 iApply "HΦ".
116116 by iFrame.
117117 }
118118 destruct l2 as [|x2 l2].
119119 {
120- rewrite nil_length Nat.add_0_r in H.
120+ rewrite length_nil Nat.add_0_r in H.
121121 wp_pures.
122122 iApply (wp_array_copy_to with "[$Hb $Ha1]").
123123 - by rewrite H.
124- - by rewrite fmap_length .
124+ - by rewrite length_fmap .
125125 - iIntros "!> [Hb Ha1]".
126126 iApply "HΦ".
127127 iFrame.
@@ -130,7 +130,7 @@ Lemma merge_spec (a1 a2 b : loc) (l1 l2 : list Z) (l : list val) :
130130 apply StronglySorted_inv in Hl1 as [H1 Hl1].
131131 apply StronglySorted_inv in Hl2 as [H2 Hl2].
132132 wp_pures.
133- rewrite !cons_length Nat.add_succ_l Nat.add_succ_r in H.
133+ rewrite !length_cons Nat.add_succ_l Nat.add_succ_r in H.
134134 destruct l as [|y l]; first done.
135135 cbn in H.
136136 injection H as H.
@@ -225,7 +225,7 @@ Lemma merge_sort_inner_spec (a b : loc) (l : list Z) :
225225 iApply "HΦ".
226226 iFrame.
227227 iPureIntro.
228- rewrite fmap_length .
228+ rewrite length_fmap .
229229 split; last done.
230230 apply (Nat2Z.inj_le _ 1) in Hlen.
231231 destruct l as [|i1 [|i2 l]].
@@ -258,7 +258,7 @@ Lemma merge_sort_inner_spec (a b : loc) (l : list Z) :
258258 rewrite app_length in Hlen.
259259 rewrite app_length.
260260 replace (length l1 + length l2 - length l1) with (length l2) by lia.
261- rewrite fmap_app !array_app fmap_length .
261+ rewrite fmap_app !array_app length_fmap .
262262 iDestruct "Ha" as "[Ha1 Ha2]".
263263 iDestruct "Hb" as "[Hb1 Hb2]".
264264 wp_apply (par_spec
@@ -293,13 +293,13 @@ Lemma merge_sort_inner_spec (a b : loc) (l : list Z) :
293293 }
294294 iIntros "%l (Hb1 & Hb2 & Ha & Hl & %Hl)".
295295 iCombine "Hb1 Hb2" as "Hb".
296- erewrite <-fmap_length , <-array_app, <-fmap_app.
296+ erewrite <-length_fmap , <-array_app, <-fmap_app.
297297 iApply "HΦ".
298298 iFrame.
299299 iPureIntro.
300300 split.
301301 + by rewrite Hl1 Hl2.
302- + rewrite fmap_length .
302+ + rewrite length_fmap .
303303 by apply Permutation_length.
304304Qed .
305305
@@ -340,8 +340,8 @@ Lemma merge_sort_spec (a : loc) (l : list Z) :
340340 rewrite Nat2Z.id.
341341 wp_pures.
342342 wp_apply (wp_array_copy_to with "[$Hb $Ha]").
343- { by rewrite replicate_length . }
344- { by rewrite fmap_length . }
343+ { by rewrite length_replicate . }
344+ { by rewrite length_fmap . }
345345 iIntros "[Hb Ha]".
346346 wp_pures.
347347 wp_apply (merge_sort_inner_spec with "[$Ha $Hb]").
0 commit comments