Commit ab35b735 authored by Dan Frumin's avatar Dan Frumin
Browse files

Simplify the notation for the relational judements

{E,E;Δ,Γ} ⊨ ... => {E;Δ,Γ} ⊨ ...
{⊤,⊤;Δ,Γ} ⊨ ... => {Δ,Γ} ⊨ ...
parent cd3dd884
...@@ -121,8 +121,8 @@ Section heapify_refinement. ...@@ -121,8 +121,8 @@ Section heapify_refinement.
Lemma heapify_refinement_ez Γ E1 b1 b2 : Lemma heapify_refinement_ez Γ E1 b1 b2 :
logrelN E1 logrelN E1
{E1,E1;Δ;Γ} b1 log b2 : bitτ - {E1;Δ;Γ} b1 log b2 : bitτ -
{E1,E1;Δ;Γ} heapify b1 log heapify b2 : bitτ. {E1;Δ;Γ} heapify b1 log heapify b2 : bitτ.
Proof. Proof.
iIntros (?) "Hb1b2". iIntros (?) "Hb1b2".
iApply bin_log_related_app; eauto. iApply bin_log_related_app; eauto.
......
...@@ -77,8 +77,8 @@ Section CG_Counter. ...@@ -77,8 +77,8 @@ Section CG_Counter.
Lemma bin_log_FG_increment_l Γ K E x (n : nat) t τ : Lemma bin_log_FG_increment_l Γ K E x (n : nat) t τ :
x ↦ᵢ #n - x ↦ᵢ #n -
(x ↦ᵢ # (S n) - {E,E;Δ;Γ} fill K #() log t : τ) - (x ↦ᵢ # (S n) - {E;Δ;Γ} fill K #() log t : τ) -
{E,E;Δ;Γ} fill K (FG_increment #x #()) log t : τ. {E;Δ;Γ} fill K (FG_increment #x #()) log t : τ.
Proof. Proof.
iIntros "Hx Hlog". iIntros "Hx Hlog".
iApply bin_log_related_wp_l. iApply bin_log_related_wp_l.
...@@ -146,7 +146,7 @@ Section CG_Counter. ...@@ -146,7 +146,7 @@ Section CG_Counter.
(( n : nat, x ↦ᵢ #n R n) ={E2,E1}= True) (( n : nat, x ↦ᵢ #n R n) ={E2,E1}= True)
( m, x ↦ᵢ # (S m) R m - P - ( m, x ↦ᵢ # (S m) R m - P -
{E2,E1;Δ;Γ} fill K #() log t : τ)) {E2,E1;Δ;Γ} fill K #() log t : τ))
- ({E1,E1;Δ;Γ} fill K ((FG_increment $/ LitV (Loc x)) #()) log t : τ). - ({E1;Δ;Γ} fill K ((FG_increment $/ LitV (Loc x)) #()) log t : τ).
Proof. Proof.
iIntros "HP #H". iIntros "HP #H".
iLöb as "IH". iLöb as "IH".
...@@ -189,7 +189,7 @@ Section CG_Counter. ...@@ -189,7 +189,7 @@ Section CG_Counter.
(( n : nat, x ↦ᵢ #n R n) ={E2,E1}= True) (( n : nat, x ↦ᵢ #n R n) ={E2,E1}= True)
( m : nat, x ↦ᵢ #m R m - ( m : nat, x ↦ᵢ #m R m -
{E2,E1;Δ;Γ} fill K #m log t : τ)) {E2,E1;Δ;Γ} fill K #m log t : τ))
- {E1,E1;Δ;Γ} fill K ((counter_read $/ LitV (Loc x)) #()) log t : τ. - {E1;Δ;Γ} fill K ((counter_read $/ LitV (Loc x)) #()) log t : τ.
Proof. Proof.
iIntros "#H". iIntros "#H".
unfold counter_read. unlock. simpl. unfold counter_read. unlock. simpl.
...@@ -205,7 +205,7 @@ Section CG_Counter. ...@@ -205,7 +205,7 @@ Section CG_Counter.
(* TODO: try to use with_lock rules *) (* TODO: try to use with_lock rules *)
Lemma FG_CG_increment_refinement l cnt cnt' Γ : Lemma FG_CG_increment_refinement l cnt cnt' Γ :
inv counterN (counter_inv l cnt cnt') - inv counterN (counter_inv l cnt cnt') -
{,;Δ;Γ} FG_increment $/ LitV (Loc cnt) log CG_increment $/ LitV (Loc cnt') $/ LitV (Loc l) : TArrow TUnit TUnit. {Δ;Γ} FG_increment $/ LitV (Loc cnt) log CG_increment $/ LitV (Loc cnt') $/ LitV (Loc l) : TArrow TUnit TUnit.
Proof. Proof.
iIntros "#Hinv". iIntros "#Hinv".
iApply bin_log_related_arrow_val. iApply bin_log_related_arrow_val.
...@@ -236,7 +236,7 @@ Section CG_Counter. ...@@ -236,7 +236,7 @@ Section CG_Counter.
Lemma counter_read_refinement l cnt cnt' Γ : Lemma counter_read_refinement l cnt cnt' Γ :
inv counterN (counter_inv l cnt cnt') - inv counterN (counter_inv l cnt cnt') -
{,;Δ;Γ} counter_read $/ LitV (Loc cnt) log counter_read $/ LitV (Loc cnt') : TArrow TUnit TNat. {Δ;Γ} counter_read $/ LitV (Loc cnt) log counter_read $/ LitV (Loc cnt') : TArrow TUnit TNat.
Proof. Proof.
iIntros "#Hinv". iIntros "#Hinv".
iApply bin_log_related_arrow_val. iApply bin_log_related_arrow_val.
...@@ -262,7 +262,7 @@ Section CG_Counter. ...@@ -262,7 +262,7 @@ Section CG_Counter.
Qed. Qed.
Lemma FG_CG_counter_refinement : Lemma FG_CG_counter_refinement :
{,;Δ;} FG_counter log CG_counter : {Δ;} FG_counter log CG_counter :
TArrow TUnit (TProd (TArrow TUnit TUnit) (TArrow TUnit TNat)). TArrow TUnit (TProd (TArrow TUnit TUnit) (TArrow TUnit TNat)).
Proof. Proof.
unfold FG_counter, CG_counter. unfold FG_counter, CG_counter.
......
...@@ -38,8 +38,8 @@ Section Refinement. ...@@ -38,8 +38,8 @@ Section Refinement.
Lemma rand_l Δ Γ E1 K ρ t τ : Lemma rand_l Δ Γ E1 K ρ t τ :
choiceN E1 choiceN E1
spec_ctx ρ - ( b : bool, {E1,E1;Δ;Γ} fill K #b log t : τ) - spec_ctx ρ - ( b : bool, {E1;Δ;Γ} fill K #b log t : τ) -
{E1,E1;Δ;Γ} fill K (rand #()) log t : τ. {E1;Δ;Γ} fill K (rand #()) log t : τ.
Proof. Proof.
iIntros (?) "#Hs Hlog". iIntros (?) "#Hs Hlog".
unfold rand. unlock. simpl. unfold rand. unlock. simpl.
......
...@@ -72,8 +72,8 @@ Section lockG_rules. ...@@ -72,8 +72,8 @@ Section lockG_rules.
Lemma bin_log_related_newlock_l (R : iProp Σ) Δ Γ E K t τ : Lemma bin_log_related_newlock_l (R : iProp Σ) Δ Γ E K t τ :
R - R -
( (lk : loc) γ, is_lock γ #lk R ( (lk : loc) γ, is_lock γ #lk R
- ({E,E;Δ;Γ} fill K #lk log t: τ)) - - ({E;Δ;Γ} fill K #lk log t: τ)) -
{E,E;Δ;Γ} fill K (newlock #()) log t: τ. {E;Δ;Γ} fill K (newlock #()) log t: τ.
Proof. Proof.
iIntros "HR Hlog". iIntros "HR Hlog".
iApply bin_log_related_wp_l. iApply bin_log_related_wp_l.
...@@ -90,8 +90,8 @@ Section lockG_rules. ...@@ -90,8 +90,8 @@ Section lockG_rules.
is_lock γ #lk R - is_lock γ #lk R -
locked γ - locked γ -
R - R -
({E,E;Δ;Γ} fill K #() log t: τ) - ({E;Δ;Γ} fill K #() log t: τ) -
{E,E;Δ;Γ} fill K (release #lk) log t: τ. {E;Δ;Γ} fill K (release #lk) log t: τ.
Proof. Proof.
iIntros (?) "Hlock Hlocked HR Hlog". iIntros (?) "Hlock Hlocked HR Hlog".
iDestruct "Hlock" as (l) "[% #?]"; simplify_eq. iDestruct "Hlock" as (l) "[% #?]"; simplify_eq.
...@@ -109,8 +109,8 @@ Section lockG_rules. ...@@ -109,8 +109,8 @@ Section lockG_rules.
Lemma bin_log_related_acquire_l (R : iProp Σ) (lk : loc) γ Δ Γ E K t τ : Lemma bin_log_related_acquire_l (R : iProp Σ) (lk : loc) γ Δ Γ E K t τ :
N E N E
is_lock γ #lk R - is_lock γ #lk R -
(locked γ - R - {E,E;Δ;Γ} fill K #() log t: τ) - (locked γ - R - {E;Δ;Γ} fill K #() log t: τ) -
{E,E;Δ;Γ} fill K (acquire #lk) log t: τ. {E;Δ;Γ} fill K (acquire #lk) log t: τ.
Proof. Proof.
iIntros (?) "#Hlock Hlog". iIntros (?) "#Hlock Hlog".
iLöb as "IH". iLöb as "IH".
...@@ -167,8 +167,8 @@ Section lock_rules_r. ...@@ -167,8 +167,8 @@ Section lock_rules_r.
Qed. Qed.
Lemma bin_log_related_newlock_l_simp Γ K t τ : Lemma bin_log_related_newlock_l_simp Γ K t τ :
( l : loc, l ↦ᵢ #false - {E1,E1;Δ;Γ} fill K #l log t : τ) - ( l : loc, l ↦ᵢ #false - {E1;Δ;Γ} fill K #l log t : τ) -
{E1,E1;Δ;Γ} fill K (newlock #()) log t : τ. {E1;Δ;Γ} fill K (newlock #()) log t : τ.
Proof. Proof.
iIntros "Hlog". iIntros "Hlog".
unfold newlock. unlock. unfold newlock. unlock.
...@@ -209,8 +209,8 @@ Section lock_rules_r. ...@@ -209,8 +209,8 @@ Section lock_rules_r.
Lemma bin_log_related_acquire_suc_l Γ K l t τ : Lemma bin_log_related_acquire_suc_l Γ K l t τ :
l ↦ᵢ #false - l ↦ᵢ #false -
(l ↦ᵢ #true - {E1,E1;Δ;Γ} fill K (#()) log t : τ) - (l ↦ᵢ #true - {E1;Δ;Γ} fill K (#()) log t : τ) -
{E1,E1;Δ;Γ} fill K (acquire #l) log t : τ. {E1;Δ;Γ} fill K (acquire #l) log t : τ.
Proof. Proof.
iIntros "Hl Hlog". iIntros "Hl Hlog".
unfold acquire. unlock. unfold acquire. unlock.
...@@ -226,8 +226,8 @@ Section lock_rules_r. ...@@ -226,8 +226,8 @@ Section lock_rules_r.
Lemma bin_log_related_acquire_fail_l Γ K l t τ : Lemma bin_log_related_acquire_fail_l Γ K l t τ :
l ↦ᵢ #true - l ↦ᵢ #true -
(l ↦ᵢ #false - {E1,E1;Δ;Γ} fill K (acquire #l) log t : τ) - (l ↦ᵢ #false - {E1;Δ;Γ} fill K (acquire #l) log t : τ) -
{E1,E1;Δ;Γ} fill K (acquire #l) log t : τ. {E1;Δ;Γ} fill K (acquire #l) log t : τ.
Proof. Proof.
iIntros "Hl Hlog". iIntros "Hl Hlog".
iLöb as "IH". iLöb as "IH".
......
...@@ -36,9 +36,9 @@ Section contents. ...@@ -36,9 +36,9 @@ Section contents.
Lemma bin_log_related_or Δ Γ E e1 e2 e1' e2' : Lemma bin_log_related_or Δ Γ E e1 e2 e1' e2' :
logrelN E logrelN E
{E,E;Δ;Γ} e1 log e1' : TArrow TUnit TUnit - {E;Δ;Γ} e1 log e1' : TArrow TUnit TUnit -
{E,E;Δ;Γ} e2 log e2' : TArrow TUnit TUnit - {E;Δ;Γ} e2 log e2' : TArrow TUnit TUnit -
{E,E;Δ;Γ} or e1 e2 log or e1' e2' : TUnit. {E;Δ;Γ} or e1 e2 log or e1' e2' : TUnit.
Proof. Proof.
iIntros (?) "He1 He2". iIntros (?) "He1 He2".
iApply (bin_log_related_app with "[He1] He2"). iApply (bin_log_related_app with "[He1] He2").
...@@ -48,8 +48,8 @@ Section contents. ...@@ -48,8 +48,8 @@ Section contents.
Lemma bin_log_or_choice_1_r_val Δ Γ E (v1 v1' v2 : val) : Lemma bin_log_or_choice_1_r_val Δ Γ E (v1 v1' v2 : val) :
logrelN E logrelN E
{E,E;Δ;Γ} v1 log v1' : TArrow TUnit TUnit - {E;Δ;Γ} v1 log v1' : TArrow TUnit TUnit -
{E,E;Δ;Γ} v1 #() log or v1' v2 : TUnit. {E;Δ;Γ} v1 #() log or v1' v2 : TUnit.
Proof. Proof.
iIntros (?) "Hlog". iIntros (?) "Hlog".
unlock or. repeat rel_rec_r. unlock or. repeat rel_rec_r.
...@@ -64,7 +64,7 @@ Section contents. ...@@ -64,7 +64,7 @@ Section contents.
Lemma bin_log_or_choice_1_r_val_typed Δ Γ E (v1 v2 : val) : Lemma bin_log_or_choice_1_r_val_typed Δ Γ E (v1 v2 : val) :
logrelN E logrelN E
Γ ⊢ₜ v1 : TArrow TUnit TUnit Γ ⊢ₜ v1 : TArrow TUnit TUnit
{E,E;Δ;Γ} v1 #() log or v1 v2 : TUnit. {E;Δ;Γ} v1 #() log or v1 v2 : TUnit.
Proof. Proof.
iIntros (??). iIntros (??).
iApply bin_log_or_choice_1_r_val; eauto. iApply bin_log_or_choice_1_r_val; eauto.
...@@ -73,8 +73,8 @@ Section contents. ...@@ -73,8 +73,8 @@ Section contents.
Lemma bin_log_or_choice_1_r Δ Γ E (e1 e1' : expr) (v2 : val) : Lemma bin_log_or_choice_1_r Δ Γ E (e1 e1' : expr) (v2 : val) :
logrelN E logrelN E
{E,E;Δ;Γ} e1 log e1' : TArrow TUnit TUnit - {E;Δ;Γ} e1 log e1' : TArrow TUnit TUnit -
{E,E;Δ;Γ} e1 #() log or e1' v2 : TUnit. {E;Δ;Γ} e1 #() log or e1' v2 : TUnit.
Proof. Proof.
iIntros (?) "Hlog". iIntros (?) "Hlog".
rel_bind_l e1. rel_bind_l e1.
...@@ -90,7 +90,7 @@ Section contents. ...@@ -90,7 +90,7 @@ Section contents.
logrelN E logrelN E
Closed e1 Closed e1
Γ ⊢ₜ e1 : TUnit Γ ⊢ₜ e1 : TUnit
{E,E;Δ;Γ} e1 log or (λ: <>, e1) v2 : TUnit. {E;Δ;Γ} e1 log or (λ: <>, e1) v2 : TUnit.
Proof. Proof.
iIntros (???). iIntros (???).
unlock or. repeat rel_rec_r. unlock or. repeat rel_rec_r.
...@@ -118,9 +118,9 @@ Section contents. ...@@ -118,9 +118,9 @@ Section contents.
Lemma bin_log_or_commute Δ Γ E (v1 v1' v2 v2' : val) : Lemma bin_log_or_commute Δ Γ E (v1 v1' v2 v2' : val) :
orN E orN E
logrelN E logrelN E
{E,E;Δ;Γ} v1 log v1' : TArrow TUnit TUnit - {E;Δ;Γ} v1 log v1' : TArrow TUnit TUnit -
{E,E;Δ;Γ} v2 log v2' : TArrow TUnit TUnit - {E;Δ;Γ} v2 log v2' : TArrow TUnit TUnit -
{E,E;Δ;Γ} or v2 v1 log or v1' v2' : TUnit. {E;Δ;Γ} or v2 v1 log or v1' v2' : TUnit.
Proof. Proof.
iIntros (??) "Hv1 Hv2". iIntros (??) "Hv1 Hv2".
unlock or. repeat rel_rec_r. repeat rel_rec_l. unlock or. repeat rel_rec_r. repeat rel_rec_l.
...@@ -155,8 +155,8 @@ Section contents. ...@@ -155,8 +155,8 @@ Section contents.
Lemma bin_log_or_idem_r Δ Γ E (v v' : val) : Lemma bin_log_or_idem_r Δ Γ E (v v' : val) :
logrelN E logrelN E
{E,E;Δ;Γ} v log v' : TArrow TUnit TUnit - {E;Δ;Γ} v log v' : TArrow TUnit TUnit -
{E,E;Δ;Γ} v #() log or v' v' : TUnit. {E;Δ;Γ} v #() log or v' v' : TUnit.
Proof. Proof.
iIntros (?) "Hlog". iIntros (?) "Hlog".
by iApply bin_log_or_choice_1_r_val. by iApply bin_log_or_choice_1_r_val.
...@@ -166,7 +166,7 @@ Section contents. ...@@ -166,7 +166,7 @@ Section contents.
Closed e Closed e
logrelN E logrelN E
Γ ⊢ₜ e : TUnit Γ ⊢ₜ e : TUnit
{E,E;Δ;Γ} e log or (λ: <>, e) (λ: <>, e) : TUnit. {E;Δ;Γ} e log or (λ: <>, e) (λ: <>, e) : TUnit.
Proof. Proof.
iIntros (???). iIntros (???).
iPoseProof (bin_log_or_choice_1_r_body Δ _ _ e (λ: <>, e)) as "HZ"; eauto. iPoseProof (bin_log_or_choice_1_r_body Δ _ _ e (λ: <>, e)) as "HZ"; eauto.
...@@ -176,8 +176,8 @@ Section contents. ...@@ -176,8 +176,8 @@ Section contents.
Lemma bin_log_or_idem_l Δ Γ E (v v' : val) : Lemma bin_log_or_idem_l Δ Γ E (v v' : val) :
orN E orN E
logrelN E logrelN E
{E,E;Δ;Γ} v log v' : TArrow TUnit TUnit - {E;Δ;Γ} v log v' : TArrow TUnit TUnit -
{E,E;Δ;Γ} or v v log v' #() : TUnit. {E;Δ;Γ} or v v log v' #() : TUnit.
Proof. Proof.
iIntros (??) "Hlog". iIntros (??) "Hlog".
unlock or. repeat rel_rec_l. unlock or. repeat rel_rec_l.
...@@ -203,8 +203,8 @@ Section contents. ...@@ -203,8 +203,8 @@ Section contents.
Lemma bin_log_or_bot_l Δ Γ E (v v' : val) : Lemma bin_log_or_bot_l Δ Γ E (v v' : val) :
orN E orN E
logrelN E logrelN E
{E,E;Δ;Γ} v log v' : TArrow TUnit TUnit - {E;Δ;Γ} v log v' : TArrow TUnit TUnit -
{E,E;Δ;Γ} or v bot log v' #() : TUnit. {E;Δ;Γ} or v bot log v' #() : TUnit.
Proof. Proof.
iIntros (??) "Hlog". iIntros (??) "Hlog".
unlock or. repeat rel_rec_l. unlock or. repeat rel_rec_l.
...@@ -228,8 +228,8 @@ Section contents. ...@@ -228,8 +228,8 @@ Section contents.
Lemma bin_log_or_bot_r Δ Γ E (v v' : val) : Lemma bin_log_or_bot_r Δ Γ E (v v' : val) :
logrelN E logrelN E
{E,E;Δ;Γ} v log v' : TArrow TUnit TUnit - {E;Δ;Γ} v log v' : TArrow TUnit TUnit -
{E,E;Δ;Γ} v #() log or v' bot : TUnit. {E;Δ;Γ} v #() log or v' bot : TUnit.
Proof. Proof.
iIntros (?) "Hlog". iIntros (?) "Hlog".
iApply bin_log_or_choice_1_r_val; eauto. iApply bin_log_or_choice_1_r_val; eauto.
...@@ -238,10 +238,10 @@ Section contents. ...@@ -238,10 +238,10 @@ Section contents.
Lemma bin_log_or_assoc1 Δ Γ E (v1 v1' v2 v2' v3 v3' : val) : Lemma bin_log_or_assoc1 Δ Γ E (v1 v1' v2 v2' v3 v3' : val) :
orN E orN E
logrelN E logrelN E
{E,E;Δ;Γ} v1 log v1' : TArrow TUnit TUnit - {E;Δ;Γ} v1 log v1' : TArrow TUnit TUnit -
{E,E;Δ;Γ} v2 log v2' : TArrow TUnit TUnit - {E;Δ;Γ} v2 log v2' : TArrow TUnit TUnit -
{E,E;Δ;Γ} v3 log v3' : TArrow TUnit TUnit - {E;Δ;Γ} v3 log v3' : TArrow TUnit TUnit -
{E,E;Δ;Γ} or v1 (λ: <>, or v2 v3) log or (λ: <>, or v1' v2') v3' : TUnit. {E;Δ;Γ} or v1 (λ: <>, or v2 v3) log or (λ: <>, or v1' v2') v3' : TUnit.
Proof. Proof.
iIntros (??) "Hv1 Hv2 Hv3". iIntros (??) "Hv1 Hv2 Hv3".
unlock or. simpl. unlock or. simpl.
...@@ -304,7 +304,7 @@ Section contents. ...@@ -304,7 +304,7 @@ Section contents.
Closed {["x"]} e Closed {["x"]} e
logrelN E logrelN E
Γ ⊢ₜ subst "x" v e : τ Γ ⊢ₜ subst "x" v e : τ
{E,E;Δ;Γ} let: "x" := v in e log subst "x" v e : τ. {E;Δ;Γ} let: "x" := v in e log subst "x" v e : τ.
Proof. Proof.
iIntros (?? Hτ). iIntros (?? Hτ).
assert (Closed (Rec BAnon "x" e)). assert (Closed (Rec BAnon "x" e)).
...@@ -317,7 +317,7 @@ Section contents. ...@@ -317,7 +317,7 @@ Section contents.
Closed {["x"]} e Closed {["x"]} e
logrelN E logrelN E
Γ ⊢ₜ subst "x" v e : τ Γ ⊢ₜ subst "x" v e : τ
{E,E;Δ;Γ} subst "x" v e log (let: "x" := v in e) : τ. {E;Δ;Γ} subst "x" v e log (let: "x" := v in e) : τ.
Proof. Proof.
iIntros (?? Hτ). iIntros (?? Hτ).
assert (Closed (Rec BAnon "x" e)). assert (Closed (Rec BAnon "x" e)).
......
...@@ -26,9 +26,9 @@ Section compatibility. ...@@ -26,9 +26,9 @@ Section compatibility.
Lemma bin_log_related_par Δ Γ E e1 e2 e1' e2' τ1 τ2 : Lemma bin_log_related_par Δ Γ E e1 e2 e1' e2' τ1 τ2 :
logrelN E logrelN E
{E,E;Δ;Γ} e1 log e1' : TArrow TUnit τ1 - {E;Δ;Γ} e1 log e1' : TArrow TUnit τ1 -
{E,E;Δ;Γ} e2 log e2' : TArrow TUnit τ2 - {E;Δ;Γ} e2 log e2' : TArrow TUnit τ2 -
{E,E;Δ;Γ} par e1 e2 log par e1' e2' : TProd τ1 τ2. {E;Δ;Γ} par e1 e2 log par e1' e2' : TProd τ1 τ2.
Proof. Proof.
iIntros (?) "He1 He2". iIntros (?) "He1 He2".
iApply (bin_log_related_app with "[He1] He2"). iApply (bin_log_related_app with "[He1] He2").
......
...@@ -199,8 +199,8 @@ Section refinement. ...@@ -199,8 +199,8 @@ Section refinement.
Definition bot : val := rec: "bot" <> := "bot" #(). Definition bot : val := rec: "bot" <> := "bot" #().
Lemma bot_l ϕ Δ Γ E K t τ : Lemma bot_l ϕ Δ Γ E K t τ :
(ϕ - {E,E;Δ;Γ} fill K (bot #()) log t : τ) - (ϕ - {E;Δ;Γ} fill K (bot #()) log t : τ) -
{E,E;Δ;Γ} fill K (bot #()) log t : τ. {E;Δ;Γ} fill K (bot #()) log t : τ.
Proof. Proof.
iIntros "Hlog". iIntros "Hlog".
iLöb as "IH". iLöb as "IH".
...@@ -320,7 +320,7 @@ Section refinement. ...@@ -320,7 +320,7 @@ Section refinement.
Lemma profiled_g `{oneshotG Σ} `{inG Σ (exclR unitR)} γ γ' c1 c2 g1 g2 Δ Γ : Lemma profiled_g `{oneshotG Σ} `{inG Σ (exclR unitR)} γ γ' c1 c2 g1 g2 Δ Γ :
inv shootN (i6 c1 c2 γ γ') - inv shootN (i6 c1 c2 γ γ') -
τg Δ (g1, g2) - τg Δ (g1, g2) -
{,;Δ;Γ} {Δ;Γ}
(FG_increment #c1 #() ;; g1 #()) (FG_increment #c1 #() ;; g1 #())
log log
(FG_increment #c2 #() ;; g2 #()) : TUnit. (FG_increment #c2 #() ;; g2 #()) : TUnit.
...@@ -405,7 +405,7 @@ Section refinement. ...@@ -405,7 +405,7 @@ Section refinement.
Lemma profiled_g' `{oneshotG Σ} `{inG Σ (exclR unitR)} γ γ' c1 c2 g1 g2 Δ Γ : Lemma profiled_g' `{oneshotG Σ} `{inG Σ (exclR unitR)} γ γ' c1 c2 g1 g2 Δ Γ :
inv shootN (i6 c1 c2 γ γ') - inv shootN (i6 c1 c2 γ γ') -
τg Δ (g1, g2) - τg Δ (g1, g2) -
{,;Δ;Γ} {Δ;Γ}
(λ: <>, FG_increment #c1 #() ;; g1 #()) (λ: <>, FG_increment #c1 #() ;; g1 #())
log log
(λ: <>, FG_increment #c2 #() ;; g2 #()) : τg. (λ: <>, FG_increment #c2 #() ;; g2 #()) : τg.
......
...@@ -41,7 +41,7 @@ Section masked. ...@@ -41,7 +41,7 @@ Section masked.
Lemma bin_log_related_var Δ Γ x τ : Lemma bin_log_related_var Δ Γ x τ :
Γ !! x = Some τ Γ !! x = Some τ
{E,E;Δ;Γ} Var x log Var x : τ. {E;Δ;Γ} Var x log Var x : τ.
Proof. Proof.
rewrite bin_log_related_eq. rewrite bin_log_related_eq.
iIntros (? vvs ρ) "#Hs #HΓ"; iIntros (j K) "Hj". iIntros (? vvs ρ) "#Hs #HΓ"; iIntros (j K) "Hj".
...@@ -56,25 +56,25 @@ Section masked. ...@@ -56,25 +56,25 @@ Section masked.
iApply wp_value. eauto. iApply wp_value. eauto.
Qed. Qed.
Lemma bin_log_related_unit Δ Γ : {E,E;Δ;Γ} #() log #() : TUnit. Lemma bin_log_related_unit Δ Γ : {E;Δ;Γ} #() log #() : TUnit.
Proof. Proof.
value_case. value_case.
Qed. Qed.
Lemma bin_log_related_nat Δ Γ (n : nat) : {E,E;Δ;Γ} # n log # n : TNat. Lemma bin_log_related_nat Δ Γ (n : nat) : {E;Δ;Γ} # n log # n : TNat.
Proof. Proof.
value_case. value_case.
Qed. Qed.
Lemma bin_log_related_bool Δ Γ (b : bool) : {E,E;Δ;Γ} # b log # b : TBool. Lemma bin_log_related_bool Δ Γ (b : bool) : {E;Δ;Γ} # b log # b : TBool.
Proof. Proof.
value_case. value_case.
Qed. Qed.
Lemma bin_log_related_pair Δ Γ e1 e2 e1' e2' τ1 τ2 : Lemma bin_log_related_pair Δ Γ e1 e2 e1' e2' τ1 τ2 :
{E,E;Δ;Γ} e1 log e1' : τ1 - {E;Δ;Γ} e1 log e1' : τ1 -
{E,E;Δ;Γ} e2 log e2' : τ2 - {E;Δ;Γ} e2 log e2' : τ2 -
{E,E;Δ;Γ} Pair e1 e2 log Pair e1' e2' : TProd τ1 τ2. {E;Δ;Γ} Pair e1 e2 log Pair e1' e2' : TProd τ1 τ2.
Proof. Proof.
iIntros "IH1 IH2". iIntros "IH1 IH2".
rel_bind_ap e1 e1' "IH1" v1 v1' "Hvv1". rel_bind_ap e1 e1' "IH1" v1 v1' "Hvv1".
...@@ -86,8 +86,8 @@ Section masked. ...@@ -86,8 +86,8 @@ Section masked.
Lemma bin_log_related_fst Δ Γ e e' τ1 τ2 : Lemma bin_log_related_fst Δ Γ e e' τ1 τ2 :
logrelN E logrelN E
{E,E;Δ;Γ} e log e' : TProd τ1 τ2 - {E;Δ;Γ} e log e' : TProd τ1 τ2 -
{E,E;Δ;Γ} Fst e log Fst e' : τ1. {E;Δ;Γ} Fst e log Fst e' : τ1.
Proof. Proof.
iIntros (?) "IH". iIntros (?) "IH".
rel_bind_ap e e' "IH" v w "IH". rel_bind_ap e e' "IH" v w "IH".
...@@ -99,8 +99,8 @@ Section masked. ...@@ -99,8 +99,8 @@ Section masked.
Lemma bin_log_related_snd Δ Γ e e' τ1 τ2 : Lemma bin_log_related_snd Δ Γ e e' τ1 τ2 :
logrelN E logrelN E
{E,E;Δ;Γ} e log e' : TProd τ1 τ2 - {E;Δ;Γ} e log e' : TProd τ1 τ2 -