Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Iris
c
Commits
2e56ccb9
Commit
2e56ccb9
authored
Jun 21, 2018
by
Dan Frumin
Browse files
Lemma for combining `- ↦C -`.
parent
44d3bd53
Changes
1
Show whitespace changes
Inline
Side-by-side
theories/lib/locking_heap.v
View file @
2e56ccb9
...
...
@@ -165,6 +165,25 @@ Section properties.
apply
lvl_included
.
destruct
x
;
eauto
.
Qed
.
Lemma
mapsto_value_agree
x
x'
l
q
q'
v
v'
:
l
↦
C
[
x
]{
q
}
v
-
∗
l
↦
C
[
x'
]{
q'
}
v'
-
∗
⌜
v
=
v'
⌝
.
Proof
.
rewrite
mapsto_eq
/
mapsto_def
.
iDestruct
1
as
(
b1
?)
"[Hl1 Ho1]"
.
iDestruct
1
as
(
b2
?)
"[Hl2 Ho2]"
.
iDestruct
(
mapsto_agree
with
"Hl1 Hl2"
)
as
%->.
done
.
Qed
.
Lemma
mapsto_combine
x
x'
l
q
q'
v
:
l
↦
C
[
x
]{
q
}
v
-
∗
l
↦
C
[
x'
]{
q'
}
v
-
∗
l
↦
C
[
x
⋅
x'
]{
q
+
q'
}
v
.
Proof
.
rewrite
mapsto_eq
/
mapsto_def
.
iDestruct
1
as
(
b1
Hb1
)
"[Hl1 Ho1]"
.
iDestruct
1
as
(
b2
Hb2
)
"[Hl2 Ho2]"
.
iExists
(
b1
⋅
b2
).
iSplitR
.
{
iPureIntro
.
destruct
x
,
x'
,
b1
,
b2
;
eauto
.
}
iCombine
"Hl1 Hl2"
as
"Hl"
.
rewrite
Qp_mult_plus_distr_l
.
iCombine
"Ho1 Ho2"
as
"Ho"
.
rewrite
frac_op'
.
iFrame
.
Qed
.
Lemma
to_locking_heap_insert
σ
l
x
:
to_locking_heap
(<[
l
:
=
x
]>
σ
)
=
<[
l
:
=
(
1
%
Qp
,
x
)]>(
to_locking_heap
σ
).
Proof
.
by
rewrite
/
to_locking_heap
fmap_insert
.
Qed
.
...
...
Write
Preview
Supports
Markdown
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