Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iris-coq
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
Maxime Dénès
iris-coq
Commits
6d021c73
Commit
6d021c73
authored
8 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Put notations for proofmode environment manipulation into a module.
parent
f774d316
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
proofmode/coq_tactics.v
+1
-7
1 addition, 7 deletions
proofmode/coq_tactics.v
proofmode/environments.v
+10
-7
10 additions, 7 deletions
proofmode/environments.v
with
11 additions
and
14 deletions
proofmode/coq_tactics.v
+
1
−
7
View file @
6d021c73
...
...
@@ -3,13 +3,7 @@ From iris.algebra Require Import upred_big_op upred_tactics.
From
iris
.
proofmode
Require
Export
environments
classes
.
From
iris
.
prelude
Require
Import
stringmap
hlist
.
Import
uPred
.
Local
Notation
"Γ !! j"
:=
(
env_lookup
j
Γ
)
.
Local
Notation
"x ← y ; z"
:=
(
match
y
with
Some
x
=>
z
|
None
=>
None
end
)
.
Local
Notation
"' ( x1 , x2 ) ← y ; z"
:=
(
match
y
with
Some
(
x1
,
x2
)
=>
z
|
None
=>
None
end
)
.
Local
Notation
"' ( x1 , x2 , x3 ) ← y ; z"
:=
(
match
y
with
Some
(
x1
,
x2
,
x3
)
=>
z
|
None
=>
None
end
)
.
Import
env_notations
.
Record
envs
(
M
:
ucmraT
)
:=
Envs
{
env_persistent
:
env
(
uPred
M
);
env_spatial
:
env
(
uPred
M
)
}
.
...
...
This diff is collapsed.
Click to expand it.
proofmode/environments.v
+
10
−
7
View file @
6d021c73
...
...
@@ -10,18 +10,21 @@ Arguments Esnoc {_} _ _%string _.
Instance
:
Params
(
@
Enil
)
1
.
Instance
:
Params
(
@
Esnoc
)
1
.
Local
Notation
"x ← y ; z"
:=
(
match
y
with
Some
x
=>
z
|
None
=>
None
end
)
.
Local
Notation
"' ( x1 , x2 ) ← y ; z"
:=
(
match
y
with
Some
(
x1
,
x2
)
=>
z
|
None
=>
None
end
)
.
Local
Notation
"' ( x1 , x2 , x3 ) ← y ; z"
:=
(
match
y
with
Some
(
x1
,
x2
,
x3
)
=>
z
|
None
=>
None
end
)
.
Fixpoint
env_lookup
{
A
}
(
i
:
string
)
(
Γ
:
env
A
)
:
option
A
:=
match
Γ
with
|
Enil
=>
None
|
Esnoc
Γ
j
x
=>
if
decide
(
i
=
j
)
then
Some
x
else
env_lookup
i
Γ
end
.
Local
Notation
"Γ !! j"
:=
(
env_lookup
j
Γ
)
.
Module
env_notations
.
Notation
"x ← y ; z"
:=
(
match
y
with
Some
x
=>
z
|
None
=>
None
end
)
.
Notation
"' ( x1 , x2 ) ← y ; z"
:=
(
match
y
with
Some
(
x1
,
x2
)
=>
z
|
None
=>
None
end
)
.
Notation
"' ( x1 , x2 , x3 ) ← y ; z"
:=
(
match
y
with
Some
(
x1
,
x2
,
x3
)
=>
z
|
None
=>
None
end
)
.
Notation
"Γ !! j"
:=
(
env_lookup
j
Γ
)
.
End
env_notations
.
Import
env_notations
.
Inductive
env_wf
{
A
}
:
env
A
→
Prop
:=
|
Enil_wf
:
env_wf
Enil
...
...
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