Skip to content

Commit fe82fc7

Browse files
committed
sp_own_and
1 parent 3f05826 commit fe82fc7

File tree

3 files changed

+27
-6
lines changed

3 files changed

+27
-6
lines changed

src/examples/fractional.v

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,6 @@ Section Frac.
452452
Proof.
453453
intros HE. iIntros "P".
454454
iMod (frac_alloc E P) as (γ) "[#sto %Hns]".
455-
Print fupd_mask_frame.
456455
iMod (fupd_mask_subseteq {[γ]}) as "Hb". { set_solver. }
457456
iMod (frac_deposit with "sto P") as "H1".
458457
iMod "Hb". iModIntro.

src/guarding/internal/auth_frag_util.v

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,4 +294,16 @@ Proof using C Disc m Σ.
294294
rewrite cmra_assoc. trivial.
295295
Qed.
296296

297+
Lemma view_frag_included_frag (z : auth C) :
298+
∃ bz , (∀ b , ◯V b ≼ z → b ≼ bz) ∧ ◯V bz ≼ z .
299+
Proof.
300+
exists (view_frag_proj z).
301+
destruct z as [af1 bf1]. split.
302+
+ intros b [[af bf] Hb]. exists bf.
303+
destruct Hb as [Hba Hbb]. apply Hbb.
304+
+ exists (View af1 ε). unfold "⋅", cmra_op, viewR, view_op_instance. f_equiv.
305+
- unfold view_auth_proj, view_frag. rewrite left_id. trivial.
306+
- unfold view_frag_proj, view_frag. rewrite right_id. trivial.
307+
Qed.
308+
297309
End AuthFragUtil.

src/guarding/storage_protocol/protocol.v

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -924,14 +924,24 @@ Section StorageLogic.
924924
apply own_op.
925925
Qed.
926926

927-
(* TODO
928927
Lemma sp_own_and x y γ :
929928
sp_own γ x ∧ sp_own γ y ⊢ ∃ z , ⌜ x ≼ z ∧ y ≼ z ⌝ ∗ sp_own γ z.
930929
Proof.
931-
iIntros "H". unfold sp_own. iDestruct (and_own_discrete_ucmra with "H") as (z) "[J %t]".
932-
destruct t as [Hxz Hyz]. destruct z as [|p].
930+
iIntros "H". rewrite sp_own_eq. unfold sp_own_def.
931+
iDestruct (and_own_discrete_ucmra with "H") as (z) "[J %t]".
932+
destruct t as [Hxz Hyz].
933+
destruct (view_frag_included_frag z) as (bz & Hf & Hle).
934+
destruct bz as [|bz].
935+
- destruct (Hf (Inved x) Hxz) as [z2 Heq].
936+
destruct z2; inversion Heq.
937+
- iExists bz. destruct Hle as [z2 Hle]. setoid_rewrite Hle.
938+
iDestruct "J" as "[J1 J2]". unfold "◯". iFrame "J1".
939+
iPureIntro. split.
940+
+ have h := Hf (Inved x) Hxz.
941+
apply (incl_of_inved_incl_assumes_unital _ _ h).
942+
+ have h := Hf (Inved y) Hyz.
943+
apply (incl_of_inved_incl_assumes_unital _ _ h).
933944
Qed.
934-
*)
935945

936946
Lemma op_unit (p: P) : p ⋅ ε ≡ p.
937947
Proof using storage_mixin.
@@ -1109,7 +1119,7 @@ Section StorageLogic.
11091119
iModIntro. iExists γ. iFrame.
11101120
Qed.
11111121

1112-
Lemma fupd_singleton_mask_frame (γ: gname) (X Y Z : iProp Σ) E
1122+
Local Lemma fupd_singleton_mask_frame (γ: gname) (X Y Z : iProp Σ) E
11131123
(premise: X ⊢ Y ={ {[ γ ]} }=∗ Z) (is_in: γ ∈ E) : X ⊢ Y ={ E }=∗ Z.
11141124
Proof.
11151125
iIntros "x y".

0 commit comments

Comments
 (0)