Skip to content
Snippets Groups Projects
Verified Commit ff921b62 authored by Isaac van Bakel's avatar Isaac van Bakel
Browse files

Move `lft_kill_atomic` to derived laws

This doesn't need to be part of the signature (and in fact, I just
derived it directly from `lft_kill_atomics` when I proved it,) so it's
now explicitly a derived law to keep the signature minimal.
parent cbcbaf4c
Branches
No related tags found
1 merge request!37Expose atomic lifetimes in the API, end many in a single step
...@@ -29,6 +29,15 @@ Section derived. ...@@ -29,6 +29,15 @@ Section derived.
Context `{!invGS Σ, !lftGS Σ userE}. Context `{!invGS Σ, !lftGS Σ userE}.
Implicit Types κ : lft. Implicit Types κ : lft.
Lemma lft_kill_atomic (Λ : atomic_lft) :
lft_ctx -∗ (1.[@Λ] ={lftN userE}[userE]▷=∗ [@Λ]).
Proof.
iIntros "#LFT".
rewrite -(big_sepS_singleton (λ x, 1.[@x])%I)
-(big_sepS_singleton (λ x, [@x])%I).
by iApply (lft_kill_atomics with "LFT").
Qed.
Lemma lft_create_atomic E : Lemma lft_create_atomic E :
lftN E lftN E
lft_ctx ={E}=∗ Λ, 1.[@Λ]. lft_ctx ={E}=∗ Λ, 1.[@Λ].
......
...@@ -134,7 +134,6 @@ Module Type lifetime_sig. ...@@ -134,7 +134,6 @@ Module Type lifetime_sig.
fresh lifetimes when using lifetimes as keys to index into a map. *) fresh lifetimes when using lifetimes as keys to index into a map. *)
Parameter lft_fresh : κ κ', i : positive, Parameter lft_fresh : κ κ', i : positive,
m : positive, (i < m)%positive (positive_to_lft m) κ' κ. m : positive, (i < m)%positive (positive_to_lft m) κ' κ.
Parameter lft_kill_atomic : Λ, lft_ctx -∗ ((1).[@Λ] ={lftN userE}[userE]▷=∗ [@Λ]).
Parameter lft_kill_atomics : Λs, Parameter lft_kill_atomics : Λs,
lft_ctx -∗ (([ set] Λ Λs, (1).[@Λ]) ={lftN userE}[userE]▷=∗ [ set] ΛΛs, [@Λ]). lft_ctx -∗ (([ set] Λ Λs, (1).[@Λ]) ={lftN userE}[userE]▷=∗ [ set] ΛΛs, [@Λ]).
......
...@@ -197,15 +197,6 @@ Proof. ...@@ -197,15 +197,6 @@ Proof.
+ iRight. iFrame. iPureIntro. by apply lft_dead_in_union_false. + iRight. iFrame. iPureIntro. by apply lft_dead_in_union_false.
Qed. Qed.
Lemma lft_kill_atomic (Λ : atomic_lft) :
lft_ctx -∗ (1.[@Λ] ={lftN userE}[userE]▷=∗ [@Λ]).
Proof.
iIntros "#LFT".
rewrite -(big_sepS_singleton (λ x, 1.[@x])%I)
-(big_sepS_singleton (λ x, [@x])%I).
by iApply (lft_kill_atomics with "LFT").
Qed.
Lemma lft_create_strong P E : Lemma lft_create_strong P E :
pred_infinite P lftN E pred_infinite P lftN E
lft_ctx ={E}=∗ lft_ctx ={E}=∗
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment