Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pierre Roux
Iris
Commits
f9b965cf
Commit
f9b965cf
authored
2 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
rename env_and_pers → env_and_persistently
parent
7fd2a308
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
iris/proofmode/coq_tactics.v
+2
-2
2 additions, 2 deletions
iris/proofmode/coq_tactics.v
iris/proofmode/environments.v
+12
-12
12 additions, 12 deletions
iris/proofmode/environments.v
iris/proofmode/modalities.v
+0
-1
0 additions, 1 deletion
iris/proofmode/modalities.v
with
14 additions
and
15 deletions
iris/proofmode/coq_tactics.v
+
2
−
2
View file @
f9b965cf
...
@@ -922,7 +922,7 @@ Class TransformIntuitionisticEnv {PROP1 PROP2} (M : modality PROP1 PROP2)
...
@@ -922,7 +922,7 @@ Class TransformIntuitionisticEnv {PROP1 PROP2} (M : modality PROP1 PROP2)
transform_intuitionistic_env
:
transform_intuitionistic_env
:
(
∀
P
Q
,
C
P
Q
→
□
P
⊢
M
(
□
Q
))
→
(
∀
P
Q
,
C
P
Q
→
□
P
⊢
M
(
□
Q
))
→
(
∀
P
Q
,
M
P
∧
M
Q
⊢
M
(
P
∧
Q
))
→
(
∀
P
Q
,
M
P
∧
M
Q
⊢
M
(
P
∧
Q
))
→
<
affine
>
env_and_pers
Γin
⊢
M
(
<
affine
>
env_and_pers
Γout
);
<
affine
>
env_and_pers
istently
Γin
⊢
M
(
<
affine
>
env_and_pers
istently
Γout
);
transform_intuitionistic_env_wf
:
env_wf
Γin
→
env_wf
Γout
;
transform_intuitionistic_env_wf
:
env_wf
Γin
→
env_wf
Γout
;
transform_intuitionistic_env_dom
i
:
Γin
!!
i
=
None
→
Γout
!!
i
=
None
;
transform_intuitionistic_env_dom
i
:
Γin
!!
i
=
None
→
Γout
!!
i
=
None
;
}
.
}
.
...
@@ -1147,7 +1147,7 @@ Lemma into_laterN_env_sound {PROP : bi} n (Δ1 Δ2 : envs PROP) :
...
@@ -1147,7 +1147,7 @@ Lemma into_laterN_env_sound {PROP : bi} n (Δ1 Δ2 : envs PROP) :
MaybeIntoLaterNEnvs
n
Δ1
Δ2
→
of_envs
Δ1
⊢
▷^
n
(
of_envs
Δ2
)
.
MaybeIntoLaterNEnvs
n
Δ1
Δ2
→
of_envs
Δ1
⊢
▷^
n
(
of_envs
Δ2
)
.
Proof
.
Proof
.
intros
[[
Hp
??]
[
Hs
??]];
rewrite
!
of_envs_eq
.
intros
[[
Hp
??]
[
Hs
??]];
rewrite
!
of_envs_eq
.
rewrite
!
[(
env_and_pers
_
∧
_)
%
I
]
persistent_and_affinely_sep_l
.
rewrite
!
[(
env_and_pers
istently
_
∧
_)
%
I
]
persistent_and_affinely_sep_l
.
rewrite
!
laterN_and
!
laterN_sep
.
rewrite
!
laterN_and
!
laterN_sep
.
rewrite
-
{
1
}
laterN_intro
.
apply
and_mono
,
sep_mono
.
rewrite
-
{
1
}
laterN_intro
.
apply
and_mono
,
sep_mono
.
-
apply
pure_mono
;
destruct
1
;
constructor
;
naive_solver
.
-
apply
pure_mono
;
destruct
1
;
constructor
;
naive_solver
.
...
...
This diff is collapsed.
Click to expand it.
iris/proofmode/environments.v
+
12
−
12
View file @
f9b965cf
...
@@ -248,10 +248,10 @@ Record envs_wf' {PROP : bi} (Γp Γs : env PROP) := {
...
@@ -248,10 +248,10 @@ Record envs_wf' {PROP : bi} (Γp Γs : env PROP) := {
Definition
envs_wf
{
PROP
:
bi
}
(
Δ
:
envs
PROP
)
:=
Definition
envs_wf
{
PROP
:
bi
}
(
Δ
:
envs
PROP
)
:=
envs_wf'
(
env_intuitionistic
Δ
)
(
env_spatial
Δ
)
.
envs_wf'
(
env_intuitionistic
Δ
)
(
env_spatial
Δ
)
.
Notation
env_and_pers
Γ
:=
([
∧
list
]
P
∈
env_to_list
Γ
,
<
pers
>
P
)
%
I
.
Notation
env_and_pers
istently
Γ
:=
([
∧
list
]
P
∈
env_to_list
Γ
,
<
pers
>
P
)
%
I
.
Definition
of_envs'
{
PROP
:
bi
}
(
Γp
Γs
:
env
PROP
)
:
PROP
:=
Definition
of_envs'
{
PROP
:
bi
}
(
Γp
Γs
:
env
PROP
)
:
PROP
:=
(
⌜
envs_wf'
Γp
Γs
⌝
∧
env_and_pers
Γp
∧
[
∗
]
Γs
)
%
I
.
(
⌜
envs_wf'
Γp
Γs
⌝
∧
env_and_pers
istently
Γp
∧
[
∗
]
Γs
)
%
I
.
Global
Instance
:
Params
(
@
of_envs'
)
1
:=
{}
.
Global
Instance
:
Params
(
@
of_envs'
)
1
:=
{}
.
Definition
of_envs
{
PROP
:
bi
}
(
Δ
:
envs
PROP
)
:
PROP
:=
Definition
of_envs
{
PROP
:
bi
}
(
Δ
:
envs
PROP
)
:
PROP
:=
of_envs'
(
env_intuitionistic
Δ
)
(
env_spatial
Δ
)
.
of_envs'
(
env_intuitionistic
Δ
)
(
env_spatial
Δ
)
.
...
@@ -388,16 +388,16 @@ Implicit Types P Q : PROP.
...
@@ -388,16 +388,16 @@ Implicit Types P Q : PROP.
Lemma
of_envs_eq
Δ
:
Lemma
of_envs_eq
Δ
:
of_envs
Δ
=
of_envs
Δ
=
(
⌜
envs_wf
Δ
⌝
∧
(
⌜
envs_wf
Δ
⌝
∧
env_and_pers
(
env_intuitionistic
Δ
)
∧
env_and_pers
istently
(
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.
(** An environment is a ∗ of something intuitionistic and the spatial environment.
TODO: Can we define it as such? *)
TODO: Can we define it as such? *)
Lemma
of_envs_eq'
Δ
:
Lemma
of_envs_eq'
Δ
:
of_envs
Δ
⊣⊢
of_envs
Δ
⊣⊢
⌜
envs_wf
Δ
⌝
∧
<
affine
>
env_and_pers
(
env_intuitionistic
Δ
)
∗
[
∗
]
env_spatial
Δ
.
⌜
envs_wf
Δ
⌝
∧
<
affine
>
env_and_pers
istently
(
env_intuitionistic
Δ
)
∗
[
∗
]
env_spatial
Δ
.
Proof
.
Proof
.
rewrite
of_envs_eq
[(
env_and_pers
_
∧
_)
%
I
]
persistent_and_affinely_sep_l
.
rewrite
of_envs_eq
[(
env_and_pers
istently
_
∧
_)
%
I
]
persistent_and_affinely_sep_l
.
rewrite
persistent_and_sep_assoc
//.
rewrite
persistent_and_sep_assoc
//.
Qed
.
Qed
.
...
@@ -600,7 +600,7 @@ Qed.
...
@@ -600,7 +600,7 @@ Qed.
Lemma
envs_app_sound
Δ
Δ'
p
Γ
:
Lemma
envs_app_sound
Δ
Δ'
p
Γ
:
envs_app
p
Γ
Δ
=
Some
Δ'
→
envs_app
p
Γ
Δ
=
Some
Δ'
→
of_envs
Δ
⊢
(
if
p
then
<
affine
>
env_and_pers
Γ
else
[
∗
]
Γ
)
-∗
of_envs
Δ'
.
of_envs
Δ
⊢
(
if
p
then
<
affine
>
env_and_pers
istently
Γ
else
[
∗
]
Γ
)
-∗
of_envs
Δ'
.
Proof
.
Proof
.
rewrite
!
of_envs_eq
/
envs_app
=>
?;
apply
pure_elim_l
=>
Hwf
.
rewrite
!
of_envs_eq
/
envs_app
=>
?;
apply
pure_elim_l
=>
Hwf
.
destruct
Δ
as
[
Γp
Γs
],
p
;
simplify_eq
/=.
destruct
Δ
as
[
Γp
Γs
],
p
;
simplify_eq
/=.
...
@@ -632,7 +632,7 @@ Proof. move=> /envs_app_sound. destruct p; by rewrite /= right_id. Qed.
...
@@ -632,7 +632,7 @@ Proof. move=> /envs_app_sound. destruct p; by rewrite /= right_id. Qed.
Lemma
envs_simple_replace_sound'
Δ
Δ'
i
p
Γ
:
Lemma
envs_simple_replace_sound'
Δ
Δ'
i
p
Γ
:
envs_simple_replace
i
p
Γ
Δ
=
Some
Δ'
→
envs_simple_replace
i
p
Γ
Δ
=
Some
Δ'
→
of_envs
(
envs_delete
true
i
p
Δ
)
⊢
of_envs
(
envs_delete
true
i
p
Δ
)
⊢
(
if
p
then
<
affine
>
env_and_pers
Γ
else
[
∗
]
Γ
)
-∗
of_envs
Δ'
.
(
if
p
then
<
affine
>
env_and_pers
istently
Γ
else
[
∗
]
Γ
)
-∗
of_envs
Δ'
.
Proof
.
Proof
.
rewrite
/
envs_simple_replace
/
envs_delete
!
of_envs_eq
=>
?
.
rewrite
/
envs_simple_replace
/
envs_delete
!
of_envs_eq
=>
?
.
apply
pure_elim_l
=>
Hwf
.
destruct
Δ
as
[
Γp
Γs
],
p
;
simplify_eq
/=.
apply
pure_elim_l
=>
Hwf
.
destruct
Δ
as
[
Γp
Γs
],
p
;
simplify_eq
/=.
...
@@ -666,13 +666,13 @@ Proof. move=> /envs_simple_replace_sound'. destruct p; by rewrite /= right_id. Q
...
@@ -666,13 +666,13 @@ Proof. move=> /envs_simple_replace_sound'. destruct p; by rewrite /= right_id. Q
Lemma
envs_simple_replace_sound
Δ
Δ'
i
p
P
Γ
:
Lemma
envs_simple_replace_sound
Δ
Δ'
i
p
P
Γ
:
envs_lookup
i
Δ
=
Some
(
p
,
P
)
→
envs_simple_replace
i
p
Γ
Δ
=
Some
Δ'
→
envs_lookup
i
Δ
=
Some
(
p
,
P
)
→
envs_simple_replace
i
p
Γ
Δ
=
Some
Δ'
→
of_envs
Δ
⊢
□
?p
P
∗
((
if
p
then
<
affine
>
env_and_pers
Γ
else
[
∗
]
Γ
)
-∗
of_envs
Δ'
)
.
of_envs
Δ
⊢
□
?p
P
∗
((
if
p
then
<
affine
>
env_and_pers
istently
Γ
else
[
∗
]
Γ
)
-∗
of_envs
Δ'
)
.
Proof
.
intros
.
by
rewrite
envs_lookup_sound
//
envs_simple_replace_sound'
//.
Qed
.
Proof
.
intros
.
by
rewrite
envs_lookup_sound
//
envs_simple_replace_sound'
//.
Qed
.
Lemma
envs_simple_replace_maybe_sound
Δ
Δ'
i
p
P
Γ
:
Lemma
envs_simple_replace_maybe_sound
Δ
Δ'
i
p
P
Γ
:
envs_lookup
i
Δ
=
Some
(
p
,
P
)
→
envs_simple_replace
i
p
Γ
Δ
=
Some
Δ'
→
envs_lookup
i
Δ
=
Some
(
p
,
P
)
→
envs_simple_replace
i
p
Γ
Δ
=
Some
Δ'
→
of_envs
Δ
⊢
of_envs
Δ
⊢
□
?p
P
∗
(((
if
p
then
<
affine
>
env_and_pers
Γ
else
[
∗
]
Γ
)
-∗
of_envs
Δ'
)
∧
□
?p
P
∗
(((
if
p
then
<
affine
>
env_and_pers
istently
Γ
else
[
∗
]
Γ
)
-∗
of_envs
Δ'
)
∧
(
□
?p
P
-∗
of_envs
Δ
))
.
(
□
?p
P
-∗
of_envs
Δ
))
.
Proof
.
Proof
.
intros
.
apply
pure_elim
with
(
envs_wf
Δ
)
.
intros
.
apply
pure_elim
with
(
envs_wf
Δ
)
.
...
@@ -693,7 +693,7 @@ Qed.
...
@@ -693,7 +693,7 @@ Qed.
Lemma
envs_replace_sound'
Δ
Δ'
i
p
q
Γ
:
Lemma
envs_replace_sound'
Δ
Δ'
i
p
q
Γ
:
envs_replace
i
p
q
Γ
Δ
=
Some
Δ'
→
envs_replace
i
p
q
Γ
Δ
=
Some
Δ'
→
of_envs
(
envs_delete
true
i
p
Δ
)
⊢
of_envs
(
envs_delete
true
i
p
Δ
)
⊢
(
if
q
then
<
affine
>
env_and_pers
Γ
else
[
∗
]
Γ
)
-∗
of_envs
Δ'
.
(
if
q
then
<
affine
>
env_and_pers
istently
Γ
else
[
∗
]
Γ
)
-∗
of_envs
Δ'
.
Proof
.
Proof
.
rewrite
/
envs_replace
;
destruct
(
beq
_
_)
eqn
:
Hpq
.
rewrite
/
envs_replace
;
destruct
(
beq
_
_)
eqn
:
Hpq
.
-
apply
eqb_prop
in
Hpq
as
->
.
apply
envs_simple_replace_sound'
.
-
apply
eqb_prop
in
Hpq
as
->
.
apply
envs_simple_replace_sound'
.
...
@@ -707,7 +707,7 @@ Proof. move=> /envs_replace_sound'. destruct q; by rewrite /= ?right_id. Qed.
...
@@ -707,7 +707,7 @@ Proof. move=> /envs_replace_sound'. destruct q; by rewrite /= ?right_id. Qed.
Lemma
envs_replace_sound
Δ
Δ'
i
p
q
P
Γ
:
Lemma
envs_replace_sound
Δ
Δ'
i
p
q
P
Γ
:
envs_lookup
i
Δ
=
Some
(
p
,
P
)
→
envs_replace
i
p
q
Γ
Δ
=
Some
Δ'
→
envs_lookup
i
Δ
=
Some
(
p
,
P
)
→
envs_replace
i
p
q
Γ
Δ
=
Some
Δ'
→
of_envs
Δ
⊢
□
?p
P
∗
((
if
q
then
<
affine
>
env_and_pers
Γ
else
[
∗
]
Γ
)
-∗
of_envs
Δ'
)
.
of_envs
Δ
⊢
□
?p
P
∗
((
if
q
then
<
affine
>
env_and_pers
istently
Γ
else
[
∗
]
Γ
)
-∗
of_envs
Δ'
)
.
Proof
.
intros
.
by
rewrite
envs_lookup_sound
//
envs_replace_sound'
//.
Qed
.
Proof
.
intros
.
by
rewrite
envs_lookup_sound
//
envs_replace_sound'
//.
Qed
.
Lemma
envs_replace_singleton_sound
Δ
Δ'
i
p
q
P
j
Q
:
Lemma
envs_replace_singleton_sound
Δ
Δ'
i
p
q
P
j
Q
:
...
@@ -809,7 +809,7 @@ Proof.
...
@@ -809,7 +809,7 @@ Proof.
Qed
.
Qed
.
Lemma
env_to_prop_and_pers_sound
Γ
i
P
:
Lemma
env_to_prop_and_pers_sound
Γ
i
P
:
□
env_to_prop_and
(
Esnoc
Γ
i
P
)
⊣⊢
<
affine
>
env_and_pers
(
Esnoc
Γ
i
P
)
.
□
env_to_prop_and
(
Esnoc
Γ
i
P
)
⊣⊢
<
affine
>
env_and_pers
istently
(
Esnoc
Γ
i
P
)
.
Proof
.
Proof
.
revert
P
.
induction
Γ
as
[|
Γ
IH
?
Q
]=>
P
;
simpl
.
revert
P
.
induction
Γ
as
[|
Γ
IH
?
Q
]=>
P
;
simpl
.
-
by
rewrite
right_id
.
-
by
rewrite
right_id
.
...
...
This diff is collapsed.
Click to expand it.
iris/proofmode/modalities.v
+
0
−
1
View file @
f9b965cf
From
stdpp
Require
Import
namespaces
.
From
stdpp
Require
Import
namespaces
.
From
iris
.
bi
Require
Export
bi
.
From
iris
.
bi
Require
Export
bi
.
From
iris
.
proofmode
Require
Export
environments
.
From
iris
.
prelude
Require
Import
options
.
From
iris
.
prelude
Require
Import
options
.
Import
bi
.
Import
bi
.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment