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
d4bd6b81
Verified
Commit
d4bd6b81
authored
5 years ago
by
Paolo G. Giarrusso
Browse files
Options
Downloads
Patches
Plain Diff
Unfinished WIP
parent
c4914cca
Branches
test-bigop-synchanges
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/algebra/auth.v
+73
-0
73 additions, 0 deletions
theories/algebra/auth.v
with
73 additions
and
0 deletions
theories/algebra/auth.v
+
73
−
0
View file @
d4bd6b81
...
@@ -244,6 +244,48 @@ Proof.
...
@@ -244,6 +244,48 @@ Proof.
split_and
!
;
[
by
apply
cmra_included_includedN
|
by
apply
cmra_valid_validN
|
done
]
.
split_and
!
;
[
by
apply
cmra_included_includedN
|
by
apply
cmra_valid_validN
|
done
]
.
Qed
.
Qed
.
(* Print cmra_extend_included.
: ∀ M : cmraT, CmraSwappable M
→ ∀ (n : nat) (mx : option M) (z : M),
✓{S n} mx
→ ✓{n} (z ⋅? mx)
→ {z' : M | ✓{S n} (z' ⋅? mx) ∧ z ≡{n}≡ z'} *)
(* cmra_extend :
∀ (A : cmraT) (n : nat) (x y1 y2 : A), ✓{n} x
→ x ≡{n}≡ y1 ⋅ y2
→ {z1 : A &
{z2 : A |
x ≡ z1 ⋅ z2
∧ z1 ≡{n}≡ y1 ∧ z2 ≡{n}≡ y2}} *)
Instance
Swappable_authR
`{
CmraSwappable
A
}:
CmraSwappable
authR
.
Proof
.
(* split; intros. *)
split
=>
n
[
x
|]
[
mza
zao
];
rewrite
!
auth_validN_eq
/=
;
first
last
.
-
move
:
mza
=>
[[
za
_
[
Hle
Hv
]
|
//
]
|
_
Hv
]
/=.
+
case
:
(
cmra_extend_included
n
None
za
)
=>
//=
za'
[
Hza'
Heq
]
.
hnf
in
Hle
.
(* Let's pretend the existential in Hle were a sigma. *)
have
[
zaf
Hle'
]:
{
z
|
za
≡
{
n
}
≡
zao
⋅
z
}
.
admit
.
(* Fails: *)
(* case: (cmra_extend_included n None zao) => //= [| zao' [Hzao' Heqo]].
eauto using cmra_validN_includedN.
eexists (Auth (Excl' za') zao'); repeat split => //=; last by repeat f_equiv.
hnf in Hle |- *. *)
case
:
(
cmra_extend
n
za'
zao
zaf
);
rewrite
-
?Heq
//
=>
zao'
[
zaf'
[
Heqo
[??]]]
.
(* case: (cmra_extend_included n (Some zaf') zao') => /= [||za'' [??]]; rewrite /= ?Some_validN; try by setoid_subst; eauto using Some_validN, cmra_validN_S, cmra_validN_op_r.
eexists (Auth (Excl' za'') zao'); repeat split => //=; eauto using Some_validN, cmra_validN_S, cmra_validN_op_l, cmra_validN_op_r; last repeat f_equiv.
hnf; eauto.
exists ε. *)
case
:
(
cmra_extend_included
(
S
n
)
None
za'
)
=>
//=
[
za''
[
Heq1
Heq2
]]
.
(* rewrite /= ?Some_validN; try by setoid_subst; eauto using Some_validN, cmra_validN_S, cmra_validN_op_r. *)
eexists
(
Auth
(
Excl'
za''
)
zao'
);
repeat
split
=>
//=
;
eauto
using
Some_validN
,
cmra_validN_S
,
cmra_validN_op_l
,
cmra_validN_op_r
;
last
repeat
f_equiv
.
2
:
by
rewrite
Heq
;
apply
dist_S
.
hnf
.
exists
zaf'
.
by
setoid_subst
.
Abort
.
(* Not sure yet if this should hold. *)
(* Not sure yet if this should hold. *)
Instance
Swappable_authR
`{
CmraSwappable
A
}:
CmraSwappable
authR
.
Instance
Swappable_authR
`{
CmraSwappable
A
}:
CmraSwappable
authR
.
Proof
.
Proof
.
...
@@ -256,6 +298,37 @@ Proof.
...
@@ -256,6 +298,37 @@ Proof.
+
case
:
mx
Hx
{
Hle
Heqo
}
=>
[
x
|];
rewrite
//=
!
Some_validN
.
apply
authoritative_validN
.
+
case
:
mx
Hx
{
Hle
Heqo
}
=>
[
x
|];
rewrite
//=
!
Some_validN
.
apply
authoritative_validN
.
+
by
case
:
mx
Hx
Heqo
Hle
=>
[
x
|]
//=
;
rewrite
?Some_validN
=>
?
<-.
+
by
case
:
mx
Hx
Heqo
Hle
=>
[
x
|]
//=
;
rewrite
?Some_validN
=>
?
<-.
+
exists
(
Auth
z'
(
auth_own
z
))
=>
//=.
+
exists
(
Auth
z'
(
auth_own
z
))
=>
//=.
(* destruct mx; cbn in *; rewrite /= ?Some_validN. *)
repeat
case_match
;
subst
;
split
;
destruct
mx
as
[[[
ca
|]
cao
]|];
destruct
z
as
[[
a
|]
b
];
destruct
z'
;
cbn
in
*
;
try
cbv
in
Heqo
;
try
cbv
in
Heqo0
;
simplify_eq
;
try
by
[|
inversion
Heq
]
.
*
cbv
in
Hz'
,
Heq
.
clear
Heq
Hz'
.
all
:
split
.
all
:
try
apply
Hx
.
destruct
Hx
as
[
Hx1
Hx2
]
.
rewrite
/
auth_op
/
cmra_op
/=
in
Hle
Hx1
*.
all
:
rewrite
/
auth_op
/
cmra_op
/=
in
Hle
*.
admit
.
*
apply
(
inj
_)
in
Heq
.
inversion_clear
Heq
;
setoid_subst
.
cbv
in
Hz'
.
clear
Hz'
.
rewrite
Some_validN
/
auth_op
/
cmra_op
/=
in
Hx
*.
move
=>
/
auth_own_validN
/=
Hx
.
admit
.
(* This seems false. *)
*
hnf
in
*.
(* destruct Hx. cbv in Hle, Hx.
cbv in Hx, Hz'.
cbn.
cbv.
1-3: admit.
cbv in Heqo0, Heqo; simplify_eq.
cbv in Heqo0, Heqo; simplify_eq. by inversion Heq.
by inversion Heq.
by inversion Heq.
inversion Heqo0; inversion Heqo. cbv in *. *)
admit
.
admit
.
(* repeat case_match; subst; split; destruct mx as [[[ca|] cao]|]; destruct z as [[a|] b]; cbn in *; setoid_subst => //.
(* repeat case_match; subst; split; destruct mx as [[[ca|] cao]|]; destruct z as [[a|] b]; cbn in *; setoid_subst => //.
(* - case: (cmra_extend_included n (auth_own <$> mx) zamx) => /= [||z' [Hz' Heq]].
(* - case: (cmra_extend_included n (auth_own <$> mx) zamx) => /= [||z' [Hz' Heq]].
...
...
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