Skip to content
Snippets Groups Projects
Commit d3f9e01a authored by Ralf Jung's avatar Ralf Jung
Browse files

remove of_envs_eq'; add of_envs_alt

parent f7840f2a
No related branches found
No related tags found
No related merge requests found
...@@ -47,6 +47,7 @@ lemma. ...@@ -47,6 +47,7 @@ lemma.
* Change `of_envs` such that when the persistent context is empty, the * Change `of_envs` such that when the persistent context is empty, the
persistence modality no longer appears at all. This is a step towards using persistence modality no longer appears at all. This is a step towards using
the proofmode in logics without a persistence modality. the proofmode in logics without a persistence modality.
The lemma `of_envs_alt` shows equivalence with the old version.
**Changes in `base_logic`:** **Changes in `base_logic`:**
......
...@@ -274,15 +274,15 @@ Section lemmas. ...@@ -274,15 +274,15 @@ Section lemmas.
Qed. Qed.
Lemma aupd_intro P Q α β Eo Ei Φ : Lemma aupd_intro P Q α β Eo Ei Φ :
Affine P Persistent P Laterable Q Absorbing P Persistent P Laterable Q
(P Q -∗ atomic_acc Eo Ei α Q β Φ) (P Q -∗ atomic_acc Eo Ei α Q β Φ)
P Q -∗ atomic_update Eo Ei α β Φ. P Q -∗ atomic_update Eo Ei α β Φ.
Proof. Proof.
rewrite atomic_update_unseal {1}/atomic_update_def /=. rewrite atomic_update_unseal {1}/atomic_update_def /=.
iIntros (??? HAU) "[#HP HQ]". iIntros (??? HAU) "[#HP HQ]".
iApply (greatest_fixpoint_coiter _ (λ _, Q)); last done. iIntros "!>" ([]) "HQ". iApply (greatest_fixpoint_coiter _ (λ _, Q)); last done. iIntros "!>" ([]) "HQ".
iApply (make_laterable_intro Q with "[] HQ"). iIntros "!> HQ". iApply (make_laterable_intro Q with "[] HQ"). iIntros "!> HQ".
iApply HAU. by iFrame. iApply HAU. iSplit; by iFrame.
Qed. Qed.
Lemma aacc_intro Eo Ei α P β Φ : Lemma aacc_intro Eo Ei α P β Φ :
...@@ -462,10 +462,9 @@ Section proof_mode. ...@@ -462,10 +462,9 @@ Section proof_mode.
envs_entails (Envs Γp Γs n) (atomic_acc Eo Ei α P β Φ) envs_entails (Envs Γp Γs n) (atomic_acc Eo Ei α P β Φ)
envs_entails (Envs Γp Γs n) (atomic_update Eo Ei α β Φ). envs_entails (Envs Γp Γs n) (atomic_update Eo Ei α β Φ).
Proof. Proof.
intros ? HΓs ->. rewrite envs_entails_unseal of_envs_eq' /atomic_acc /=. intros ? HΓs ->. rewrite envs_entails_unseal of_envs_eq /atomic_acc /=.
setoid_rewrite env_to_prop_sound =>HAU. setoid_rewrite env_to_prop_sound =>HAU.
rewrite bi.persistent_and_sep_assoc. apply: aupd_intro. rewrite assoc. apply: aupd_intro. by rewrite -assoc.
by rewrite -bi.persistent_and_sep_assoc.
Qed. Qed.
End proof_mode. End proof_mode.
......
...@@ -391,15 +391,19 @@ Lemma of_envs_eq Δ : ...@@ -391,15 +391,19 @@ Lemma of_envs_eq Δ :
env_and_persistently (env_intuitionistic Δ) env_and_persistently (env_intuitionistic Δ)
[] env_spatial Δ)%I. [] env_spatial Δ)%I.
Proof. done. Qed. Proof. done. Qed.
(** An environment is a ∗ of something intuitionistic and the spatial environment.
TODO: Can we define it as such? *) Lemma of_envs'_alt Γp Γs :
Lemma of_envs_eq' Δ : of_envs' Γp Γs ⊣⊢ envs_wf' Γp Γs [] Γp [] Γs.
of_envs Δ ⊣⊢
envs_wf Δ <affine> env_and_persistently (env_intuitionistic Δ) [] env_spatial Δ.
Proof. Proof.
rewrite of_envs_eq [(env_and_persistently _ _)%I]persistent_and_affinely_sep_l. rewrite /of_envs'. f_equiv.
rewrite persistent_and_sep_assoc //. rewrite -persistent_and_affinely_sep_l. f_equiv.
clear. induction Γp as [|Γp IH ? Q]; simpl.
{ apply (anti_symm ()); last by apply True_intro. apply persistently_True. }
rewrite IH persistently_and. done.
Qed. Qed.
Lemma of_envs_alt Δ :
of_envs Δ ⊣⊢ envs_wf Δ [] env_intuitionistic Δ [] env_spatial Δ.
Proof. rewrite /of_envs of_envs'_alt //. Qed.
Global Instance envs_Forall2_refl (R : relation PROP) : Global Instance envs_Forall2_refl (R : relation PROP) :
Reflexive R Reflexive (envs_Forall2 R). Reflexive R Reflexive (envs_Forall2 R).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment