Skip to content
Snippets Groups Projects
Commit d0f8d581 authored by Jonas Kastberg's avatar Jonas Kastberg
Browse files

Made list reversal proof in line with mechanisation section proof

parent 0cf2bdf7
No related branches found
No related tags found
No related merge requests found
...@@ -57,14 +57,17 @@ Section list_rev_example. ...@@ -57,14 +57,17 @@ Section list_rev_example.
<?> MSG #() {{ llist IT l (reverse xs) }} ; END)%proto. <?> MSG #() {{ llist IT l (reverse xs) }} ; END)%proto.
Lemma list_rev_subprot {T} (IT : T val iProp Σ) : Lemma list_rev_subprot {T} (IT : T val iProp Σ) :
list_rev_prot (list_rev_protI IT). list_rev_prot list_rev_protI IT.
Proof. Proof.
iIntros (l xs) "Hl". iIntros (l xs) "Hl".
iDestruct (llist_split with "Hl") as (vs) "[Hl HI]". iDestruct (llist_split with "Hl") as (vs) "[Hl HIT]".
iExists l, vs. iFrame "Hl". iExists l, vs. iFrame "Hl".
iModIntro. iIntros "Hl". iSplitL. iModIntro.
{ rewrite big_sepL2_reverse_2. iApply llist_split. eauto with iFrame. } iIntros "Hl".
eauto. iSplitL "Hl HIT".
{ iApply llist_split. rewrite big_sepL2_reverse_2.
iExists (reverse vs). iFrame "Hl HIT". }
done.
Qed. Qed.
Lemma list_rev_client_spec {T} (IT : T val iProp Σ) l xs : Lemma list_rev_client_spec {T} (IT : T val iProp Σ) l xs :
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment