Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
Iris
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
122
Issues
122
List
Boards
Labels
Service Desk
Milestones
Merge Requests
18
Merge Requests
18
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Iris
Iris
Commits
fdc22ecc
Commit
fdc22ecc
authored
Feb 09, 2016
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stronger version of map_insert_op.
parent
87957de9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
algebra/fin_maps.v
algebra/fin_maps.v
+16
-2
No files found.
algebra/fin_maps.v
View file @
fdc22ecc
...
...
@@ -176,9 +176,23 @@ Proof.
by
move
=>/(
_
i
)
;
simplify_map_equality
.
Qed
.
Lemma
map_insert_op
m1
m2
i
x
:
Lemma
map_insert_op
_None
m1
m2
i
x
:
m2
!!
i
=
None
→
<[
i
:
=
x
]>(
m1
⋅
m2
)
=
<[
i
:
=
x
]>
m1
⋅
m2
.
Proof
.
by
intros
Hi
;
apply
(
insert_merge_l
_
m1
m2
)
;
rewrite
Hi
.
Qed
.
Lemma
map_insert_op_unit
m1
m2
i
x
:
m2
!!
i
≡
Some
(
unit
x
)
→
<[
i
:
=
x
]>(
m1
⋅
m2
)
≡
<[
i
:
=
x
]>
m1
⋅
m2
.
Proof
.
intros
Hu
j
;
destruct
(
decide
(
i
=
j
))
as
[->|].
*
by
rewrite
lookup_insert
lookup_op
lookup_insert
Hu
cmra_unit_r
.
*
by
rewrite
lookup_insert_ne
//
!
lookup_op
lookup_insert_ne
.
Qed
.
Lemma
map_insert_op
m1
m2
i
x
:
m2
!!
i
=
None
∨
m2
!!
i
≡
Some
(
unit
x
)
→
<[
i
:
=
x
]>(
m1
⋅
m2
)
≡
<[
i
:
=
x
]>
m1
⋅
m2
.
Proof
.
by
intros
[?|?]
;
[
rewrite
map_insert_op_None
|
rewrite
map_insert_op_unit
].
Qed
.
Lemma
map_unit_singleton
(
i
:
K
)
(
x
:
A
)
:
unit
({[
i
↦
x
]}
:
gmap
K
A
)
=
{[
i
↦
unit
x
]}.
Proof
.
apply
map_fmap_singleton
.
Qed
.
...
...
@@ -261,7 +275,7 @@ Proof.
assert
(
i
∉
dom
(
gset
K
)
m
∧
i
∉
dom
(
gset
K
)
mf
)
as
[??].
{
rewrite
-
not_elem_of_union
-
map_dom_op
;
apply
is_fresh
.
}
exists
(<[
i
:
=
x
]>
m
)
;
split
;
first
by
apply
HQ
,
not_elem_of_dom
.
rewrite
-
map_insert_op
;
last
by
apply
not_elem_of_dom
.
rewrite
-
map_insert_op
_None
;
last
by
apply
not_elem_of_dom
.
by
apply
map_insert_validN
;
[
apply
cmra_valid_validN
|].
Qed
.
Lemma
map_updateP_alloc'
m
x
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment