Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
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
Gaëtan Gilbert
Iris
Commits
36159b49
Commit
36159b49
authored
8 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Prove variants of CMRA facts for CMRAs with =
≡.
parent
e49f34cf
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
algebra/cmra.v
+58
-0
58 additions, 0 deletions
algebra/cmra.v
heap_lang/heap.v
+1
-1
1 addition, 1 deletion
heap_lang/heap.v
with
59 additions
and
1 deletion
algebra/cmra.v
+
58
−
0
View file @
36159b49
...
@@ -520,6 +520,64 @@ Section ucmra.
...
@@ -520,6 +520,64 @@ Section ucmra.
End
ucmra
.
End
ucmra
.
Hint
Immediate
cmra_unit_total
.
Hint
Immediate
cmra_unit_total
.
(** * Properties about CMRAs with Leibniz equality *)
Section
cmra_leibniz
.
Context
{
A
:
cmraT
}
`{
!
LeibnizEquiv
A
}
.
Implicit
Types
x
y
:
A
.
Global
Instance
cmra_assoc_L
:
Assoc
(
=
)
(
@
op
A
_)
.
Proof
.
intros
x
y
z
.
unfold_leibniz
.
by
rewrite
assoc
.
Qed
.
Global
Instance
cmra_comm_L
:
Comm
(
=
)
(
@
op
A
_)
.
Proof
.
intros
x
y
.
unfold_leibniz
.
by
rewrite
comm
.
Qed
.
Lemma
cmra_pcore_l_L
x
cx
:
pcore
x
=
Some
cx
→
cx
⋅
x
=
x
.
Proof
.
unfold_leibniz
.
apply
cmra_pcore_l'
.
Qed
.
Lemma
cmra_pcore_idemp_L
x
cx
:
pcore
x
=
Some
cx
→
pcore
cx
=
Some
cx
.
Proof
.
unfold_leibniz
.
apply
cmra_pcore_idemp'
.
Qed
.
Lemma
cmra_opM_assoc_L
x
y
mz
:
(
x
⋅
y
)
⋅
?
mz
=
x
⋅
(
y
⋅
?
mz
)
.
Proof
.
unfold_leibniz
.
apply
cmra_opM_assoc
.
Qed
.
(** ** Core *)
Lemma
cmra_pcore_r_L
x
cx
:
pcore
x
=
Some
cx
→
x
⋅
cx
=
x
.
Proof
.
unfold_leibniz
.
apply
cmra_pcore_r'
.
Qed
.
Lemma
cmra_pcore_dup_L
x
cx
:
pcore
x
=
Some
cx
→
cx
=
cx
⋅
cx
.
Proof
.
unfold_leibniz
.
apply
cmra_pcore_dup'
.
Qed
.
(** ** Persistent elements *)
Lemma
persistent_dup_L
x
`{
!
Persistent
x
}
:
x
≡
x
⋅
x
.
Proof
.
unfold_leibniz
.
by
apply
persistent_dup
.
Qed
.
(** ** Total core *)
Section
total_core
.
Context
`{
CMRATotal
A
}
.
Lemma
cmra_core_r_L
x
:
x
⋅
core
x
=
x
.
Proof
.
unfold_leibniz
.
apply
cmra_core_r
.
Qed
.
Lemma
cmra_core_l_L
x
:
core
x
⋅
x
=
x
.
Proof
.
unfold_leibniz
.
apply
cmra_core_l
.
Qed
.
Lemma
cmra_core_idemp_L
x
:
core
(
core
x
)
=
core
x
.
Proof
.
unfold_leibniz
.
apply
cmra_core_idemp
.
Qed
.
Lemma
cmra_core_dup_L
x
:
core
x
=
core
x
⋅
core
x
.
Proof
.
unfold_leibniz
.
apply
cmra_core_dup
.
Qed
.
Lemma
persistent_total_L
x
:
Persistent
x
↔
core
x
=
x
.
Proof
.
unfold_leibniz
.
apply
persistent_total
.
Qed
.
Lemma
persistent_core_L
x
`{
!
Persistent
x
}
:
core
x
=
x
.
Proof
.
by
apply
persistent_total_L
.
Qed
.
End
total_core
.
End
cmra_leibniz
.
Section
ucmra_leibniz
.
Context
{
A
:
ucmraT
}
`{
!
LeibnizEquiv
A
}
.
Implicit
Types
x
y
z
:
A
.
Global
Instance
ucmra_unit_left_id_L
:
LeftId
(
=
)
∅
(
@
op
A
_)
.
Proof
.
intros
x
.
unfold_leibniz
.
by
rewrite
left_id
.
Qed
.
Global
Instance
ucmra_unit_right_id_L
:
RightId
(
=
)
∅
(
@
op
A
_)
.
Proof
.
intros
x
.
unfold_leibniz
.
by
rewrite
right_id
.
Qed
.
End
ucmra_leibniz
.
(** * Constructing a CMRA with total core *)
(** * Constructing a CMRA with total core *)
Section
cmra_total
.
Section
cmra_total
.
Context
A
`{
Dist
A
,
Equiv
A
,
PCore
A
,
Op
A
,
Valid
A
,
ValidN
A
}
.
Context
A
`{
Dist
A
,
Equiv
A
,
PCore
A
,
Op
A
,
Valid
A
,
ValidN
A
}
.
...
...
This diff is collapsed.
Click to expand it.
heap_lang/heap.v
+
1
−
1
View file @
36159b49
...
@@ -142,7 +142,7 @@ Section heap.
...
@@ -142,7 +142,7 @@ Section heap.
iIntros
(
<-%
of_to_val
?)
"[#Hinv HΦ]"
.
rewrite
/
heap_ctx
.
iIntros
(
<-%
of_to_val
?)
"[#Hinv HΦ]"
.
rewrite
/
heap_ctx
.
iVs
(
auth_empty
heap_name
)
as
"Hh"
.
iVs
(
auth_empty
heap_name
)
as
"Hh"
.
iVs
(
auth_open
with
"[Hh]"
)
as
(
h
)
"[Hv [Hh Hclose]]"
;
eauto
.
iVs
(
auth_open
with
"[Hh]"
)
as
(
h
)
"[Hv [Hh Hclose]]"
;
eauto
.
rewrite
left_id
/
heap_inv
.
iDestruct
"Hv"
as
%
?
.
rewrite
left_id
_L
/
heap_inv
.
iDestruct
"Hv"
as
%
?
.
iApply
wp_alloc_pst
.
iFrame
"Hh"
.
iNext
.
iApply
wp_alloc_pst
.
iFrame
"Hh"
.
iNext
.
iIntros
(
l
)
"[% Hh] !==>"
.
iIntros
(
l
)
"[% Hh] !==>"
.
iVs
(
"Hclose"
$!
{[
l
:=
(
1
%
Qp
,
DecAgree
v
)
]}
with
"[Hh]"
)
.
iVs
(
"Hclose"
$!
{[
l
:=
(
1
%
Qp
,
DecAgree
v
)
]}
with
"[Hh]"
)
.
...
...
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