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
Jonas Kastberg
iris
Commits
2241ea73
Commit
2241ea73
authored
Aug 04, 2016
by
Robbert Krebbers
Browse files
Better lemmas for splitting the fractional heap_mapsto.
parent
7047afed
Changes
2
Hide whitespace changes
Inline
Side-by-side
heap_lang/heap.v
View file @
2241ea73
...
...
@@ -144,8 +144,17 @@ Section heap.
by
apply
pure_elim_r
.
Qed
.
Lemma
heap_mapsto_op_split
l
q
v
:
l
↦
{
q
}
v
⊣
⊢
(
l
↦
{
q
/
2
}
v
★
l
↦
{
q
/
2
}
v
).
Proof
.
by
rewrite
heap_mapsto_op_eq
Qp_div_2
.
Qed
.
Lemma
heap_mapsto_op_1
l
q1
q2
v1
v2
:
l
↦
{
q1
}
v1
★
l
↦
{
q2
}
v2
⊢
v1
=
v2
∧
l
↦
{
q1
+
q2
}
v1
.
Proof
.
by
rewrite
heap_mapsto_op
.
Qed
.
Lemma
heap_mapsto_op_half
l
q
v1
v2
:
l
↦
{
q
/
2
}
v1
★
l
↦
{
q
/
2
}
v2
⊣
⊢
v1
=
v2
∧
l
↦
{
q
}
v1
.
Proof
.
by
rewrite
heap_mapsto_op
Qp_div_2
.
Qed
.
Lemma
heap_mapsto_op_half_1
l
q
v1
v2
:
l
↦
{
q
/
2
}
v1
★
l
↦
{
q
/
2
}
v2
⊢
v1
=
v2
∧
l
↦
{
q
}
v1
.
Proof
.
by
rewrite
heap_mapsto_op_half
.
Qed
.
(** Weakest precondition *)
(* FIXME: try to reduce usage of wp_pvs. We're losing view shifts here. *)
...
...
heap_lang/proofmode.v
View file @
2241ea73
...
...
@@ -13,7 +13,7 @@ Implicit Types Δ : envs (iResUR heap_lang (globalF Σ)).
Global
Instance
into_sep_mapsto
l
q
v
:
IntoSep
false
(
l
↦
{
q
}
v
)
(
l
↦
{
q
/
2
}
v
)
(
l
↦
{
q
/
2
}
v
).
Proof
.
by
rewrite
/
IntoSep
heap_mapsto_op_
split
.
Qed
.
Proof
.
by
rewrite
/
IntoSep
heap_mapsto_op_
eq
Qp_div_2
.
Qed
.
Lemma
tac_wp_alloc
Δ
Δ
'
E
j
e
v
Φ
:
to_val
e
=
Some
v
→
...
...
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