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
Rice Wine
Iris
Commits
3ecb4b2e
Commit
3ecb4b2e
authored
8 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Multiset big ops on uPred.
parent
1097ab91
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
base_logic/big_op.v
+73
-1
73 additions, 1 deletion
base_logic/big_op.v
with
73 additions
and
1 deletion
base_logic/big_op.v
+
73
−
1
View file @
3ecb4b2e
From
iris
.
algebra
Require
Export
list
cmra_big_op
.
From
iris
.
base_logic
Require
Export
base_logic
.
From
iris
.
prelude
Require
Import
gmap
fin_collections
functions
.
From
iris
.
prelude
Require
Import
gmap
fin_collections
gmultiset
functions
.
Import
uPred
.
(* We make use of the bigops on CMRAs, so we first define a (somewhat ad-hoc)
...
...
@@ -104,6 +104,10 @@ Notation "'[∗' 'set' ] x ∈ X , P" := (big_opS (M:=uPredUR _) X (λ x, P))
(
at
level
200
,
X
at
level
10
,
x
at
level
1
,
right
associativity
,
format
"[∗ set ] x ∈ X , P"
)
:
uPred_scope
.
Notation
"'[∗' 'mset' ] x ∈ X , P"
:=
(
big_opMS
(
M
:=
uPredUR
_)
X
(
λ
x
,
P
))
(
at
level
200
,
X
at
level
10
,
x
at
level
1
,
right
associativity
,
format
"[∗ mset ] x ∈ X , P"
)
:
uPred_scope
.
(** * Persistence and timelessness of lists of uPreds *)
Class
PersistentL
{
M
}
(
Ps
:
list
(
uPred
M
))
:=
persistentL
:
Forall
PersistentP
Ps
.
...
...
@@ -508,4 +512,72 @@ Section gset.
(
∀
x
,
TimelessP
(
Φ
x
))
→
TimelessP
([
∗
set
]
x
∈
X
,
Φ
x
)
.
Proof
.
rewrite
/
big_opS
.
apply
_
.
Qed
.
End
gset
.
(** ** Big ops over finite multisets *)
Section
gmultiset
.
Context
`{
Countable
A
}
.
Implicit
Types
X
:
gmultiset
A
.
Implicit
Types
Φ
:
A
→
uPred
M
.
Lemma
big_sepMS_mono
Φ
Ψ
X
Y
:
Y
⊆
X
→
(
∀
x
,
x
∈
Y
→
Φ
x
⊢
Ψ
x
)
→
([
∗
mset
]
x
∈
X
,
Φ
x
)
⊢
[
∗
mset
]
x
∈
Y
,
Ψ
x
.
Proof
.
intros
HX
HΦ
.
trans
([
∗
mset
]
x
∈
Y
,
Φ
x
)
%
I
.
-
apply
uPred_included
.
apply
:
big_op_contains
.
by
apply
fmap_contains
,
gmultiset_elements_contains
.
-
apply
big_opMS_forall
;
apply
_
||
auto
.
Qed
.
Lemma
big_sepMS_proper
Φ
Ψ
X
:
(
∀
x
,
x
∈
X
→
Φ
x
⊣⊢
Ψ
x
)
→
([
∗
mset
]
x
∈
X
,
Φ
x
)
⊣⊢
([
∗
mset
]
x
∈
X
,
Ψ
x
)
.
Proof
.
apply
:
big_opMS_proper
.
Qed
.
Global
Instance
big_sepMS_mono'
X
:
Proper
(
pointwise_relation
_
(
⊢
)
==>
(
⊢
))
(
big_opMS
(
M
:=
uPredUR
M
)
X
)
.
Proof
.
intros
f
g
Hf
.
apply
big_opMS_forall
;
apply
_
||
intros
;
apply
Hf
.
Qed
.
Lemma
big_sepMS_empty
Φ
:
([
∗
mset
]
x
∈
∅
,
Φ
x
)
⊣⊢
True
.
Proof
.
by
rewrite
big_opMS_empty
.
Qed
.
Lemma
big_sepMS_union
Φ
X
Y
:
([
∗
mset
]
y
∈
X
∪
Y
,
Φ
y
)
⊣⊢
([
∗
mset
]
y
∈
X
,
Φ
y
)
∗
[
∗
mset
]
y
∈
Y
,
Φ
y
.
Proof
.
apply
:
big_opMS_union
.
Qed
.
Lemma
big_sepMS_delete
Φ
X
x
:
x
∈
X
→
([
∗
mset
]
y
∈
X
,
Φ
y
)
⊣⊢
Φ
x
∗
[
∗
mset
]
y
∈
X
∖
{[
x
]},
Φ
y
.
Proof
.
apply
:
big_opMS_delete
.
Qed
.
Lemma
big_sepMS_elem_of
Φ
X
x
:
x
∈
X
→
([
∗
mset
]
y
∈
X
,
Φ
y
)
⊢
Φ
x
.
Proof
.
intros
.
apply
uPred_included
.
by
apply
:
big_opMS_elem_of
.
Qed
.
Lemma
big_sepMS_singleton
Φ
x
:
([
∗
mset
]
y
∈
{[
x
]},
Φ
y
)
⊣⊢
Φ
x
.
Proof
.
apply
:
big_opMS_singleton
.
Qed
.
Lemma
big_sepMS_sepMS
Φ
Ψ
X
:
([
∗
mset
]
y
∈
X
,
Φ
y
∗
Ψ
y
)
⊣⊢
([
∗
mset
]
y
∈
X
,
Φ
y
)
∗
([
∗
mset
]
y
∈
X
,
Ψ
y
)
.
Proof
.
apply
:
big_opMS_opMS
.
Qed
.
Lemma
big_sepMS_later
Φ
X
:
▷
([
∗
mset
]
y
∈
X
,
Φ
y
)
⊣⊢
([
∗
mset
]
y
∈
X
,
▷
Φ
y
)
.
Proof
.
apply
(
big_opMS_commute
_)
.
Qed
.
Lemma
big_sepMS_always
Φ
X
:
□
([
∗
mset
]
y
∈
X
,
Φ
y
)
⊣⊢
([
∗
mset
]
y
∈
X
,
□
Φ
y
)
.
Proof
.
apply
(
big_opMS_commute
_)
.
Qed
.
Lemma
big_sepMS_always_if
q
Φ
X
:
□
?q
([
∗
mset
]
y
∈
X
,
Φ
y
)
⊣⊢
([
∗
mset
]
y
∈
X
,
□
?q
Φ
y
)
.
Proof
.
apply
(
big_opMS_commute
_)
.
Qed
.
Global
Instance
big_sepMS_empty_persistent
Φ
:
PersistentP
([
∗
mset
]
x
∈
∅
,
Φ
x
)
.
Proof
.
rewrite
/
big_opMS
gmultiset_elements_empty
.
apply
_
.
Qed
.
Global
Instance
big_sepMS_persistent
Φ
X
:
(
∀
x
,
PersistentP
(
Φ
x
))
→
PersistentP
([
∗
mset
]
x
∈
X
,
Φ
x
)
.
Proof
.
rewrite
/
big_opMS
.
apply
_
.
Qed
.
Global
Instance
big_sepMS_nil_timeless
Φ
:
TimelessP
([
∗
mset
]
x
∈
∅
,
Φ
x
)
.
Proof
.
rewrite
/
big_opMS
gmultiset_elements_empty
.
apply
_
.
Qed
.
Global
Instance
big_sepMS_timeless
Φ
X
:
(
∀
x
,
TimelessP
(
Φ
x
))
→
TimelessP
([
∗
mset
]
x
∈
X
,
Φ
x
)
.
Proof
.
rewrite
/
big_opMS
.
apply
_
.
Qed
.
End
gmultiset
.
End
big_op
.
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