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
Pierre Roux
Iris
Commits
95e41024
Commit
95e41024
authored
4 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Misc improvements.
parent
170c4eb3
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
iris/algebra/lib/gset_bij.v
+3
-2
3 additions, 2 deletions
iris/algebra/lib/gset_bij.v
iris/base_logic/lib/gset_bij.v
+14
-11
14 additions, 11 deletions
iris/base_logic/lib/gset_bij.v
with
17 additions
and
13 deletions
iris/algebra/lib/gset_bij.v
+
3
−
2
View file @
95e41024
...
@@ -176,13 +176,14 @@ Section gset_bij.
...
@@ -176,13 +176,14 @@ Section gset_bij.
naive_solver
eauto
using
subseteq_gset_bijective
,
O
.
naive_solver
eauto
using
subseteq_gset_bijective
,
O
.
Qed
.
Qed
.
Lemma
bij_view_included
q
L
a
b
:
(
a
,
b
)
∈
L
→
gset_bij_elem
a
b
≼
gset_bij_auth
q
L
.
Lemma
bij_view_included
q
L
a
b
:
(
a
,
b
)
∈
L
→
gset_bij_elem
a
b
≼
gset_bij_auth
q
L
.
Proof
.
Proof
.
intros
.
etrans
;
[|
apply
cmra_included_r
]
.
intros
.
etrans
;
[|
apply
cmra_included_r
]
.
apply
view_frag_mono
,
gset_included
.
set_solver
.
apply
view_frag_mono
,
gset_included
.
set_solver
.
Qed
.
Qed
.
Lemma
gset_bij_auth_extend
L
a
b
:
Lemma
gset_bij_auth_extend
{
L
}
a
b
:
(
∀
b'
,
(
a
,
b'
)
∉
L
)
→
(
∀
a'
,
(
a'
,
b
)
∉
L
)
→
(
∀
b'
,
(
a
,
b'
)
∉
L
)
→
(
∀
a'
,
(
a'
,
b
)
∉
L
)
→
gset_bij_auth
1
L
~~>
gset_bij_auth
1
({[(
a
,
b
)]}
∪
L
)
.
gset_bij_auth
1
L
~~>
gset_bij_auth
1
({[(
a
,
b
)]}
∪
L
)
.
Proof
.
Proof
.
...
...
This diff is collapsed.
Click to expand it.
iris/base_logic/lib/gset_bij.v
+
14
−
11
View file @
95e41024
...
@@ -35,7 +35,8 @@ Global Instance subG_gset_bijΣ `{Countable A, Countable B} Σ :
...
@@ -35,7 +35,8 @@ Global Instance subG_gset_bijΣ `{Countable A, Countable B} Σ :
Proof
.
solve_inG
.
Qed
.
Proof
.
solve_inG
.
Qed
.
Definition
gset_bij_own_auth_def
`{
gset_bijG
A
B
Σ
}
(
γ
:
gname
)
Definition
gset_bij_own_auth_def
`{
gset_bijG
A
B
Σ
}
(
γ
:
gname
)
(
q
:
Qp
)
(
L
:
gset
(
A
*
B
))
:
iProp
Σ
:=
own
γ
(
gset_bij_auth
q
L
)
.
(
q
:
Qp
)
(
L
:
gset
(
A
*
B
))
:
iProp
Σ
:=
own
γ
(
gset_bij_auth
q
L
)
.
Definition
gset_bij_own_auth_aux
:
seal
(
@
gset_bij_own_auth_def
)
.
Proof
.
by
eexists
.
Qed
.
Definition
gset_bij_own_auth_aux
:
seal
(
@
gset_bij_own_auth_def
)
.
Proof
.
by
eexists
.
Qed
.
Definition
gset_bij_own_auth
:=
unseal
gset_bij_own_auth_aux
.
Definition
gset_bij_own_auth
:=
unseal
gset_bij_own_auth_aux
.
Definition
gset_bij_own_auth_eq
:
Definition
gset_bij_own_auth_eq
:
...
@@ -102,18 +103,18 @@ Section gset_bij.
...
@@ -102,18 +103,18 @@ Section gset_bij.
by
iDestruct
(
own_valid_2
with
"Hel1 Hel2"
)
as
%
?
%
gset_bij_elem_agree
.
by
iDestruct
(
own_valid_2
with
"Hel1 Hel2"
)
as
%
?
%
gset_bij_elem_agree
.
Qed
.
Qed
.
Lemma
bij_
get
_elem
γ
q
L
a
b
:
Lemma
gset_
bij_
own
_elem
_get
{
γ
q
L
}
a
b
:
(
a
,
b
)
∈
L
→
(
a
,
b
)
∈
L
→
gset_bij_own_auth
γ
q
L
-∗
gset_bij_own_elem
γ
a
b
.
gset_bij_own_auth
γ
q
L
-∗
gset_bij_own_elem
γ
a
b
.
Proof
.
Proof
.
intros
.
rewrite
gset_bij_own_auth_eq
gset_bij_own_elem_eq
.
intros
.
rewrite
gset_bij_own_auth_eq
gset_bij_own_elem_eq
.
by
apply
own_mono
,
bij_view_included
.
by
apply
own_mono
,
bij_view_included
.
Qed
.
Qed
.
Lemma
bij_get_big_sepS_elem
γ
q
L
:
Lemma
gset_bij_own_elem_get_big
γ
q
L
:
gset_bij_own_auth
γ
q
L
-∗
[
∗
set
]
ab
∈
L
,
gset_bij_own_elem
γ
ab
.
1
ab
.
2
.
gset_bij_own_auth
γ
q
L
-∗
[
∗
set
]
ab
∈
L
,
gset_bij_own_elem
γ
ab
.
1
ab
.
2
.
Proof
.
Proof
.
iIntros
"Hauth"
.
iApply
big_sepS_forall
.
iIntros
([
a
b
]
?)
"/="
.
iIntros
"Hauth"
.
iApply
big_sepS_forall
.
iIntros
([
a
b
]
?)
"/="
.
by
iApply
bij_
get
_elem
.
by
iApply
gset_
bij_
own
_elem
_get
.
Qed
.
Qed
.
Lemma
gset_bij_own_alloc
L
:
Lemma
gset_bij_own_alloc
L
:
...
@@ -122,13 +123,14 @@ Section gset_bij.
...
@@ -122,13 +123,14 @@ Section gset_bij.
Proof
.
Proof
.
intro
.
iAssert
(
∃
γ
,
gset_bij_own_auth
γ
1
L
)
%
I
with
"[>]"
as
(
γ
)
"Hauth"
.
intro
.
iAssert
(
∃
γ
,
gset_bij_own_auth
γ
1
L
)
%
I
with
"[>]"
as
(
γ
)
"Hauth"
.
{
rewrite
gset_bij_own_auth_eq
.
iApply
own_alloc
.
by
apply
gset_bij_auth_valid
.
}
{
rewrite
gset_bij_own_auth_eq
.
iApply
own_alloc
.
by
apply
gset_bij_auth_valid
.
}
iExists
γ
.
iModIntro
.
iSplit
;
[
done
|]
.
by
iApply
bij_get_big_sepS_elem
.
iExists
γ
.
iModIntro
.
iSplit
;
[
done
|]
.
Qed
.
by
iApply
gset_bij_own_elem_get_big
.
Qed
.
Lemma
gset_bij_own_alloc_empty
:
Lemma
gset_bij_own_alloc_empty
:
⊢
|
==>
∃
γ
,
gset_bij_own_auth
γ
1
∅.
⊢
|
==>
∃
γ
,
gset_bij_own_auth
γ
1
∅.
Proof
.
iMod
(
gset_bij_own_alloc
∅
)
as
(
γ
)
"[Hauth _]"
;
by
auto
.
Qed
.
Proof
.
iMod
(
gset_bij_own_alloc
∅
)
as
(
γ
)
"[Hauth _]"
;
by
auto
.
Qed
.
Lemma
gset_bij_own_extend
γ
L
a
b
:
Lemma
gset_bij_own_extend
{
γ
L
}
a
b
:
(
∀
b'
,
(
a
,
b'
)
∉
L
)
→
(
∀
a'
,
(
a'
,
b
)
∉
L
)
→
(
∀
b'
,
(
a
,
b'
)
∉
L
)
→
(
∀
a'
,
(
a'
,
b
)
∉
L
)
→
gset_bij_own_auth
γ
1
L
==∗
gset_bij_own_auth
γ
1
L
==∗
gset_bij_own_auth
γ
1
({[(
a
,
b
)]}
∪
L
)
∗
gset_bij_own_elem
γ
a
b
.
gset_bij_own_auth
γ
1
({[(
a
,
b
)]}
∪
L
)
∗
gset_bij_own_elem
γ
a
b
.
...
@@ -137,10 +139,11 @@ Section gset_bij.
...
@@ -137,10 +139,11 @@ Section gset_bij.
iAssert
(
gset_bij_own_auth
γ
1
({[
a
,
b
]}
∪
L
))
with
"[> Hauth]"
as
"Hauth"
.
iAssert
(
gset_bij_own_auth
γ
1
({[
a
,
b
]}
∪
L
))
with
"[> Hauth]"
as
"Hauth"
.
{
rewrite
gset_bij_own_auth_eq
.
iApply
(
own_update
with
"Hauth"
)
.
{
rewrite
gset_bij_own_auth_eq
.
iApply
(
own_update
with
"Hauth"
)
.
by
apply
gset_bij_auth_extend
.
}
by
apply
gset_bij_auth_extend
.
}
iModIntro
.
iSplit
;
[
done
|]
.
iApply
(
bij_get_elem
with
"Hauth"
)
.
set_solver
.
iModIntro
.
iSplit
;
[
done
|]
.
iApply
(
gset_bij_own_elem_get
with
"Hauth"
)
.
set_solver
.
Qed
.
Qed
.
Lemma
gset_bij_own_extend_internal
γ
L
a
b
:
Lemma
gset_bij_own_extend_internal
{
γ
L
}
a
b
:
(
∀
b'
,
gset_bij_own_elem
γ
a
b'
-∗
False
)
-∗
(
∀
b'
,
gset_bij_own_elem
γ
a
b'
-∗
False
)
-∗
(
∀
a'
,
gset_bij_own_elem
γ
a'
b
-∗
False
)
-∗
(
∀
a'
,
gset_bij_own_elem
γ
a'
b
-∗
False
)
-∗
gset_bij_own_auth
γ
1
L
==∗
gset_bij_own_auth
γ
1
L
==∗
...
@@ -148,9 +151,9 @@ Section gset_bij.
...
@@ -148,9 +151,9 @@ Section gset_bij.
Proof
.
Proof
.
iIntros
"Ha Hb HL"
.
iIntros
"Ha Hb HL"
.
iAssert
⌜∀
b'
,
(
a
,
b'
)
∉
L
⌝%
I
as
%
?
.
iAssert
⌜∀
b'
,
(
a
,
b'
)
∉
L
⌝%
I
as
%
?
.
{
iIntros
(
b'
?)
.
iApply
(
"Ha"
$!
b'
)
.
by
iApply
bij_
get
_elem
.
}
{
iIntros
(
b'
?)
.
iApply
(
"Ha"
$!
b'
)
.
by
iApply
gset_
bij_
own
_elem
_get
.
}
iAssert
⌜∀
a'
,
(
a'
,
b
)
∉
L
⌝%
I
as
%
?
.
iAssert
⌜∀
a'
,
(
a'
,
b
)
∉
L
⌝%
I
as
%
?
.
{
iIntros
(
a'
?)
.
iApply
(
"Hb"
$!
a'
)
.
by
iApply
bij_
get
_elem
.
}
{
iIntros
(
a'
?)
.
iApply
(
"Hb"
$!
a'
)
.
by
iApply
gset_
bij_
own
_elem
_get
.
}
by
iApply
(
gset_bij_own_extend
with
"HL"
)
.
by
iApply
(
gset_bij_own_extend
with
"HL"
)
.
Qed
.
Qed
.
End
gset_bij
.
End
gset_bij
.
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