Library zoo.program_logic.biglater
Require Import zoo.prelude.
Require Export zoo.program_logic.wp.
Require Import zoo.diaframe.
Require Import zoo.options.
Section zoo۰G.
Context `{zoo۰G : !ZooG Σ}.
Implicit Type P : iProp Σ.
Definition biglater P : iProp Σ :=
∃ ns,
⧖ ns ∗
▷^(later۰function ns) P.
End zoo۰G.
Notation "▶ P" := (
biglater P
)(at level 20,
right associativity
) : bi_scope.
#[local] Instance : CustomIpat "biglater" :=
" ( %ns{} & #H⧖{_{}} & HP{} ) ".
Section zoo۰G.
Context `{zoo۰G : !ZooG Σ}.
Implicit Type P : iProp Σ.
#[global] Instance biglaterーne :
NonExpansive biglater.
#[global] Instance biglaterーproper :
Proper ((≡) ==> (≡)) biglater.
Lemma biglaterーintro P :
P ⊢ |==>
▶ P.
Lemma biglaterーmono P1 P2 :
(P1 ⊢ P2) →
(▶ P1) ⊢ ▶ P2.
#[global] Instance biglaterーmono' :
Proper ((⊢) ==> (⊢)) biglater.
#[global] Instance biglaterーflipーmono' :
Proper (flip (⊢) ==> flip (⊢)) biglater.
Lemma biglaterーor₁ P1 P2 :
▶ (P1 ∨ P2) ⊢
▶ P1 ∨ ▶ P2.
Lemma biglaterーor₂ P1 P2 :
▶ P1 ∨ ▶ P2 ⊢
▶ (P1 ∨ P2).
Lemma biglaterーor P1 P2 :
▶ (P1 ∨ P2) ⊣⊢
▶ P1 ∨ ▶ P2.
Lemma biglaterーand P1 P2 :
▶ (P1 ∧ P2) ⊢
▶ P1 ∧ ▶ P2.
Lemma biglaterーexist₁ `{!Inhabited X} (Φ : X → iProp Σ) :
▶ (∃ x, Φ x) ⊢
∃ x, ▶ Φ x.
Lemma biglaterーexist₂ `(Φ : X → iProp Σ) :
(∃ x, ▶ Φ x) ⊢
▶ ∃ x, Φ x.
Lemma biglaterーexist `{!Inhabited X} (Φ : X → iProp Σ) :
▶ (∃ x, Φ x) ⊣⊢
∃ x, ▶ Φ x.
Lemma biglaterー∀ `(Φ : X → iProp Σ) :
▶ (∀ x, Φ x) ⊢
∀ x, ▶ Φ x.
Lemma biglaterーsep₁ P1 P2 :
▶ (P1 ∗ P2) ⊢
▶ P1 ∗
▶ P2.
Lemma biglaterーsep₂ P1 P2 :
▶ P1 -∗
▶ P2 -∗
▶ (P1 ∗ P2).
Lemma biglaterーsep P1 P2 :
▶ (P1 ∗ P2) ⊣⊢
▶ P1 ∗
▶ P2.
Lemma biglaterーframeーl P1 P2 :
P1 -∗
▶ P2 -∗
▶ (P1 ∗ P2).
Lemma biglaterーframeーr P1 P2 :
▶ P1 -∗
P2 -∗
▶ (P1 ∗ P2).
Lemma biglaterーwandーl P1 P2 :
(P1 -∗ P2) -∗
(▶ P1) -∗
▶ P2.
Lemma biglaterーwandーr P1 P2 :
(▶ P1) -∗
(P1 -∗ P2) -∗
▶ P2.
Lemma biglaterーpersistently P :
▶ <pers> P ⊢
<pers> ▶ P.
End zoo۰G.
Section zoo۰G.
Context `{zoo۰G : !ZooG Σ}.
Implicit Type P : iProp Σ.
#[global] Instance into_wandーbiglater p q R P Q :
IntoWand false false R P Q →
IntoWand p q (▶ R) (▶ P) (▶ Q).
#[global] Instance into_wandーbiglaterーargs p q R P Q :
IntoWand p false R P Q →
IntoWand' p q R (▶ P) (▶ Q).
#[global] Instance from_sepーbiglater P Q1 Q2 :
FromSep P Q1 Q2 →
FromSep (▶ P) (▶ Q1) (▶ Q2).
#[global] Instance maybe_combine_sep_asーbiglater Q1 Q2 P progress :
MaybeCombineSepAs Q1 Q2 P progress →
MaybeCombineSepAs (▶ Q1) (▶ Q2) (▶ P) progress.
#[global] Instance combine_sep_givesーbiglater Q1 Q2 P :
CombineSepGives Q1 Q2 P →
CombineSepGives (▶ Q1) (▶ Q2) (▶ P).
#[global] Instance into_andーbiglater P Q1 Q2 :
IntoAnd false P Q1 Q2 →
IntoAnd false (▶ P) (▶ Q1) (▶ Q2).
#[global] Instance into_sepーbiglater P Q1 Q2 :
IntoSep P Q1 Q2 →
IntoSep (▶ P) (▶ Q1) (▶ Q2).
#[global] Instance from_orーbiglater P Q1 Q2 :
FromOr P Q1 Q2 →
FromOr (▶ P) (▶ Q1) (▶ Q2).
#[global] Instance into_orーbiglater P Q1 Q2 :
IntoOr P Q1 Q2 →
IntoOr (▶ P) (▶ Q1) (▶ Q2).
#[global] Instance from_existーbiglater {X} P (Φ : X → iProp Σ) :
FromExist P Φ →
FromExist (▶ P) (λ x, ▶ Φ x)%I.
#[global] Instance into_existーbiglater {X} P (Φ : X → iProp Σ) name :
IntoExist P Φ name →
Inhabited X →
IntoExist (▶ P) (λ a, ▶ (Φ a))%I name.
#[global] Instance into_forallーbiglater {X} P (Φ : X → iProp Σ) :
IntoForall P Φ →
IntoForall (▶ P) (λ x, ▶ Φ x)%I.
#[global] Instance frameーbiglater p R P Q :
Frame p R P Q →
Frame p R (▶ P) (▶ Q)
| 2.
#[global] Instance biglaterーstrong_modality :
ModalityStrongMono biglater.
End zoo۰G.
Require Export zoo.program_logic.wp.
Require Import zoo.diaframe.
Require Import zoo.options.
Section zoo۰G.
Context `{zoo۰G : !ZooG Σ}.
Implicit Type P : iProp Σ.
Definition biglater P : iProp Σ :=
∃ ns,
⧖ ns ∗
▷^(later۰function ns) P.
End zoo۰G.
Notation "▶ P" := (
biglater P
)(at level 20,
right associativity
) : bi_scope.
#[local] Instance : CustomIpat "biglater" :=
" ( %ns{} & #H⧖{_{}} & HP{} ) ".
Section zoo۰G.
Context `{zoo۰G : !ZooG Σ}.
Implicit Type P : iProp Σ.
#[global] Instance biglaterーne :
NonExpansive biglater.
#[global] Instance biglaterーproper :
Proper ((≡) ==> (≡)) biglater.
Lemma biglaterーintro P :
P ⊢ |==>
▶ P.
Lemma biglaterーmono P1 P2 :
(P1 ⊢ P2) →
(▶ P1) ⊢ ▶ P2.
#[global] Instance biglaterーmono' :
Proper ((⊢) ==> (⊢)) biglater.
#[global] Instance biglaterーflipーmono' :
Proper (flip (⊢) ==> flip (⊢)) biglater.
Lemma biglaterーor₁ P1 P2 :
▶ (P1 ∨ P2) ⊢
▶ P1 ∨ ▶ P2.
Lemma biglaterーor₂ P1 P2 :
▶ P1 ∨ ▶ P2 ⊢
▶ (P1 ∨ P2).
Lemma biglaterーor P1 P2 :
▶ (P1 ∨ P2) ⊣⊢
▶ P1 ∨ ▶ P2.
Lemma biglaterーand P1 P2 :
▶ (P1 ∧ P2) ⊢
▶ P1 ∧ ▶ P2.
Lemma biglaterーexist₁ `{!Inhabited X} (Φ : X → iProp Σ) :
▶ (∃ x, Φ x) ⊢
∃ x, ▶ Φ x.
Lemma biglaterーexist₂ `(Φ : X → iProp Σ) :
(∃ x, ▶ Φ x) ⊢
▶ ∃ x, Φ x.
Lemma biglaterーexist `{!Inhabited X} (Φ : X → iProp Σ) :
▶ (∃ x, Φ x) ⊣⊢
∃ x, ▶ Φ x.
Lemma biglaterー∀ `(Φ : X → iProp Σ) :
▶ (∀ x, Φ x) ⊢
∀ x, ▶ Φ x.
Lemma biglaterーsep₁ P1 P2 :
▶ (P1 ∗ P2) ⊢
▶ P1 ∗
▶ P2.
Lemma biglaterーsep₂ P1 P2 :
▶ P1 -∗
▶ P2 -∗
▶ (P1 ∗ P2).
Lemma biglaterーsep P1 P2 :
▶ (P1 ∗ P2) ⊣⊢
▶ P1 ∗
▶ P2.
Lemma biglaterーframeーl P1 P2 :
P1 -∗
▶ P2 -∗
▶ (P1 ∗ P2).
Lemma biglaterーframeーr P1 P2 :
▶ P1 -∗
P2 -∗
▶ (P1 ∗ P2).
Lemma biglaterーwandーl P1 P2 :
(P1 -∗ P2) -∗
(▶ P1) -∗
▶ P2.
Lemma biglaterーwandーr P1 P2 :
(▶ P1) -∗
(P1 -∗ P2) -∗
▶ P2.
Lemma biglaterーpersistently P :
▶ <pers> P ⊢
<pers> ▶ P.
End zoo۰G.
Section zoo۰G.
Context `{zoo۰G : !ZooG Σ}.
Implicit Type P : iProp Σ.
#[global] Instance into_wandーbiglater p q R P Q :
IntoWand false false R P Q →
IntoWand p q (▶ R) (▶ P) (▶ Q).
#[global] Instance into_wandーbiglaterーargs p q R P Q :
IntoWand p false R P Q →
IntoWand' p q R (▶ P) (▶ Q).
#[global] Instance from_sepーbiglater P Q1 Q2 :
FromSep P Q1 Q2 →
FromSep (▶ P) (▶ Q1) (▶ Q2).
#[global] Instance maybe_combine_sep_asーbiglater Q1 Q2 P progress :
MaybeCombineSepAs Q1 Q2 P progress →
MaybeCombineSepAs (▶ Q1) (▶ Q2) (▶ P) progress.
#[global] Instance combine_sep_givesーbiglater Q1 Q2 P :
CombineSepGives Q1 Q2 P →
CombineSepGives (▶ Q1) (▶ Q2) (▶ P).
#[global] Instance into_andーbiglater P Q1 Q2 :
IntoAnd false P Q1 Q2 →
IntoAnd false (▶ P) (▶ Q1) (▶ Q2).
#[global] Instance into_sepーbiglater P Q1 Q2 :
IntoSep P Q1 Q2 →
IntoSep (▶ P) (▶ Q1) (▶ Q2).
#[global] Instance from_orーbiglater P Q1 Q2 :
FromOr P Q1 Q2 →
FromOr (▶ P) (▶ Q1) (▶ Q2).
#[global] Instance into_orーbiglater P Q1 Q2 :
IntoOr P Q1 Q2 →
IntoOr (▶ P) (▶ Q1) (▶ Q2).
#[global] Instance from_existーbiglater {X} P (Φ : X → iProp Σ) :
FromExist P Φ →
FromExist (▶ P) (λ x, ▶ Φ x)%I.
#[global] Instance into_existーbiglater {X} P (Φ : X → iProp Σ) name :
IntoExist P Φ name →
Inhabited X →
IntoExist (▶ P) (λ a, ▶ (Φ a))%I name.
#[global] Instance into_forallーbiglater {X} P (Φ : X → iProp Σ) :
IntoForall P Φ →
IntoForall (▶ P) (λ x, ▶ Φ x)%I.
#[global] Instance frameーbiglater p R P Q :
Frame p R P Q →
Frame p R (▶ P) (▶ Q)
| 2.
#[global] Instance biglaterーstrong_modality :
ModalityStrongMono biglater.
End zoo۰G.