Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
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
William Mansky
Iris
Commits
4df70955
Commit
4df70955
authored
4 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Generalize inclusion lemmas for view & auth to iff.
parent
7f61fa72
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
theories/algebra/auth.v
+4
-4
4 additions, 4 deletions
theories/algebra/auth.v
theories/algebra/view.v
+26
-14
26 additions, 14 deletions
theories/algebra/view.v
with
30 additions
and
18 deletions
theories/algebra/auth.v
+
4
−
4
View file @
4df70955
...
...
@@ -189,17 +189,17 @@ Section auth.
(** Inclusion *)
Lemma
auth_auth_includedN
n
p1
p2
a1
a2
b
:
●
{
p1
}
a1
≼
{
n
}
●
{
p2
}
a2
⋅
◯
b
→
(
p1
≤
p2
)
%
Qc
∧
a1
≡
{
n
}
≡
a2
.
●
{
p1
}
a1
≼
{
n
}
●
{
p2
}
a2
⋅
◯
b
↔
(
p1
≤
p2
)
%
Qc
∧
a1
≡
{
n
}
≡
a2
.
Proof
.
apply
view_auth_includedN
.
Qed
.
Lemma
auth_auth_included
p1
p2
a1
a2
b
:
●
{
p1
}
a1
≼
●
{
p2
}
a2
⋅
◯
b
→
(
p1
≤
p2
)
%
Qc
∧
a1
≡
a2
.
●
{
p1
}
a1
≼
●
{
p2
}
a2
⋅
◯
b
↔
(
p1
≤
p2
)
%
Qc
∧
a1
≡
a2
.
Proof
.
apply
view_auth_included
.
Qed
.
Lemma
auth_frag_includedN
n
p
a
b1
b2
:
◯
b1
≼
{
n
}
●
{
p
}
a
⋅
◯
b2
→
b1
≼
{
n
}
b2
.
◯
b1
≼
{
n
}
●
{
p
}
a
⋅
◯
b2
↔
b1
≼
{
n
}
b2
.
Proof
.
apply
view_frag_includedN
.
Qed
.
Lemma
auth_frag_included
p
a
b1
b2
:
◯
b1
≼
●
{
p
}
a
⋅
◯
b2
→
b1
≼
b2
.
◯
b1
≼
●
{
p
}
a
⋅
◯
b2
↔
b1
≼
b2
.
Proof
.
apply
view_frag_included
.
Qed
.
(** Internalized properties *)
...
...
This diff is collapsed.
Click to expand it.
theories/algebra/view.v
+
26
−
14
View file @
4df70955
...
...
@@ -307,32 +307,44 @@ Section cmra.
(** Inclusion *)
Lemma
view_auth_includedN
n
p1
p2
a1
a2
b
:
●
V
{
p1
}
a1
≼
{
n
}
●
V
{
p2
}
a2
⋅
◯
V
b
→
(
p1
≤
p2
)
%
Qc
∧
a1
≡
{
n
}
≡
a2
.
●
V
{
p1
}
a1
≼
{
n
}
●
V
{
p2
}
a2
⋅
◯
V
b
↔
(
p1
≤
p2
)
%
Qc
∧
a1
≡
{
n
}
≡
a2
.
Proof
.
intros
[[[[
qf
agf
]|]
bf
]
[[?
%
(
discrete_iff
_
_)
?]
%
(
inj
Some
)
_]];
simplify_eq
/=.
-
split
;
[
apply
Qp_le_plus_l
|]
.
apply
to_agree_includedN
.
by
exists
agf
.
-
split
;
[
done
|]
.
by
apply
(
inj
to_agree
)
.
split
.
-
intros
[[[[
qf
agf
]|]
bf
]
[[?
%
(
discrete_iff
_
_)
?]
%
(
inj
Some
)
_]];
simplify_eq
/=.
+
split
;
[
apply
Qp_le_plus_l
|]
.
apply
to_agree_includedN
.
by
exists
agf
.
+
split
;
[
done
|]
.
by
apply
(
inj
to_agree
)
.
-
intros
[[[
q
->
]
%
frac_included
|
->%
Qp_eq
]
%
Qcanon
.
Qcle_lt_or_eq
->
]
.
+
rewrite
view_auth_frac_op
-
assoc
.
apply
cmra_includedN_l
.
+
apply
cmra_includedN_l
.
Qed
.
Lemma
view_auth_included
p1
p2
a1
a2
b
:
●
V
{
p1
}
a1
≼
●
V
{
p2
}
a2
⋅
◯
V
b
→
(
p1
≤
p2
)
%
Qc
∧
a1
≡
a2
.
●
V
{
p1
}
a1
≼
●
V
{
p2
}
a2
⋅
◯
V
b
↔
(
p1
≤
p2
)
%
Qc
∧
a1
≡
a2
.
Proof
.
intros
.
split
.
-
by
eapply
(
view_auth_includedN
0
),
cmra_included_includedN
.
-
apply
equiv_dist
=>
n
.
by
eapply
view_auth_includedN
,
cmra_included_includedN
.
-
split
.
+
by
eapply
(
view_auth_includedN
0
),
cmra_included_includedN
.
+
apply
equiv_dist
=>
n
.
by
eapply
view_auth_includedN
,
cmra_included_includedN
.
-
intros
[[[
q
->
]
%
frac_included
|
->%
Qp_eq
]
%
Qcanon
.
Qcle_lt_or_eq
->
]
.
+
rewrite
view_auth_frac_op
-
assoc
.
apply
cmra_included_l
.
+
apply
cmra_included_l
.
Qed
.
Lemma
view_frag_includedN
n
p
a
b1
b2
:
◯
V
b1
≼
{
n
}
●
V
{
p
}
a
⋅
◯
V
b2
→
b1
≼
{
n
}
b2
.
◯
V
b1
≼
{
n
}
●
V
{
p
}
a
⋅
◯
V
b2
↔
b1
≼
{
n
}
b2
.
Proof
.
intros
[
xf
[_
Hb
]];
simpl
in
*.
revert
Hb
;
rewrite
left_id
.
by
exists
(
view_frag_proj
xf
)
.
split
.
-
intros
[
xf
[_
Hb
]];
simpl
in
*.
revert
Hb
;
rewrite
left_id
.
by
exists
(
view_frag_proj
xf
)
.
-
intros
[
bf
->
]
.
rewrite
comm
view_frag_op
-
assoc
.
apply
cmra_includedN_l
.
Qed
.
Lemma
view_frag_included
p
a
b1
b2
:
◯
V
b1
≼
●
V
{
p
}
a
⋅
◯
V
b2
→
b1
≼
b2
.
◯
V
b1
≼
●
V
{
p
}
a
⋅
◯
V
b2
↔
b1
≼
b2
.
Proof
.
intros
[
xf
[_
Hb
]];
simpl
in
*.
revert
Hb
;
rewrite
left_id
.
by
exists
(
view_frag_proj
xf
)
.
split
.
-
intros
[
xf
[_
Hb
]];
simpl
in
*.
revert
Hb
;
rewrite
left_id
.
by
exists
(
view_frag_proj
xf
)
.
-
intros
[
bf
->
]
.
rewrite
comm
view_frag_op
-
assoc
.
apply
cmra_included_l
.
Qed
.
(** Internalized properties *)
...
...
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