Skip to content

Commit

Permalink
state update with inv and ghost resources
Browse files Browse the repository at this point in the history
  • Loading branch information
hei411 committed Oct 29, 2024
1 parent 01ef87c commit 65c5d92
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions theories/coneris/wp_update.v
Original file line number Diff line number Diff line change
Expand Up @@ -549,5 +549,22 @@ Section state_update.
Global Instance from_assumption_state_update p E P Q :
FromAssumption p P Q → KnownRFromAssumption p P (state_update E Q).
Proof. rewrite /KnownRFromAssumption /FromAssumption=>->. iApply state_update_ret. Qed.


(** state_update works for allocation of invariants and ghost resources *)
Lemma state_update_inv_alloc E P N:
▷ P -∗ state_update E (inv N P).
Proof.
iIntros "HP".
by iMod (inv_alloc with "[$]").
Qed.

Context {A : cmra} `{i : inG Σ A}.
Lemma state_update_ra_alloc E (a:A):
✓ a -> ⊢ state_update E (∃ γ, own γ a).
Proof.
iIntros "%H".
by iMod (own_alloc).
Qed.

End state_update.

0 comments on commit 65c5d92

Please sign in to comment.