@@ -73,17 +73,40 @@ Definition state_cas X `{!Cofe X} : (loc * (laterO X) * (laterO X) * (laterO (X
7373 Some (later_map fst r, <[l := later_map snd r]>σ, []).
7474#[export] Instance state_cas_ne X `{!Cofe X} :
7575 NonExpansive (state_cas X : prodO _ (stateF ♯ X) → optionO (laterO X * (stateF ♯ X) * listO (laterO X))%type).
76- (* Proof. *)
77- (* intros n [[[[m1 k1] p1] n1] s1] [[[[m2 k2] p2] n2] s2]. simpl. *)
78- (* intros [[[[Hm Hk] Hp] Hn] Hs]. simpl in *. *)
79- (* f_equiv. *)
80- (* - intros ?? Hxy; simpl. *)
81- (* do 3 f_equiv; first solve_proper. *)
82- (* rewrite Hs Hm. *)
83- (* do 3 f_equiv; solve_proper. *)
84- (* - by rewrite Hs Hm. *)
85- (* Qed. *)
86- Admitted .
76+ Proof .
77+ intros n [[[[m1 k1] p1] n1] s1] [[[[m2 k2] p2] n2] s2]. simpl.
78+ intros [[[[Hm Hk] Hp] Hn] Hs]. simpl in *.
79+ f_equiv.
80+ - intros ?? Hxy; simpl.
81+ do 3 f_equiv.
82+ + rewrite !later_map_Next.
83+ apply Next_contractive.
84+ destruct n.
85+ * apply dist_later_0.
86+ * apply dist_later_S.
87+ do 2 f_equiv.
88+ -- f_equiv.
89+ ++ f_equiv.
90+ ** apply Hn; lia.
91+ ** apply Hxy; lia.
92+ ++ apply Hk; lia.
93+ -- apply Hp; lia.
94+ + rewrite !later_map_Next.
95+ rewrite Hm.
96+ f_equiv; last done.
97+ apply Next_contractive.
98+ destruct n.
99+ -- apply dist_later_0.
100+ -- apply dist_later_S.
101+ do 2 f_equiv.
102+ ++ f_equiv.
103+ ** f_equiv.
104+ --- apply Hn; lia.
105+ --- apply Hxy; lia.
106+ ** apply Hk; lia.
107+ ++ apply Hp; lia.
108+ - by rewrite Hs Hm.
109+ Qed .
87110
88111Program Definition ReadE : opInterp := {|
89112 Ins := locO;
@@ -262,7 +285,7 @@ Section wp.
262285 iIntros "Ha Hf".
263286 iPoseProof (own_valid_2 with "Ha Hf") as "H".
264287 rewrite gmap_view_both_validI.
265- iDestruct "H" as "[%H [G Hval] ]".
288+ iDestruct "H" as "[%H Hval]".
266289 rewrite lookup_fmap.
267290 rewrite option_equivI.
268291 destruct (σ !! l) as [o |] eqn:Heq.
@@ -286,8 +309,7 @@ Section wp.
286309 Proof .
287310 iIntros "H Hl".
288311 iMod (own_update_2 with "H Hl") as "[$ $]"; last done.
289- apply gmap_view_replace.
290- done.
312+ apply gmap_view_update.
291313 Qed .
292314 Lemma istate_delete l α σ :
293315 own heapG_name (●V σ) -∗ pointsto l α ==∗ own heapG_name (●V delete l σ).
0 commit comments