Skip to content
Snippets Groups Projects
Commit e252ca6e authored by Ralf Jung's avatar Ralf Jung
Browse files

Merge branch 'na_invariants_tweak' into 'master'

na_invariants: deduplicate proof of fresh_inv_name

See merge request iris/iris!728
parents 0fc3d8cc ab9e5fa4
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@ Section defs.
Definition na_inv (p : na_inv_pool_name) (N : namespace) (P : iProp Σ) : iProp Σ :=
i, i (N:coPset)
inv N (P own p (CoPset , GSet {[i]}) na_own p {[i]}).
inv N (P own p (ε, GSet {[i]}) na_own p {[i]}).
End defs.
Global Instance: Params (@na_inv) 3 := {}.
......@@ -80,12 +80,8 @@ Section proofs.
iMod (own_updateP with "Hempty") as ([m1 m2]) "[Hm Hown]".
{ apply prod_updateP'.
- apply cmra_updateP_id, (reflexivity (R:=eq)).
- apply (gset_disj_alloc_empty_updateP_strong' (λ i, i (N:coPset))).
intros Ef. exists (coPpick ( N gset_to_coPset Ef)).
rewrite -elem_of_gset_to_coPset comm -elem_of_difference.
apply coPpick_elem_of=> Hfin.
eapply nclose_infinite, (difference_finite_inv _ _), Hfin.
apply gset_to_coPset_finite. }
- apply (gset_disj_alloc_empty_updateP_strong' (λ i, i (N:coPset)))=> Ef.
apply fresh_inv_name. }
simpl. iDestruct "Hm" as %(<- & i & -> & ?).
rewrite /na_inv.
iMod (inv_alloc N with "[-]"); last (iModIntro; iExists i; eauto).
......
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