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
Janno
iris-coq
Commits
50738b0e
Commit
50738b0e
authored
9 years ago
by
David Swasey
Browse files
Options
Downloads
Patches
Plain Diff
Frame-preserving updates for finite parital functions.
parent
adfc72fa
No related branches found
Branches containing commit
Tags
iris-3.0.0
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/ModuRes/Finmap.v
+33
-3
33 additions, 3 deletions
lib/ModuRes/Finmap.v
with
33 additions
and
3 deletions
lib/ModuRes/Finmap.v
+
33
−
3
View file @
50738b0e
...
...
@@ -370,7 +370,7 @@ Section FinDom.
simpl
finmap
.
rewrite
DecEq_refl
.
reflexivity
.
Qed
.
Lemma
fdStrongUpdate_neq
k
k'
v
f
(
Hneq
:
k
<>
k'
)
:
fdStrongUpdate
k
v
f
k'
=
f
k'
.
Lemma
fdStrongUpdate_neq
v
f
{
k
k'
}
(
Hneq
:
k
<>
k'
)
:
fdStrongUpdate
k
v
f
k'
=
f
k'
.
Proof
.
simpl
finmap
.
destruct
(
dec_eq
k
k'
)
as
[
EQ
|
NEQ
];
first
contradiction
.
reflexivity
.
Qed
.
...
...
@@ -396,6 +396,11 @@ Section FinDom.
-
rewrite
/
fdStrongUpdate
/
dom
/=
/
fdStrongUpdate_dom
.
rewrite
Hdom
.
reflexivity
.
Qed
.
Global
Instance
fdStrongUpdate_equiv
i
:
Proper
(
equiv
==>
equiv
==>
equiv
)
(
fun
v
=>
fun
f
=>
fdStrongUpdate
i
v
f
)
.
Proof
.
move
=>
v
v'
EQv
f
f'
EQf
i'
/=.
case
:
(
dec_eq
i
i'
)=>_;
[
done
|
exact
:
EQf
]
.
Qed
.
End
Update
.
...
...
@@ -463,7 +468,7 @@ Section FinDom.
End
FinDom
.
Notation
"f + '[fd' k <- v ']'"
:=
(
fdStrongUpdate
k
(
Some
v
)
f
)
(
at
level
0
)
:
finmap_scope
.
Notation
"f + '[fd'
k <- v ']'"
:=
(
fdStrongUpdate
k
(
Some
v
)
f
)
(
at
level
0
)
:
finmap_scope
.
Notation
"f \ x"
:=
(
fdStrongUpdate
x
None
f
)
(
at
level
35
)
:
finmap_scope
.
Section
FinDom2
.
...
...
@@ -853,7 +858,7 @@ End FinDom2.
Section
RA
.
Context
{
I
:
Type
}
{
S
:
Type
}
`{
eqI
:
DecEq
I
}
`{
RAS
:
RA
S
}
.
Implicit
Type
(
i
:
I
)
(
s
:
S
)
(
f
g
:
I
-
f
>
S
)
.
Implicit
Type
s
(
i
:
I
)
(
s
:
S
)
(
f
g
:
I
-
f
>
S
)
.
Local
Open
Scope
ra_scope
.
Local
Open
Scope
finmap_scope
.
...
...
@@ -944,6 +949,31 @@ Section RA.
*
subst
i
.
rewrite
EQg
.
simpl
.
assumption
.
*
assumption
.
Qed
.
Lemma
ra_fpu_fpfn
f
i
{
s
}
{
P
:
S
->
Prop
}
(
Hupd
:
s
⇝∈
P
)
:
f
+
[
fd
i
<-
s
]
⇝∈
(
fun
f'
=>
exists
s'
,
P
s'
/\
f'
=
f
+
[
fd
i
<-
s'
])
.
Proof
.
have
compupd
:
forall
f
g
i
i'
s
,
(
f
+
[
fd
i
<-
s
]
·
g
)
i'
=
finprod_op
(
f
+
[
fd
i
<-
s
]
i'
)
(
g
i'
)
.
{
by
move
=>
?
?
?
?
?;
rewrite
/
ra_op
/
ra_op_finprod
fdComposeRed
.
}
move
=>
g
Hv
.
pose
(
sf
:=
if
finmap
g
i
is
Some
sf
then
sf
else
1
s
)
.
have
:
↓
s
·
sf
.
{
move
:
(
Hv
i
)
.
rewrite
compupd
fdStrongUpdate_eq
.
case
Hgi
:
(
finmap
g
i
)
=>
[
sf'
|];
rewrite
/
sf
!
Hgi
/=
;
first
done
.
by
rewrite
(
ra_op_unit2
(
t
:=
s
))
.
}
move
/
Hupd
=>
[
s'
[
HP
Hsep
]]
.
exists
(
f
+
[
fd
i
<-
s'
])
.
split
;
first
by
exists
s'
.
rewrite
/
ra_op
/
ra_op_finprod
=>
i'
;
rewrite
compupd
.
case
:
(
dec_eq
i
i'
)
Hsep
=>
[
EQ
|
NEQ
]
.
-
rewrite
/
sf
-
EQ
/=
(
DecEq_refl
i
)
.
case
:
(
g
i
)
=>
//=.
exact
:
ra_op_valid
.
-
move
:
(
Hv
i'
)
.
by
rewrite
compupd
!
(
fdStrongUpdate_neq
_
_
NEQ
)
.
Qed
.
Lemma
ra_fps_fpfn
f
i
{
s
s'
}
:
s
⇝
s'
->
f
+
[
fd
i
<-
s
]
⇝
f
+
[
fd
i
<-
s'
]
.
Proof
.
move
=>
/
ra_fps_fpu
/
(
ra_fpu_fpfn
f
i
)
=>
Hupd
.
apply
:
ra_fpu_fps
=>
g
Hsep
.
move
/
(_
g
Hsep
):
Hupd
=>
[
f'
[[
s''
[
EQs'
EQf'
]]
Hsep'
]]
.
exists
f'
.
split
;
last
done
.
rewrite
EQf'
EQs'
.
reflexivity
.
Qed
.
End
RA
.
Section
VIRA
.
...
...
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