Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
Rice Wine
Iris
Commits
272b90d7
Commit
272b90d7
authored
8 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
More currying in gen_heap.
parent
3c064dd6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/base_logic/lib/gen_heap.v
+8
-7
8 additions, 7 deletions
theories/base_logic/lib/gen_heap.v
with
8 additions
and
7 deletions
theories/base_logic/lib/gen_heap.v
+
8
−
7
View file @
272b90d7
...
...
@@ -90,32 +90,33 @@ Section gen_heap.
AsFractional
(
l
↦
{
q
}
v
)
(
λ
q
,
l
↦
{
q
}
v
)
%
I
q
.
Proof
.
split
.
done
.
apply
_
.
Qed
.
Lemma
mapsto_agree
l
q1
q2
v1
v2
:
l
↦
{
q1
}
v1
∗
l
↦
{
q2
}
v2
⊢
⌜
v1
=
v2
⌝.
Lemma
mapsto_agree
l
q1
q2
v1
v2
:
l
↦
{
q1
}
v1
-
∗
l
↦
{
q2
}
v2
-∗
⌜
v1
=
v2
⌝.
Proof
.
apply
wand_intro_r
.
rewrite
mapsto_eq
-
own_op
-
auth_frag_op
own_valid
discrete_valid
.
f_equiv
=>
/
auth_own_valid
/=.
rewrite
op_singleton
singleton_valid
pair_op
.
by
intros
[_
?
%
agree_op_inv
%
(
inj
to_agree
)
%
leibniz_equiv
]
.
Qed
.
Global
Instance
heap_
ex_mapsto_fractional
l
:
Fractional
(
λ
q
,
l
↦
{
q
}
-
)
%
I
.
Global
Instance
ex_mapsto_fractional
l
:
Fractional
(
λ
q
,
l
↦
{
q
}
-
)
%
I
.
Proof
.
intros
p
q
.
iSplit
.
-
iDestruct
1
as
(
v
)
"[H1 H2]"
.
iSplitL
"H1"
;
eauto
.
-
iIntros
"[H1 H2]"
.
iDestruct
"H1"
as
(
v1
)
"H1"
.
iDestruct
"H2"
as
(
v2
)
"H2"
.
iDestruct
(
mapsto_agree
with
"
[$
H1
$
H2
]
"
)
as
%->
.
iExists
v2
.
by
iFrame
.
iDestruct
(
mapsto_agree
with
"H1 H2"
)
as
%->
.
iExists
v2
.
by
iFrame
.
Qed
.
Global
Instance
heap_
ex_mapsto_as_fractional
l
q
:
Global
Instance
ex_mapsto_as_fractional
l
q
:
AsFractional
(
l
↦
{
q
}
-
)
(
λ
q
,
l
↦
{
q
}
-
)
%
I
q
.
Proof
.
split
.
done
.
apply
_
.
Qed
.
Lemma
mapsto_valid
l
q
v
:
l
↦
{
q
}
v
⊢
✓
q
.
Lemma
mapsto_valid
l
q
v
:
l
↦
{
q
}
v
-∗
✓
q
.
Proof
.
rewrite
mapsto_eq
/
mapsto_def
own_valid
!
discrete_valid
.
by
apply
pure_mono
=>
/
auth_own_valid
/
singleton_valid
[??]
.
Qed
.
Lemma
mapsto_valid_2
l
q1
q2
v1
v2
:
l
↦
{
q1
}
v1
∗
l
↦
{
q2
}
v2
⊢
✓
(
q1
+
q2
)
%
Qp
.
Lemma
mapsto_valid_2
l
q1
q2
v1
v2
:
l
↦
{
q1
}
v1
-
∗
l
↦
{
q2
}
v2
-∗
✓
(
q1
+
q2
)
%
Qp
.
Proof
.
iIntros
"
[
H1 H2
]
"
.
iDestruct
(
mapsto_agree
with
"
[$
H1
$
H2
]
"
)
as
%->
.
iIntros
"H1 H2"
.
iDestruct
(
mapsto_agree
with
"H1 H2"
)
as
%->
.
iApply
(
mapsto_valid
l
_
v2
)
.
by
iFrame
.
Qed
.
...
...
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