Commit 5d6b3364 authored by Jacques-Henri Jourdan's avatar Jacques-Henri Jourdan

bi_later->sbi_later.

parent 56dcb30c
......@@ -77,7 +77,7 @@ Proof.
Qed.
Lemma except_0_bupd P : (|==> P) (|==> P).
Proof.
rewrite /bi_except_0. apply or_elim; auto using bupd_mono, or_intro_r.
rewrite /sbi_except_0. apply or_elim; auto using bupd_mono, or_intro_r.
by rewrite -bupd_intro -or_intro_l.
Qed.
......
......@@ -10,7 +10,7 @@ Lemma soundness φ n : (▷^n ⌜ φ ⌝ : uPred M)%I → φ.
Proof.
cut ((^n φ : uPred M)%I n ε φ).
{ intros help H. eapply help, H; eauto using ucmra_unit_validN. by unseal. }
rewrite /bi_laterN; unseal. induction n as [|n IH]=> H; auto.
rewrite /sbi_laterN; unseal. induction n as [|n IH]=> H; auto.
Qed.
Corollary consistency_modal n : ¬ (^n False : uPred M)%I.
......
......@@ -341,7 +341,7 @@ Definition unseal_eqs :=
Ltac unseal := (* Coq unfold is used to circumvent bug #5699 in rewrite /foo *)
unfold bi_emp; simpl;
unfold uPred_emp, bi_pure, bi_and, bi_or, bi_impl, bi_forall, bi_exist,
bi_internal_eq, bi_sep, bi_wand, bi_plainly, bi_persistently, bi_later; simpl;
bi_internal_eq, bi_sep, bi_wand, bi_plainly, bi_persistently, sbi_later; simpl;
unfold sbi_emp, sbi_pure, sbi_and, sbi_or, sbi_impl, sbi_forall, sbi_exist,
sbi_internal_eq, sbi_sep, sbi_wand, sbi_plainly, sbi_persistently; simpl;
rewrite !unseal_eqs /=.
......@@ -516,7 +516,7 @@ Lemma uPred_sbi_mixin (M : ucmraT) : SBIMixin
uPred_sep uPred_plainly uPred_persistently uPred_later.
Proof.
split.
- (* Contractive bi_later *)
- (* Contractive sbi_later *)
unseal; intros [|n] P Q HPQ; split=> -[|n'] x ?? //=; try omega.
apply HPQ; eauto using cmra_validN_S.
- (* Next x ≡ Next y ⊢ ▷ (x ≡ y) *)
......@@ -645,7 +645,7 @@ Lemma ownM_unit : bi_valid (uPred_ownM (ε:M)).
Proof. unseal; split=> n x ??; by exists x; rewrite left_id. Qed.
Lemma later_ownM (a : M) : uPred_ownM a b, uPred_ownM b (a b).
Proof.
rewrite /bi_and /bi_later /bi_exist /bi_internal_eq /=; unseal.
rewrite /bi_and /sbi_later /bi_exist /bi_internal_eq /=; unseal.
split=> -[|n] x /= ? Hax; first by eauto using ucmra_unit_leastN.
destruct Hax as [y ?].
destruct (cmra_extend n x a y) as (a'&y'&Hx&?&?); auto using cmra_validN_S.
......
......@@ -94,20 +94,20 @@ Fixpoint bi_hforall {PROP : bi} {As} : himpl As PROP → PROP :=
| tcons A As => λ Φ, x, bi_hforall (Φ x)
end%I.
Definition bi_laterN {PROP : sbi} (n : nat) (P : PROP) : PROP :=
Nat.iter n bi_later P.
Arguments bi_laterN {_} !_%nat_scope _%I.
Instance: Params (@bi_laterN) 2.
Notation "▷^ n P" := (bi_laterN n P)
Definition sbi_laterN {PROP : sbi} (n : nat) (P : PROP) : PROP :=
Nat.iter n sbi_later P.
Arguments sbi_laterN {_} !_%nat_scope _%I.
Instance: Params (@sbi_laterN) 2.
Notation "▷^ n P" := (sbi_laterN n P)
(at level 20, n at level 9, P at level 20, format "▷^ n P") : bi_scope.
Notation "▷? p P" := (bi_laterN (Nat.b2n p) P)
Notation "▷? p P" := (sbi_laterN (Nat.b2n p) P)
(at level 20, p at level 9, P at level 20, format "▷? p P") : bi_scope.
Definition bi_except_0 {PROP : sbi} (P : PROP) : PROP := ( False P)%I.
Arguments bi_except_0 {_} _%I : simpl never.
Notation "◇ P" := (bi_except_0 P) (at level 20, right associativity) : bi_scope.
Instance: Params (@bi_except_0) 1.
Typeclasses Opaque bi_except_0.
Definition sbi_except_0 {PROP : sbi} (P : PROP) : PROP := ( False P)%I.
Arguments sbi_except_0 {_} _%I : simpl never.
Notation "◇ P" := (sbi_except_0 P) (at level 20, right associativity) : bi_scope.
Instance: Params (@sbi_except_0) 1.
Typeclasses Opaque sbi_except_0.
Class Timeless {PROP : sbi} (P : PROP) := timeless : P P.
Arguments Timeless {_} _%I : simpl never.
......
This diff is collapsed.
......@@ -23,7 +23,7 @@ Section bi_mixin.
Context (bi_wand : PROP PROP PROP).
Context (bi_plainly : PROP PROP).
Context (bi_persistently : PROP PROP).
Context (bi_later : PROP PROP).
Context (sbi_later : PROP PROP).
Local Infix "⊢" := bi_entails.
Local Notation "'emp'" := bi_emp.
......@@ -40,7 +40,7 @@ Section bi_mixin.
Local Notation "x ≡ y" := (bi_internal_eq _ x y).
Local Infix "∗" := bi_sep.
Local Infix "-∗" := bi_wand.
Local Notation "▷ P" := (bi_later P).
Local Notation "▷ P" := (sbi_later P).
Record BIMixin := {
bi_mixin_entails_po : PreOrder bi_entails;
......@@ -142,7 +142,7 @@ Section bi_mixin.
}.
Record SBIMixin := {
sbi_mixin_later_contractive : Contractive bi_later;
sbi_mixin_later_contractive : Contractive sbi_later;
sbi_mixin_later_eq_1 {A : ofeT} (x y : A) : Next x Next y (x y);
sbi_mixin_later_eq_2 {A : ofeT} (x y : A) : (x y) Next x Next y;
......@@ -241,14 +241,14 @@ Structure sbi := SBI {
sbi_wand : sbi_car sbi_car sbi_car;
sbi_plainly : sbi_car sbi_car;
sbi_persistently : sbi_car sbi_car;
bi_later : sbi_car sbi_car;
sbi_later : sbi_car sbi_car;
sbi_ofe_mixin : OfeMixin sbi_car;
sbi_bi_mixin : BIMixin sbi_ofe_mixin sbi_entails sbi_emp sbi_pure sbi_and
sbi_or sbi_impl sbi_forall sbi_exist sbi_internal_eq
sbi_sep sbi_wand sbi_plainly sbi_persistently;
sbi_sbi_mixin : SBIMixin sbi_entails sbi_pure sbi_or sbi_impl
sbi_forall sbi_exist sbi_internal_eq
sbi_sep sbi_plainly sbi_persistently bi_later;
sbi_sep sbi_plainly sbi_persistently sbi_later;
}.
Arguments sbi_car : simpl never.
......@@ -288,7 +288,7 @@ Arguments sbi_sep {PROP} _%I _%I : simpl never, rename.
Arguments sbi_wand {PROP} _%I _%I : simpl never, rename.
Arguments sbi_plainly {PROP} _%I : simpl never, rename.
Arguments sbi_persistently {PROP} _%I : simpl never, rename.
Arguments bi_later {PROP} _%I : simpl never, rename.
Arguments sbi_later {PROP} _%I : simpl never, rename.
Hint Extern 0 (bi_entails _ _) => reflexivity.
Instance bi_rewrite_relation (PROP : bi) : RewriteRelation (@bi_entails PROP).
......@@ -321,7 +321,7 @@ Notation "∃ x .. y , P" :=
(bi_exist (λ x, .. (bi_exist (λ y, P)) ..)%I) : bi_scope.
Infix "≡" := bi_internal_eq : bi_scope.
Notation "▷ P" := (bi_later P) : bi_scope.
Notation "▷ P" := (sbi_later P) : bi_scope.
Coercion bi_valid {PROP : bi} (P : PROP) : Prop := emp P.
Coercion sbi_valid {PROP : sbi} : PROP Prop := bi_valid.
......@@ -488,7 +488,7 @@ Context {PROP : sbi}.
Implicit Types φ : Prop.
Implicit Types P Q R : PROP.
Global Instance later_contractive : Contractive (@bi_later PROP).
Global Instance later_contractive : Contractive (@sbi_later PROP).
Proof. eapply sbi_mixin_later_contractive, sbi_sbi_mixin. Qed.
Lemma later_eq_1 {A : ofeT} (x y : A) : Next x Next y (x y : PROP).
......
......@@ -956,7 +956,7 @@ Global Instance into_sep_affinely_later `{!Timeless (emp%I : PROP)} P Q1 Q2 :
Proof.
rewrite /IntoSep /= => ?? ->.
rewrite -{1}(affine_affinely Q1) -{1}(affine_affinely Q2) later_sep !later_affinely_1.
rewrite -except_0_sep /bi_except_0 affinely_or. apply or_elim, affinely_elim.
rewrite -except_0_sep /sbi_except_0 affinely_or. apply or_elim, affinely_elim.
rewrite -(idemp bi_and (bi_affinely ( False))%I) persistent_and_sep_1.
by rewrite -(False_elim Q1) -(False_elim Q2).
Qed.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment