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
ec07830b
Commit
ec07830b
authored
4 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
add big-op versions of lookup and delete
parent
ec631db1
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
iris/base_logic/lib/ghost_map.v
+39
-0
39 additions, 0 deletions
iris/base_logic/lib/ghost_map.v
with
39 additions
and
0 deletions
iris/base_logic/lib/ghost_map.v
+
39
−
0
View file @
ec07830b
...
...
@@ -216,6 +216,20 @@ Section lemmas.
Qed
.
(** Derived big-op versions of above lemmas *)
Lemma
ghost_map_lookup_big
γ
m
m0
:
ghost_map_auth
γ
1
m
-∗
([
∗
map
]
k
↦
v
∈
m0
,
k
↪
[
γ
]
v
)
-∗
⌜
m0
⊆
m
⌝.
Proof
.
iInduction
m0
as
[|
k
v
m0
Hk
IH
]
"IH"
using
map_ind
.
{
iIntros
"_ _"
.
iPureIntro
.
(* FIXME embedded proof of [map_empty_subseteq]. *)
apply
map_subseteq_spec
.
intros
k
v
[]
%
lookup_empty_Some
.
}
rewrite
big_sepM_insert
//.
iIntros
"Hauth [Helem Hm0]"
.
iDestruct
(
ghost_map_lookup
with
"Hauth Helem"
)
as
%
Helem
.
iDestruct
(
"IH"
with
"Hauth Hm0"
)
as
%
Hm0
.
iPureIntro
.
apply
insert_subseteq_l
;
done
.
Qed
.
Lemma
ghost_map_insert_big
{
γ
m
}
m'
:
m'
##
ₘ
m
→
ghost_map_auth
γ
1
m
==∗
...
...
@@ -230,6 +244,31 @@ Section lemmas.
first
by
apply
lookup_union_None
.
Qed
.
Lemma
ghost_map_delete_big
{
γ
m
m0
}
:
ghost_map_auth
γ
1
m
-∗
([
∗
map
]
k
↦
v
∈
m0
,
k
↪
[
γ
]
v
)
-∗
|
==>
ghost_map_auth
γ
1
(
m
∖
m0
)
.
Proof
.
iInduction
m0
as
[|
k
v
m0
Hk
IH
]
"IH"
using
map_ind
.
{
iIntros
"Hauth _"
.
(* FIXME embedded proof of [map_difference_empty]. *)
assert
(
m
∖
∅
=
m
)
as
->
;
last
done
.
apply
map_eq
.
intros
i
.
apply
option_eq
.
intros
x
.
rewrite
lookup_difference_Some
.
rewrite
lookup_empty
.
naive_solver
.
}
rewrite
big_sepM_insert
//.
iIntros
"Hauth [Helem Hm0]"
.
iMod
(
"IH"
with
"Hauth Hm0"
)
as
"Hauth"
.
iMod
(
ghost_map_delete
with
"Hauth Helem"
)
as
"Hauth"
.
assert
(
delete
k
(
m
∖
m0
)
=
m
∖
<
[
k
:=
v
]
>
m0
)
as
->
;
last
done
.
{
(* FIXME embedded proof of [map_difference_delete_insert]. *)
apply
map_eq
.
intros
i
.
apply
option_eq
.
intros
x
.
rewrite
lookup_delete_Some
.
rewrite
!
lookup_difference_Some
.
split
.
-
intros
(
Hne
&
Hm
&
Hm0
)
.
rewrite
lookup_insert_ne
//.
-
destruct
(
decide
(
k
=
i
))
as
[
->
|
Hne
]
.
+
rewrite
lookup_insert
.
naive_solver
.
+
rewrite
lookup_insert_ne
//.
}
Qed
.
Theorem
ghost_map_update_big
{
γ
m
m0
}
m1
:
dom
(
gset
K
)
m0
=
dom
(
gset
K
)
m1
→
ghost_map_auth
γ
1
m
-∗
...
...
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