Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
Abhishek Anand
Iris
Commits
020be806
Commit
020be806
authored
7 years ago
by
Jacques-Henri Jourdan
Browse files
Options
Downloads
Patches
Plain Diff
Simplify uses of AffineEnv by making it easy to prove when the BI is affine.
parent
d5f22a79
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/proofmode/coq_tactics.v
+9
-10
9 additions, 10 deletions
theories/proofmode/coq_tactics.v
with
9 additions
and
10 deletions
theories/proofmode/coq_tactics.v
+
9
−
10
View file @
020be806
...
...
@@ -443,16 +443,15 @@ Global Instance affine_env_snoc Γ i P :
Affine
P
→
AffineEnv
Γ
→
AffineEnv
(
Esnoc
Γ
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
.
Proof
.
induction
Γ
;
apply
_
.
Qed
.
Instance
affine_env_spatial
Δ
:
TCOr
(
AffineBI
PROP
)
(
AffineEnv
(
env_spatial
Δ
))
→
Affine
([
∗
]
env_spatial
Δ
)
.
Proof
.
destruct
1
as
[?|
H
]
.
apply
_
.
induction
H
;
simpl
;
apply
_
.
Qed
.
Lemma
tac_emp_intro
Δ
:
(* Establishing [AffineEnv (env_spatial Δ)] is rather expensive (linear in the
size of the context), so first check whether the whole BI is affine (which
takes constant time). *)
TCOr
(
AffineBI
PROP
)
(
AffineEnv
(
env_spatial
Δ
))
→
Δ
⊢
emp
.
AffineEnv
(
env_spatial
Δ
)
→
Affine
([
∗
]
env_spatial
Δ
)
.
Proof
.
intros
H
.
induction
H
;
simpl
;
apply
_
.
Qed
.
Lemma
tac_emp_intro
Δ
:
AffineEnv
(
env_spatial
Δ
)
→
Δ
⊢
emp
.
Proof
.
intros
.
by
rewrite
(
affine
Δ
)
.
Qed
.
Lemma
tac_assumption
Δ
Δ'
i
p
P
Q
:
...
...
@@ -571,7 +570,7 @@ Proof. destruct pe; by split. Qed.
Lemma
tac_always_intro
Δ
Δ'
a
pe
pl
Q
Q'
:
FromAlways
a
pe
pl
Q'
Q
→
(
if
a
then
TCOr
(
AffineBI
PROP
)
(
AffineEnv
(
env_spatial
Δ'
)
)
else
TCTrue
)
→
(
if
a
then
AffineEnv
(
env_spatial
Δ'
)
else
TCTrue
)
→
IntoAlwaysEnvs
pe
pl
Δ'
Δ
→
(
Δ
⊢
Q
)
→
Δ'
⊢
Q'
.
Proof
.
...
...
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