Commit fb69d00c authored by Dan Frumin's avatar Dan Frumin

Prove `denv_wf_insert`

parent 1e50fc87
This diff is collapsed.
......@@ -446,11 +446,13 @@ Section vcg_spec.
Proof.
revert de ms ms' mNew dv. induction n as [|n IH];
intros de ms ms' mNew dv Hwfms Hwfde Hsp; simplify_eq/=; eauto.
{ destruct de; simplify_option_eq. split_and?; auto; first by destruct E.
by eapply vcg_eval_dexpr_wf. }
{ destruct de; simplify_option_eq.
repeat split_and; eauto.
by eapply vcg_eval_dexpr_wf. }
destruct de; simplify_eq /=.
- simplify_option_eq. split_and?; auto; first by destruct E.
by eapply vcg_eval_dexpr_wf.
- simplify_option_eq.
repeat split_and; eauto.
by eapply vcg_eval_dexpr_wf.
- destruct (vcg_sp E ms de1) as [[[ms1 mNew1] dv1]|] eqn:Hsp1; simplify_eq/=.
destruct (vcg_sp E (mNew1 :: ms1) (dce_subst E s dv1 de2))
as [[[ms2 mNew2] dv2]|] eqn:Hsp2; simplify_eq/=.
......@@ -917,7 +919,8 @@ Section vcg_spec.
rewrite /vcg_wp_continuation. iExists E,dw,_. iFrame.
eapply denv_wf_delete_full in Hdel; eauto. destruct_and!.
apply dcbin_op_eval_Some_wf in Hop; eauto.
repeat iSplit; eauto using denv_wf_insert. }
repeat iSplit; eauto.
iPureIntro. eapply denv_wf_insert; eauto. }
rewrite mapsto_wand_list_spec.
iDestruct ("Hwp" with "Hm'") as (w' ?) "Hwp".
iExists (dloc_interp E (dLoc i 0)), (dval_interp E dw), w'. iFrame; eauto.
......@@ -961,8 +964,9 @@ Section vcg_spec.
iIntros "Hl".
iExists E, dv2, (denv_insert i LLvl 1 dv2 m');
repeat (iSplit; first done).
iSplit. iPureIntro. apply denv_wf_insert; last done.
by destruct (denv_wf_delete_full E dv_old i m m' Hwf Hdel) as [Hdelwf ?].
iSplit. iPureIntro.
apply denv_wf_insert; eauto;
apply (denv_wf_delete_full E dv_old i m m' Hwf Hdel).
rewrite -denv_insert_interp. eauto with iFrame.
+ rewrite mapsto_wand_list_spec.
iSpecialize ("Hwp" with "[Hm]"); iFrame.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment