Skip to content
Snippets Groups Projects
Commit eaee4de7 authored by Jacques-Henri Jourdan's avatar Jacques-Henri Jourdan
Browse files

Rearranging lifetime.v. Changing the proof of bor_unnest: we do not need atomic accessors here.

parent 20623c96
Branches
Tags
No related merge requests found
Pipeline #
...@@ -110,6 +110,35 @@ Proof. ...@@ -110,6 +110,35 @@ Proof.
- iIntros "!> !>". iMod "Hclose" as "_". by iApply (bor_fake with "LFT"). - iIntros "!> !>". iMod "Hclose" as "_". by iApply (bor_fake with "LFT").
Qed. Qed.
Lemma bor_later_tok E q κ P :
lftN E
lft_ctx -∗ &{κ}( P) -∗ q.[κ] ={E}▷=∗ &{κ}P q.[κ].
Proof.
iIntros (?) "#LFT Hb Htok".
iMod (bor_acc_cons with "LFT Hb Htok") as "[HP Hclose]"; first done.
iModIntro. iNext. iApply ("Hclose" with "[] HP"). by iIntros "!> $".
Qed.
Lemma bor_persistent P `{!PersistentP P} E κ :
lftN E
lft_ctx -∗ &{κ}P ={E}=∗ P [κ].
Proof.
iIntros (?) "#LFT Hb".
iMod (bor_acc_atomic with "LFT Hb") as "[[#HP Hob]|[#H† Hclose]]"; first done.
- iMod ("Hob" with "HP") as "_". auto.
- iMod "Hclose" as "_". auto.
Qed.
Lemma bor_persistent_tok P `{!PersistentP P} E κ q :
lftN E
lft_ctx -∗ &{κ}P -∗ q.[κ] ={E}=∗ P q.[κ].
Proof.
iIntros (?) "#LFT Hb Htok".
iMod (bor_acc with "LFT Hb Htok") as "[#HP Hob]"; first done.
by iMod ("Hob" with "HP") as "[_ $]".
Qed.
Lemma later_bor_static E P : Lemma later_bor_static E P :
lftN E lftN E
lft_ctx -∗ P ={E}=∗ &{static} P. lft_ctx -∗ P ={E}=∗ &{static} P.
...@@ -125,15 +154,6 @@ Proof. ...@@ -125,15 +154,6 @@ Proof.
iApply lft_tok_static. iApply lft_tok_static.
Qed. Qed.
Lemma bor_later_tok E q κ P :
lftN E
lft_ctx -∗ &{κ}( P) -∗ q.[κ] ={E}▷=∗ &{κ}P q.[κ].
Proof.
iIntros (?) "#LFT Hb Htok".
iMod (bor_acc_cons with "LFT Hb Htok") as "[HP Hclose]"; first done.
iModIntro. iNext. iApply ("Hclose" with "[] HP"). by iIntros "!> $".
Qed.
Lemma rebor E κ κ' P : Lemma rebor E κ κ' P :
lftN E lftN E
lft_ctx -∗ κ' κ -∗ &{κ}P ={E}=∗ &{κ'}P ([κ'] ={E}=∗ &{κ}P). lft_ctx -∗ κ' κ -∗ &{κ}P ={E}=∗ &{κ'}P ([κ'] ={E}=∗ &{κ}P).
...@@ -152,33 +172,12 @@ Lemma bor_unnest E κ κ' P : ...@@ -152,33 +172,12 @@ Lemma bor_unnest E κ κ' P :
lft_ctx -∗ &{κ'} &{κ} P ={E}▷=∗ &{κ κ'} P. lft_ctx -∗ &{κ'} &{κ} P ={E}▷=∗ &{κ κ'} P.
Proof. Proof.
iIntros (?) "#LFT Hbor". iIntros (?) "#LFT Hbor".
iMod (bor_acc_atomic_cons with "LFT Hbor") as rewrite ->(bor_unfold_idx _ P).
"[[Hbor Hclose]|[H† Hclose]]"; first done. iMod (bor_exists with "LFT Hbor") as (i) "Hbor"; [done|].
- rewrite ->bor_unfold_idx. iDestruct "Hbor" as (i) "[#Hidx Hbor]". iMod (bor_sep with "LFT Hbor") as "[Hidx Hbor]"; [done|].
iMod ("Hclose" with "[] Hbor") as "Hbor". iMod (bor_persistent with "LFT Hidx") as "#[Hidx|H†]"; [done| |].
{ iIntros "!> H". rewrite bor_unfold_idx. auto with iFrame. } - iIntros "!>". iNext. by iApply (idx_bor_unnest with "LFT Hidx Hbor").
iIntros "!>"; iNext. by iApply (idx_bor_unnest with "LFT Hidx Hbor"). - iApply (bor_fake with "LFT"); [done|]. rewrite -lft_dead_or. auto.
- iMod "Hclose" as "_". iApply (bor_fake with "LFT"); first done.
rewrite -lft_dead_or. auto.
Qed.
Lemma bor_persistent P `{!PersistentP P} E κ :
lftN E
lft_ctx -∗ &{κ}P ={E}=∗ P [κ].
Proof.
iIntros (?) "#LFT Hb".
iMod (bor_acc_atomic with "LFT Hb") as "[[#HP Hob]|[#H† Hclose]]"; first done.
- iMod ("Hob" with "HP") as "_". auto.
- iMod "Hclose" as "_". auto.
Qed.
Lemma bor_persistent_tok P `{!PersistentP P} E κ q :
lftN E
lft_ctx -∗ &{κ}P -∗ q.[κ] ={E}=∗ P q.[κ].
Proof.
iIntros (?) "#LFT Hb Htok".
iMod (bor_acc with "LFT Hb Htok") as "[#HP Hob]"; first done.
by iMod ("Hob" with "HP") as "[_ $]".
Qed. Qed.
Lemma lft_incl_static κ : (κ static)%I. Lemma lft_incl_static κ : (κ static)%I.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment