Skip to content
Snippets Groups Projects
Commit db3c672d authored by Dan Frumin's avatar Dan Frumin
Browse files

refines_exists -> refines_pack

parent 354cf991
No related branches found
No related tags found
No related merge requests found
Pipeline #29393 passed
...@@ -26,7 +26,7 @@ Section bit_refinement. ...@@ -26,7 +26,7 @@ Section bit_refinement.
Lemma bit_refinement Δ : REL bit_bool << bit_nat : interp bitτ Δ. Lemma bit_refinement Δ : REL bit_bool << bit_nat : interp bitτ Δ.
Proof. Proof.
unfold bitτ; simpl. unfold bitτ; simpl.
iApply (refines_exists R). iApply (refines_pack R).
progress repeat iApply refines_pair. progress repeat iApply refines_pair.
- rel_values. - rel_values.
- unfold flip_nat. rel_pure_l. - unfold flip_nat. rel_pure_l.
......
...@@ -58,7 +58,7 @@ Section cell_refinement. ...@@ -58,7 +58,7 @@ Section cell_refinement.
Proof. Proof.
unfold cell1, cell2. unfold cell1, cell2.
iApply refines_forall. iIntros "!#" (R). iApply refines_forall. iIntros "!#" (R).
iApply (refines_exists (cellR R)). iApply (refines_pack (cellR R)).
repeat iApply refines_pair. repeat iApply refines_pair.
- (* New cell *) - (* New cell *)
rel_pure_l. rel_pure_r. rel_pure_l. rel_pure_r.
......
...@@ -47,7 +47,7 @@ Section namegen_refinement. ...@@ -47,7 +47,7 @@ Section namegen_refinement.
iMod (inv_alloc N _ (ng_Inv γ c) with "[-]") as "#Hinv". iMod (inv_alloc N _ (ng_Inv γ c) with "[-]") as "#Hinv".
{ iNext. iExists 0, ∅. iFrame. { iNext. iExists 0, ∅. iFrame.
by rewrite big_sepS_empty. } by rewrite big_sepS_empty. }
iApply (refines_exists (ngR γ)). iApply (refines_pack (ngR γ)).
do 2 rel_pure_r. do 2 rel_pure_r.
iApply refines_pair. iApply refines_pair.
- (* New name *) - (* New name *)
......
...@@ -169,7 +169,7 @@ Section proof. ...@@ -169,7 +169,7 @@ Section proof.
Proof. Proof.
unfold CG_stack, FG_stack. unfold CG_stack, FG_stack.
iApply refines_forall. iIntros (A). iAlways. iApply refines_forall. iIntros (A). iAlways.
iApply (refines_exists (stackInt A)). iApply (refines_pack (stackInt A)).
repeat iApply refines_pair. repeat iApply refines_pair.
- unfold CG_new_stack, FG_new_stack. - unfold CG_new_stack, FG_new_stack.
iApply refines_arrow_val. iAlways. iApply refines_arrow_val. iAlways.
......
...@@ -235,7 +235,7 @@ Section proof. ...@@ -235,7 +235,7 @@ Section proof.
rel_apply_l (refines_newlock_l N (lok_inv size1 size2 tbl1 tbl2 l2)%I with "[Hs1' Hs2' Htbl1' Htbl2' Hl2]"). rel_apply_l (refines_newlock_l N (lok_inv size1 size2 tbl1 tbl2 l2)%I with "[Hs1' Hs2' Htbl1' Htbl2' Hl2]").
{ iExists 0,_. by iFrame. } { iExists 0,_. by iFrame. }
iNext. iIntros (l1 γl) "#Hl1". rel_pure_l. rel_pure_l. iNext. iIntros (l1 γl) "#Hl1". rel_pure_l. rel_pure_l.
iApply (refines_exists (tableR γ)). iApply (refines_pack (tableR γ)).
repeat iApply refines_pair. repeat iApply refines_pair.
(* Eq *) (* Eq *)
- iApply eqKey_refinement. - iApply eqKey_refinement.
...@@ -314,7 +314,7 @@ Section proof. ...@@ -314,7 +314,7 @@ Section proof.
rel_apply_l (refines_newlock_l N (lok_inv size1 size2 tbl1 tbl2 l2)%I with "[Hs1' Hs2' Htbl1' Htbl2' Hl2]"). rel_apply_l (refines_newlock_l N (lok_inv size1 size2 tbl1 tbl2 l2)%I with "[Hs1' Hs2' Htbl1' Htbl2' Hl2]").
{ iExists 0,_. by iFrame. } { iExists 0,_. by iFrame. }
iNext. iIntros (l1 γl) "#Hl1". rel_pure_l. rel_pure_l. iNext. iIntros (l1 γl) "#Hl1". rel_pure_l. rel_pure_l.
iApply (refines_exists (tableR γ)). iApply (refines_pack (tableR γ)).
repeat iApply refines_pair. repeat iApply refines_pair.
(* Eq *) (* Eq *)
- iApply eqKey_refinement. - iApply eqKey_refinement.
......
...@@ -346,7 +346,7 @@ Section refinement. ...@@ -346,7 +346,7 @@ Section refinement.
(reloc.lib.lock.newlock, reloc.lib.lock.acquire, reloc.lib.lock.release) (reloc.lib.lock.newlock, reloc.lib.lock.acquire, reloc.lib.lock.release)
: lrel_lock. : lrel_lock.
Proof. Proof.
simpl. iApply (refines_exists lockInt). simpl. iApply (refines_pack lockInt).
repeat iApply refines_pair. repeat iApply refines_pair.
- by iApply newlock_refinement. - by iApply newlock_refinement.
- by iApply acquire_refinement_direct. - by iApply acquire_refinement_direct.
......
...@@ -126,7 +126,7 @@ Section refinement. ...@@ -126,7 +126,7 @@ Section refinement.
<< <<
(spin_lock.newlock, spin_lock.acquire, spin_lock.release) : interp lockT Δ. (spin_lock.newlock, spin_lock.acquire, spin_lock.release) : interp lockT Δ.
Proof. Proof.
iApply (refines_exists lockInt). iApply (refines_pack lockInt).
repeat iApply refines_pair; simpl. repeat iApply refines_pair; simpl.
- by iApply newlock_refinement. - by iApply newlock_refinement.
- by iApply acquire_refinement. - by iApply acquire_refinement.
......
...@@ -68,7 +68,7 @@ Section compatibility. ...@@ -68,7 +68,7 @@ Section compatibility.
- iExists #(); eauto. - iExists #(); eauto.
Qed. Qed.
Lemma refines_exists (A : lrel Σ) e e' (C : lrel Σ lrel Σ) : Lemma refines_pack (A : lrel Σ) e e' (C : lrel Σ lrel Σ) :
(REL e << e' : C A) -∗ (REL e << e' : C A) -∗
REL e << e' : A, C A. REL e << e' : A, C A.
Proof. Proof.
......
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