Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iris
Manage
Activity
Members
Labels
Plan
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
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
Paolo G. Giarrusso
iris
Commits
cd20e951
Commit
cd20e951
authored
9 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Some forgotten Proper instances.
parent
d885e2e5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
modures/auth.v
+6
-0
6 additions, 0 deletions
modures/auth.v
modures/cmra.v
+13
-2
13 additions, 2 deletions
modures/cmra.v
modures/excl.v
+8
-4
8 additions, 4 deletions
modures/excl.v
with
27 additions
and
6 deletions
modures/auth.v
+
6
−
0
View file @
cd20e951
...
...
@@ -20,10 +20,16 @@ Instance auth_dist : Dist (auth A) := λ n x y,
Global
Instance
Auth_ne
:
Proper
(
dist
n
==>
dist
n
==>
dist
n
)
(
@
Auth
A
)
.
Proof
.
by
split
.
Qed
.
Global
Instance
Auth_proper
:
Proper
((
≡
)
==>
(
≡
)
==>
(
≡
))
(
@
Auth
A
)
.
Proof
.
by
split
.
Qed
.
Global
Instance
authoritative_ne
:
Proper
(
dist
n
==>
dist
n
)
(
@
authoritative
A
)
.
Proof
.
by
destruct
1
.
Qed
.
Global
Instance
authoritative_proper
:
Proper
((
≡
)
==>
(
≡
))
(
@
authoritative
A
)
.
Proof
.
by
destruct
1
.
Qed
.
Global
Instance
own_ne
:
Proper
(
dist
n
==>
dist
n
)
(
@
own
A
)
.
Proof
.
by
destruct
1
.
Qed
.
Global
Instance
own_proper
:
Proper
((
≡
)
==>
(
≡
))
(
@
own
A
)
.
Proof
.
by
destruct
1
.
Qed
.
Instance
auth_compl
:
Compl
(
auth
A
)
:=
λ
c
,
Auth
(
compl
(
chain_map
authoritative
c
))
(
compl
(
chain_map
own
c
))
.
...
...
This diff is collapsed.
Click to expand it.
modures/cmra.v
+
13
−
2
View file @
cd20e951
...
...
@@ -143,12 +143,12 @@ Class CMRAMonotone {A B : cmraT} (f : A → B) := {
(** * Frame preserving updates *)
Definition
cmra_updateP
{
A
:
cmraT
}
(
x
:
A
)
(
P
:
A
→
Prop
)
:=
∀
z
n
,
✓
{
S
n
}
(
x
⋅
z
)
→
∃
y
,
P
y
∧
✓
{
S
n
}
(
y
⋅
z
)
.
Instance
:
Params
(
@
cmra_updateP
)
3
.
Instance
:
Params
(
@
cmra_updateP
)
1
.
Infix
"⇝:"
:=
cmra_updateP
(
at
level
70
)
.
Definition
cmra_update
{
A
:
cmraT
}
(
x
y
:
A
)
:=
∀
z
n
,
✓
{
S
n
}
(
x
⋅
z
)
→
✓
{
S
n
}
(
y
⋅
z
)
.
Infix
"⇝"
:=
cmra_update
(
at
level
70
)
.
Instance
:
Params
(
@
cmra_update
)
3
.
Instance
:
Params
(
@
cmra_update
)
1
.
(** * Properties **)
Section
cmra
.
...
...
@@ -193,6 +193,17 @@ Proof.
intros
x
x'
Hx
y
y'
Hy
.
by
split
;
intros
[
z
?];
exists
z
;
[
rewrite
-
Hx
-
Hy
|
rewrite
Hx
Hy
]
.
Qed
.
Global
Instance
cmra_update_proper
:
Proper
((
≡
)
==>
(
≡
)
==>
iff
)
(
@
cmra_update
A
)
.
Proof
.
intros
x1
x2
Hx
y1
y2
Hy
;
split
=>?
z
n
;
[
rewrite
-
Hx
-
Hy
|
rewrite
Hx
Hy
];
auto
.
Qed
.
Global
Instance
cmra_updateP_proper
:
Proper
((
≡
)
==>
pointwise_relation
_
iff
==>
iff
)
(
@
cmra_updateP
A
)
.
Proof
.
intros
x1
x2
Hx
P1
P2
HP
;
split
=>
Hup
z
n
;
[
rewrite
-
Hx
;
setoid_rewrite
<-
HP
|
rewrite
Hx
;
setoid_rewrite
HP
];
auto
.
Qed
.
(** ** Validity *)
Lemma
cmra_valid_validN
x
:
✓
x
↔
∀
n
,
✓
{
n
}
x
.
...
...
This diff is collapsed.
Click to expand it.
modures/excl.v
+
8
−
4
View file @
cd20e951
...
...
@@ -27,6 +27,14 @@ Inductive excl_dist `{Dist A} : Dist (excl A) :=
|
ExclUnit_dist
n
:
ExclUnit
=
{
n
}
=
ExclUnit
|
ExclBot_dist
n
:
ExclBot
=
{
n
}
=
ExclBot
.
Existing
Instance
excl_dist
.
Global
Instance
Excl_ne
:
Proper
(
dist
n
==>
dist
n
)
(
@
Excl
A
)
.
Proof
.
by
constructor
.
Qed
.
Global
Instance
Excl_proper
:
Proper
((
≡
)
==>
(
≡
))
(
@
Excl
A
)
.
Proof
.
by
constructor
.
Qed
.
Global
Instance
Excl_inj
:
Injective
(
≡
)
(
≡
)
(
@
Excl
A
)
.
Proof
.
by
inversion_clear
1
.
Qed
.
Global
Instance
Excl_dist_inj
n
:
Injective
(
dist
n
)
(
dist
n
)
(
@
Excl
A
)
.
Proof
.
by
inversion_clear
1
.
Qed
.
Program
Definition
excl_chain
(
c
:
chain
(
excl
A
))
(
x
:
A
)
(
H
:
maybe
Excl
(
c
1
)
=
Some
x
)
:
chain
A
:=
{|
chain_car
n
:=
match
c
n
return
_
with
Excl
y
=>
y
|
_
=>
x
end
|}
.
...
...
@@ -66,10 +74,6 @@ Proof.
Qed
.
Canonical
Structure
exclC
:
cofeT
:=
CofeT
excl_cofe_mixin
.
Global
Instance
Excl_inj
:
Injective
(
≡
)
(
≡
)
(
@
Excl
A
)
.
Proof
.
by
inversion_clear
1
.
Qed
.
Global
Instance
Excl_dist_inj
n
:
Injective
(
dist
n
)
(
dist
n
)
(
@
Excl
A
)
.
Proof
.
by
inversion_clear
1
.
Qed
.
Global
Instance
Excl_timeless
(
x
:
A
)
:
Timeless
x
→
Timeless
(
Excl
x
)
.
Proof
.
by
inversion_clear
2
;
constructor
;
apply
(
timeless
_)
.
Qed
.
Global
Instance
ExclUnit_timeless
:
Timeless
(
@
ExclUnit
A
)
.
...
...
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