diff --git a/heap_lang/derived.v b/heap_lang/derived.v index 1f82dd016ffe20abdbc1e7f81608a6f65a486d58..3d2a02b29138ddcd2a6b1d32180a017f821ef2ea 100644 --- a/heap_lang/derived.v +++ b/heap_lang/derived.v @@ -8,6 +8,7 @@ Notation Seq e1 e2 := (Let "" e1 e2). Notation LamV x e := (RecV "" x e). Notation LetCtx x e2 := (AppRCtx (LamV x e2)). Notation SeqCtx e2 := (LetCtx "" e2). +Notation Skip := (Seq (Lit LitUnit) (Lit LitUnit)). Section derived. Context {Σ : iFunctor}. @@ -29,6 +30,9 @@ Proof. by rewrite -wp_let' //= ?to_of_val ?subst_empty. Qed. +Lemma wp_skip E Q : ▷(Q (LitV LitUnit)) ⊑ wp E Skip Q. +Proof. rewrite -wp_seq -wp_value // -wp_value //. Qed. + Lemma wp_le E (n1 n2 : Z) P Q : (n1 ≤ n2 → P ⊑ ▷ Q (LitV $ LitBool true)) → (n2 < n1 → P ⊑ ▷ Q (LitV $ LitBool false)) →