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
Abel Nieto
Iris
Commits
38f75bf3
Commit
38f75bf3
authored
5 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Add `excl_auth` camera.
parent
7adcba8f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
_CoqProject
+1
-0
1 addition, 0 deletions
_CoqProject
theories/algebra/excl_auth.v
+74
-0
74 additions, 0 deletions
theories/algebra/excl_auth.v
with
75 additions
and
0 deletions
_CoqProject
+
1
−
0
View file @
38f75bf3
...
...
@@ -18,6 +18,7 @@ theories/algebra/cmra_big_op.v
theories/algebra/sts.v
theories/algebra/auth.v
theories/algebra/frac_auth.v
theories/algebra/excl_auth.v
theories/algebra/gmap.v
theories/algebra/ofe.v
theories/algebra/base.v
...
...
This diff is collapsed.
Click to expand it.
theories/algebra/excl_auth.v
0 → 100644
+
74
−
0
View file @
38f75bf3
From
iris
.
algebra
Require
Export
auth
excl
updates
.
From
iris
.
algebra
Require
Import
local_updates
.
From
iris
.
base_logic
Require
Import
base_logic
.
Definition
excl_authR
(
A
:
ofeT
)
:
cmraT
:=
authR
(
optionUR
(
exclR
A
))
.
Definition
excl_authUR
(
A
:
ofeT
)
:
ucmraT
:=
authUR
(
optionUR
(
exclR
A
))
.
Definition
excl_auth_auth
{
A
:
ofeT
}
(
a
:
A
)
:
excl_authR
A
:=
●
(
Some
(
Excl
a
))
.
Definition
excl_auth_frag
{
A
:
ofeT
}
(
a
:
A
)
:
excl_authR
A
:=
◯
(
Some
(
Excl
a
))
.
Typeclasses
Opaque
excl_auth_auth
excl_auth_frag
.
Instance
:
Params
(
@
excl_auth_auth
)
1
:=
{}
.
Instance
:
Params
(
@
excl_auth_frag
)
2
:=
{}
.
Notation
"●E a"
:=
(
excl_auth_auth
a
)
(
at
level
10
)
.
Notation
"◯E a"
:=
(
excl_auth_frag
a
)
(
at
level
10
)
.
Section
excl_auth
.
Context
{
A
:
ofeT
}
.
Implicit
Types
a
b
:
A
.
Global
Instance
excl_auth_auth_ne
:
NonExpansive
(
@
excl_auth_auth
A
)
.
Proof
.
solve_proper
.
Qed
.
Global
Instance
excl_auth_auth_proper
:
Proper
((
≡
)
==>
(
≡
))
(
@
excl_auth_auth
A
)
.
Proof
.
solve_proper
.
Qed
.
Global
Instance
excl_auth_frag_ne
:
NonExpansive
(
@
excl_auth_frag
A
)
.
Proof
.
solve_proper
.
Qed
.
Global
Instance
excl_auth_frag_proper
:
Proper
((
≡
)
==>
(
≡
))
(
@
excl_auth_frag
A
)
.
Proof
.
solve_proper
.
Qed
.
Global
Instance
excl_auth_auth_discrete
a
:
Discrete
a
→
Discrete
(
●
E
a
)
.
Proof
.
intros
;
apply
auth_auth_discrete
;
[
apply
Some_discrete
|];
apply
_
.
Qed
.
Global
Instance
excl_auth_frag_discrete
a
:
Discrete
a
→
Discrete
(
◯
E
a
)
.
Proof
.
intros
;
apply
auth_frag_discrete
,
Some_discrete
;
apply
_
.
Qed
.
Lemma
excl_auth_validN
n
a
:
✓
{
n
}
(
●
E
a
⋅
◯
E
a
)
.
Proof
.
by
rewrite
auth_both_validN
.
Qed
.
Lemma
excl_auth_valid
a
:
✓
(
●
E
a
⋅
◯
E
a
)
.
Proof
.
intros
.
by
apply
auth_both_valid_2
.
Qed
.
Lemma
excl_auth_agreeN
n
a
b
:
✓
{
n
}
(
●
E
a
⋅
◯
E
b
)
→
a
≡
{
n
}
≡
b
.
Proof
.
rewrite
auth_both_validN
/=
=>
-
[
Hincl
Hvalid
]
.
move
:
Hincl
=>
/
Some_includedN_exclusive
/
(_
I
)
?
.
by
apply
(
inj
Excl
)
.
Qed
.
Lemma
excl_auth_agree
a
b
:
✓
(
●
E
a
⋅
◯
E
b
)
→
a
≡
b
.
Proof
.
intros
.
apply
equiv_dist
=>
n
.
by
apply
excl_auth_agreeN
,
cmra_valid_validN
.
Qed
.
Lemma
excl_auth_agreeL
`{
!
LeibnizEquiv
A
}
a
b
:
✓
(
●
E
a
⋅
◯
E
b
)
→
a
=
b
.
Proof
.
intros
.
by
apply
leibniz_equiv
,
excl_auth_agree
.
Qed
.
Lemma
excl_auth_agreeI
{
M
}
a
b
:
✓
(
●
E
a
⋅
◯
E
b
)
⊢@
{
uPredI
M
}
(
a
≡
b
)
.
Proof
.
rewrite
auth_both_validI
bi
.
and_elim_r
bi
.
and_elim_l
.
apply
bi
.
exist_elim
=>
-
[[
c
|]|];
by
rewrite
bi
.
option_equivI
/=
excl_equivI
//=
bi
.
False_elim
.
Qed
.
Lemma
excl_auth_frag_validN_op_1_l
n
a
b
:
✓
{
n
}
(
◯
E
a
⋅
◯
E
b
)
→
False
.
Proof
.
by
rewrite
-
auth_frag_op
auth_frag_validN
.
Qed
.
Lemma
excl_auth_frag_valid_op_1_l
a
b
:
✓
(
◯
E
a
⋅
◯
E
b
)
→
False
.
Proof
.
by
rewrite
-
auth_frag_op
auth_frag_valid
.
Qed
.
Lemma
excl_auth_update
a
b
a'
:
●
E
a
⋅
◯
E
b
~~>
●
E
a'
⋅
◯
E
a'
.
Proof
.
intros
.
by
apply
auth_update
,
option_local_update
,
exclusive_local_update
.
Qed
.
End
excl_auth
.
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