Commit 5524871e authored by Jacques-Henri Jourdan's avatar Jacques-Henri Jourdan

AffineBI -> BiAffine, PositiveBI -> BiPositive.

parent d831f1e2
......@@ -32,7 +32,7 @@ Proof.
Qed.
(* Affine *)
Global Instance uPred_affine : AffineBI (uPredI M) | 0.
Global Instance uPred_affine : BiAffine (uPredI M) | 0.
Proof. intros P. rewrite /Affine. by apply bi.pure_intro. Qed.
(* Own and valid derived *)
......@@ -131,6 +131,6 @@ Proof. split; [split; try apply _|]. apply ownM_op. apply ownM_unit'. Qed.
End derived.
(* Also add this to the global hint database, otherwise [eauto] won't work for
many lemmas that have [AffineBI] as a premise. *)
many lemmas that have [BiAffine] as a premise. *)
Hint Immediate uPred_affine.
End uPred.
This diff is collapsed.
......@@ -5,7 +5,7 @@ Set Default Proof Using "Type*".
(** This proves that we need the ▷ in a "Saved Proposition" construction with
name-dependent allocation. *)
Module savedprop. Section savedprop.
Context `{AffineBI PROP}.
Context `{BiAffine PROP}.
Notation "¬ P" := ( (P False))%I : bi_scope.
Implicit Types P : PROP.
......@@ -65,7 +65,7 @@ End savedprop. End savedprop.
(** This proves that we need the ▷ when opening invariants. *)
Module inv. Section inv.
Context `{AffineBI PROP}.
Context `{BiAffine PROP}.
Implicit Types P : PROP.
(** Assumptions *)
......
This diff is collapsed.
......@@ -32,7 +32,7 @@ Module bi_reflection. Section bi_reflection.
Qed.
(* Can be related to the RHS being affine *)
Lemma flatten_entails `{AffineBI PROP} Σ e1 e2 :
Lemma flatten_entails `{BiAffine PROP} Σ e1 e2 :
flatten e2 + flatten e1 eval Σ e1 eval Σ e2.
Proof. intros. rewrite !eval_flatten. by apply big_sepL_submseteq. Qed.
Lemma flatten_equiv Σ e1 e2 :
......
......@@ -50,7 +50,7 @@ Proof.
rewrite /FromAssumption /= =><-.
by rewrite persistently_elim plainly_elim_persistently.
Qed.
Global Instance from_assumption_plainly_l_false `{AffineBI PROP} P Q :
Global Instance from_assumption_plainly_l_false `{BiAffine PROP} P Q :
FromAssumption true P Q FromAssumption false (bi_plainly P) Q.
Proof.
rewrite /FromAssumption /= =><-.
......@@ -62,7 +62,7 @@ Proof. rewrite /FromAssumption /= =><-. by rewrite affinely_persistently_if_elim
Global Instance from_assumption_persistently_l_true P Q :
FromAssumption true P Q FromAssumption true (bi_persistently P) Q.
Proof. rewrite /FromAssumption /= =><-. by rewrite persistently_idemp. Qed.
Global Instance from_assumption_persistently_l_false `{AffineBI PROP} P Q :
Global Instance from_assumption_persistently_l_false `{BiAffine PROP} P Q :
FromAssumption true P Q FromAssumption false (bi_persistently P) Q.
Proof. rewrite /FromAssumption /= =><-. by rewrite affine_affinely. Qed.
Global Instance from_assumption_affinely_l_true p P Q :
......@@ -224,7 +224,7 @@ Proof.
rewrite /FromAssumption /IntoWand=> HP. by rewrite HP affinely_persistently_if_elim.
Qed.
Global Instance into_wand_impl_false_false `{!AffineBI PROP} P Q P' :
Global Instance into_wand_impl_false_false `{!BiAffine PROP} P Q P' :
FromAssumption false P P' IntoWand false false (P' Q) P Q.
Proof.
rewrite /FromAssumption /IntoWand /= => ->. apply wand_intro_r.
......@@ -274,7 +274,7 @@ Proof. by rewrite /IntoWand affinely_plainly_elim. Qed.
Global Instance into_wand_plainly_true q R P Q :
IntoWand true q R P Q IntoWand true q (bi_plainly R) P Q.
Proof. by rewrite /IntoWand /= persistently_plainly plainly_elim_persistently. Qed.
Global Instance into_wand_plainly_false `{!AffineBI PROP} q R P Q :
Global Instance into_wand_plainly_false `{!BiAffine PROP} q R P Q :
IntoWand false q R P Q IntoWand false q (bi_plainly R) P Q.
Proof. by rewrite /IntoWand plainly_elim. Qed.
......@@ -284,7 +284,7 @@ Proof. by rewrite /IntoWand affinely_persistently_elim. Qed.
Global Instance into_wand_persistently_true q R P Q :
IntoWand true q R P Q IntoWand true q (bi_persistently R) P Q.
Proof. by rewrite /IntoWand /= persistently_idemp. Qed.
Global Instance into_wand_persistently_false `{!AffineBI PROP} q R P Q :
Global Instance into_wand_persistently_false `{!BiAffine PROP} q R P Q :
IntoWand false q R P Q IntoWand false q (bi_persistently R) P Q.
Proof. by rewrite /IntoWand persistently_elim. Qed.
......@@ -388,7 +388,7 @@ Proof.
by rewrite -(affine_affinely Q) affinely_and_r affinely_and (from_affinely P').
Qed.
Global Instance into_and_sep `{PositiveBI PROP} P Q : IntoAnd true (P Q) P Q.
Global Instance into_and_sep `{BiPositive PROP} P Q : IntoAnd true (P Q) P Q.
Proof.
by rewrite /IntoAnd /= persistently_sep -and_sep_persistently persistently_and.
Qed.
......@@ -460,10 +460,10 @@ Global Instance into_sep_affinely P Q1 Q2 :
IntoSep P Q1 Q2 IntoSep (bi_affinely P) Q1 Q2 | 20.
Proof. rewrite /IntoSep /= => ->. by rewrite affinely_elim. Qed.
Global Instance into_sep_plainly `{PositiveBI PROP} P Q1 Q2 :
Global Instance into_sep_plainly `{BiPositive PROP} P Q1 Q2 :
IntoSep P Q1 Q2 IntoSep (bi_plainly P) (bi_plainly Q1) (bi_plainly Q2).
Proof. rewrite /IntoSep /= => ->. by rewrite plainly_sep. Qed.
Global Instance into_sep_persistently `{PositiveBI PROP} P Q1 Q2 :
Global Instance into_sep_persistently `{BiPositive PROP} P Q1 Q2 :
IntoSep P Q1 Q2
IntoSep (bi_persistently P) (bi_persistently Q1) (bi_persistently Q2).
Proof. rewrite /IntoSep /= => ->. by rewrite persistently_sep. Qed.
......@@ -609,7 +609,7 @@ Proof.
- by rewrite (into_pure P) -pure_wand_forall wand_elim_l.
Qed.
Global Instance from_forall_affinely `{AffineBI PROP} {A} P (Φ : A PROP) :
Global Instance from_forall_affinely `{BiAffine PROP} {A} P (Φ : A PROP) :
FromForall P Φ FromForall (bi_affinely P)%I (λ a, bi_affinely (Φ a))%I.
Proof.
rewrite /FromForall=> <-. rewrite affine_affinely. by setoid_rewrite affinely_elim.
......@@ -1234,7 +1234,7 @@ Global Instance from_later_sep n P1 P2 Q1 Q2 :
FromLaterN n P1 Q1 FromLaterN n P2 Q2 FromLaterN n (P1 P2) (Q1 Q2).
Proof. intros ??; red. by rewrite laterN_sep; apply sep_mono. Qed.
Global Instance from_later_affinely n P Q `{AffineBI PROP} :
Global Instance from_later_affinely n P Q `{BiAffine PROP} :
FromLaterN n P Q FromLaterN n (bi_affinely P) (bi_affinely Q).
Proof. rewrite /FromLaterN=><-. by rewrite affinely_elim affine_affinely. Qed.
Global Instance from_later_plainly n P Q :
......
......@@ -458,7 +458,7 @@ Global Instance affine_env_snoc Γ i P :
Proof. by constructor. Qed.
(* If the BI is affine, no need to walk on the whole environment. *)
Global Instance affine_env_bi `(AffineBI PROP) Γ : AffineEnv Γ | 0.
Global Instance affine_env_bi `(BiAffine PROP) Γ : AffineEnv Γ | 0.
Proof. induction Γ; apply _. Qed.
Instance affine_env_spatial Δ :
......@@ -800,7 +800,7 @@ Lemma tac_specialize_persistent_helper Δ Δ'' j q P R R' Q :
envs_lookup j Δ = Some (q,P)
envs_entails Δ (bi_absorbingly R)
IntoPersistent false R R'
(if q then TCTrue else AffineBI PROP)
(if q then TCTrue else BiAffine PROP)
envs_replace j q true (Esnoc Enil j R') Δ = Some Δ''
envs_entails Δ'' Q envs_entails Δ Q.
Proof.
......
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