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
Tej Chajed
iris
Commits
4a78debe
Commit
4a78debe
authored
9 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
More about CMRA.
parent
094150fb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modures/cmra.v
+12
-6
12 additions, 6 deletions
modures/cmra.v
with
12 additions
and
6 deletions
modures/cmra.v
+
12
−
6
View file @
4a78debe
...
@@ -100,13 +100,13 @@ End cmra_mixin.
...
@@ -100,13 +100,13 @@ End cmra_mixin.
Hint
Extern
0
(
✓
{
0
}
_)
=>
apply
cmra_valid_0
.
Hint
Extern
0
(
✓
{
0
}
_)
=>
apply
cmra_valid_0
.
(** Morphisms *)
(**
*
Morphisms *)
Class
CMRAMonotone
{
A
B
:
cmraT
}
(
f
:
A
→
B
)
:=
{
Class
CMRAMonotone
{
A
B
:
cmraT
}
(
f
:
A
→
B
)
:=
{
includedN_preserving
n
x
y
:
x
≼
{
n
}
y
→
f
x
≼
{
n
}
f
y
;
includedN_preserving
n
x
y
:
x
≼
{
n
}
y
→
f
x
≼
{
n
}
f
y
;
validN_preserving
n
x
:
✓
{
n
}
x
→
✓
{
n
}
(
f
x
)
validN_preserving
n
x
:
✓
{
n
}
x
→
✓
{
n
}
(
f
x
)
}
.
}
.
(** Updates *)
(**
*
Updates *)
Definition
cmra_updateP
{
A
:
cmraT
}
(
x
:
A
)
(
P
:
A
→
Prop
)
:=
∀
z
n
,
Definition
cmra_updateP
{
A
:
cmraT
}
(
x
:
A
)
(
P
:
A
→
Prop
)
:=
∀
z
n
,
✓
{
n
}
(
x
⋅
z
)
→
∃
y
,
P
y
∧
✓
{
n
}
(
y
⋅
z
)
.
✓
{
n
}
(
x
⋅
z
)
→
∃
y
,
P
y
∧
✓
{
n
}
(
y
⋅
z
)
.
Instance
:
Params
(
@
cmra_updateP
)
3
.
Instance
:
Params
(
@
cmra_updateP
)
3
.
...
@@ -116,7 +116,7 @@ Definition cmra_update {A : cmraT} (x y : A) := ∀ z n,
...
@@ -116,7 +116,7 @@ Definition cmra_update {A : cmraT} (x y : A) := ∀ z n,
Infix
"⇝"
:=
cmra_update
(
at
level
70
)
.
Infix
"⇝"
:=
cmra_update
(
at
level
70
)
.
Instance
:
Params
(
@
cmra_update
)
3
.
Instance
:
Params
(
@
cmra_update
)
3
.
(** Properties **)
(**
*
Properties **)
Section
cmra
.
Section
cmra
.
Context
{
A
:
cmraT
}
.
Context
{
A
:
cmraT
}
.
Implicit
Types
x
y
z
:
A
.
Implicit
Types
x
y
z
:
A
.
...
@@ -156,7 +156,7 @@ Qed.
...
@@ -156,7 +156,7 @@ Qed.
Lemma
cmra_unit_valid
x
n
:
✓
{
n
}
x
→
✓
{
n
}
(
unit
x
)
.
Lemma
cmra_unit_valid
x
n
:
✓
{
n
}
x
→
✓
{
n
}
(
unit
x
)
.
Proof
.
rewrite
-
{
1
}(
ra_unit_l
x
);
apply
cmra_valid_op_l
.
Qed
.
Proof
.
rewrite
-
{
1
}(
ra_unit_l
x
);
apply
cmra_valid_op_l
.
Qed
.
(** * Timeless *)
(** *
*
Timeless *)
Lemma
cmra_timeless_included_l
x
y
:
Timeless
x
→
✓
{
1
}
y
→
x
≼
{
1
}
y
→
x
≼
y
.
Lemma
cmra_timeless_included_l
x
y
:
Timeless
x
→
✓
{
1
}
y
→
x
≼
{
1
}
y
→
x
≼
y
.
Proof
.
Proof
.
intros
??
[
x'
?]
.
intros
??
[
x'
?]
.
...
@@ -174,7 +174,7 @@ Proof.
...
@@ -174,7 +174,7 @@ Proof.
by
rewrite
Hz'
(
timeless
x1
y1
)
//
(
timeless
x2
y2
)
.
by
rewrite
Hz'
(
timeless
x1
y1
)
//
(
timeless
x2
y2
)
.
Qed
.
Qed
.
(** *
Inclu
de
d
*)
(** *
* Or
de
r
*)
Global
Instance
cmra_included_ne
n
:
Global
Instance
cmra_included_ne
n
:
Proper
(
dist
n
==>
dist
n
==>
iff
)
(
includedN
n
:
relation
A
)
|
1
.
Proper
(
dist
n
==>
dist
n
==>
iff
)
(
includedN
n
:
relation
A
)
|
1
.
Proof
.
Proof
.
...
@@ -191,6 +191,8 @@ Lemma cmra_included_0 x y : x ≼{0} y.
...
@@ -191,6 +191,8 @@ Lemma cmra_included_0 x y : x ≼{0} y.
Proof
.
by
exists
(
unit
x
)
.
Qed
.
Proof
.
by
exists
(
unit
x
)
.
Qed
.
Lemma
cmra_included_S
x
y
n
:
x
≼
{
S
n
}
y
→
x
≼
{
n
}
y
.
Lemma
cmra_included_S
x
y
n
:
x
≼
{
S
n
}
y
→
x
≼
{
n
}
y
.
Proof
.
by
intros
[
z
Hz
];
exists
z
;
apply
dist_S
.
Qed
.
Proof
.
by
intros
[
z
Hz
];
exists
z
;
apply
dist_S
.
Qed
.
Lemma
cmra_included_le
x
y
n
n'
:
x
≼
{
n
}
y
→
n'
≤
n
→
x
≼
{
n'
}
y
.
Proof
.
induction
2
;
auto
using
cmra_included_S
.
Qed
.
Lemma
cmra_included_l
n
x
y
:
x
≼
{
n
}
x
⋅
y
.
Lemma
cmra_included_l
n
x
y
:
x
≼
{
n
}
x
⋅
y
.
Proof
.
by
exists
y
.
Qed
.
Proof
.
by
exists
y
.
Qed
.
...
@@ -214,7 +216,11 @@ Proof.
...
@@ -214,7 +216,11 @@ Proof.
by
rewrite
Hx1
Hx2
.
by
rewrite
Hx1
Hx2
.
Qed
.
Qed
.
(** * Properties of [(⇝)] relation *)
(** ** RAs with empty element *)
Lemma
cmra_empty_least
`{
Empty
A
,
!
RAIdentity
A
}
n
x
:
∅
≼
{
n
}
x
.
Proof
.
by
exists
x
;
rewrite
(
left_id
_
_)
.
Qed
.
(** ** Properties of [(⇝)] relation *)
Global
Instance
cmra_update_preorder
:
PreOrder
(
@
cmra_update
A
)
.
Global
Instance
cmra_update_preorder
:
PreOrder
(
@
cmra_update
A
)
.
Proof
.
split
.
by
intros
x
y
.
intros
x
y
y'
??
z
?;
naive_solver
.
Qed
.
Proof
.
split
.
by
intros
x
y
.
intros
x
y
y'
??
z
?;
naive_solver
.
Qed
.
Lemma
cmra_update_updateP
x
y
:
x
⇝
y
↔
x
⇝:
(
y
=
)
.
Lemma
cmra_update_updateP
x
y
:
x
⇝
y
↔
x
⇝:
(
y
=
)
.
...
...
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