Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iris-coq
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
Janno
iris-coq
Commits
79d2785b
Commit
79d2785b
authored
9 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
experimenting with a global CMRA that is an indexed product
parent
48674eed
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
program_logic/auth.v
+72
-0
72 additions, 0 deletions
program_logic/auth.v
with
72 additions
and
0 deletions
program_logic/auth.v
0 → 100644
+
72
−
0
View file @
79d2785b
Require
Export
algebra
.
auth
.
Require
Import
program_logic
.
functor
program_logic
.
language
program_logic
.
weakestpre
.
(* RJ: This is a work-in-progress playground.
FIXME: Finish or remove. *)
Section
auth
.
(* TODO what should be implicit, what explicit? *)
Context
{
Λ
:
language
}
.
Context
{
C
:
nat
→
cmraT
}
.
Context
(
i
:
nat
)
.
Context
{
A
:
cmraT
}
.
Hypothesis
Ci
:
C
i
=
authRA
A
.
Let
Σ
:
iFunctor
:=
iprodF
(
mapF
positive
∘
constF
∘
C
)
.
Definition
tr
(
a
:
authRA
A
)
:
C
i
.
rewrite
Ci
.
exact
a
.
Defined
.
Definition
tr'
(
c
:
C
i
)
:
authRA
A
.
rewrite
-
Ci
.
exact
c
.
Defined
.
Lemma
tr'_tr
a
:
tr'
$
tr
a
=
a
.
Proof
.
rewrite
/
tr'
/
tr
.
by
destruct
Ci
.
Qed
.
Lemma
tr_tr'
c
:
tr
$
tr'
c
=
c
.
Proof
.
rewrite
/
tr'
/
tr
.
by
destruct
Ci
.
Qed
.
Lemma
tr_proper
:
Proper
((
≡
)
==>
(
≡
))
tr
.
Proof
.
move
=>
a1
a2
Heq
.
rewrite
/
tr
.
by
destruct
Ci
.
Qed
.
Lemma
Ci_op
(
c1
c2
:
C
i
)
:
c1
⋅
c2
=
tr
(
tr'
c1
⋅
tr'
c2
)
.
Proof
.
rewrite
/
tr'
/
tr
.
by
destruct
Ci
.
Qed
.
Definition
Tr
j
{
H
:
i
=
j
}
(
c
:
C
i
)
:
C
j
.
rewrite
-
H
.
exact
c
.
Defined
.
(* FIXME RJ: I'd rather not have to specify Σ by hand here. *)
Definition
ownNothing
:
iProp
Λ
Σ
:=
ownG
(
Σ
:=
Σ
)
(
fun
j
=>
(
∅
:
mapRA
positive
(
C
j
)))
.
Definition
ownA
(
p
:
positive
)
(
a
:
authRA
A
)
:
iProp
Λ
Σ
:=
ownG
(
Σ
:=
Σ
)
(
fun
j
=>
match
decide
(
i
=
j
)
with
|
left
Heq
=>
<
[
p
:=
Tr
j
(
H
:=
Heq
)
$
tr
a
]
>∅
|
right
Hneq
=>
∅
end
)
.
Lemma
ownA_op
p
a1
a2
:
(
ownA
p
a1
★
ownA
p
a2
)
%
I
≡
ownA
p
(
a1
⋅
a2
)
.
Proof
.
rewrite
/
ownA
-
ownG_op
.
apply
ownG_proper
=>
j
/=.
rewrite
iprod_lookup_op
.
destruct
(
decide
(
i
=
j
))
.
-
move
=>
q
.
destruct
e
.
rewrite
lookup_op
/=.
destruct
(
decide
(
p
=
q
));
first
subst
q
.
+
rewrite
!
lookup_insert
.
rewrite
/
op
/
cmra_op
/=.
f_equiv
.
rewrite
Ci_op
.
apply
tr_proper
.
rewrite
!
tr'_tr
.
reflexivity
.
+
by
rewrite
!
lookup_insert_ne
//.
-
by
rewrite
left_id
.
Qed
.
End
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