Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Rodolphe Lepigre
Iris
Commits
2bc882dc
Commit
2bc882dc
authored
Sep 20, 2016
by
Robbert Krebbers
Browse files
Validity lemmas for deletion in gmaps.
parent
bf59ec9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
algebra/gmap.v
View file @
2bc882dc
...
...
@@ -202,6 +202,7 @@ Lemma lookup_validN_Some n m i x : ✓{n} m → m !! i ≡{n}≡ Some x → ✓{
Proof
.
by
move
=>
/(
_
i
)
Hm
Hi
;
move
:
Hm
;
rewrite
Hi
.
Qed
.
Lemma
lookup_valid_Some
m
i
x
:
✓
m
→
m
!!
i
≡
Some
x
→
✓
x
.
Proof
.
move
=>
Hm
Hi
.
move
:
(
Hm
i
).
by
rewrite
Hi
.
Qed
.
Lemma
insert_validN
n
m
i
x
:
✓
{
n
}
x
→
✓
{
n
}
m
→
✓
{
n
}
<[
i
:
=
x
]>
m
.
Proof
.
by
intros
??
j
;
destruct
(
decide
(
i
=
j
))
;
simplify_map_eq
.
Qed
.
Lemma
insert_valid
m
i
x
:
✓
x
→
✓
m
→
✓
<[
i
:
=
x
]>
m
.
...
...
@@ -214,6 +215,11 @@ Qed.
Lemma
singleton_valid
i
x
:
✓
({[
i
:
=
x
]}
:
gmap
K
A
)
↔
✓
x
.
Proof
.
rewrite
!
cmra_valid_validN
.
by
setoid_rewrite
singleton_validN
.
Qed
.
Lemma
delete_validN
n
m
i
:
✓
{
n
}
m
→
✓
{
n
}
(
delete
i
m
).
Proof
.
intros
Hm
j
;
destruct
(
decide
(
i
=
j
))
;
by
simplify_map_eq
.
Qed
.
Lemma
delete_valid
m
i
:
✓
m
→
✓
(
delete
i
m
).
Proof
.
intros
Hm
j
;
destruct
(
decide
(
i
=
j
))
;
by
simplify_map_eq
.
Qed
.
Lemma
insert_singleton_op
m
i
x
:
m
!!
i
=
None
→
<[
i
:
=
x
]>
m
=
{[
i
:
=
x
]}
⋅
m
.
Proof
.
intros
Hi
;
apply
map_eq
=>
j
;
destruct
(
decide
(
i
=
j
))
as
[->|].
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment