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
Michael Sammler
iris-coq
Commits
0c0f339e
Commit
0c0f339e
authored
7 years ago
by
Ralf Jung
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'origin/master' into gen_proofmode
parents
7adbdee1
5d40b106
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
README.md
+5
-0
5 additions, 0 deletions
README.md
_CoqProject
+1
-0
1 addition, 0 deletions
_CoqProject
opam
+1
-1
1 addition, 1 deletion
opam
theories/algebra/gmultiset.v
+79
-0
79 additions, 0 deletions
theories/algebra/gmultiset.v
with
86 additions
and
1 deletion
README.md
+
5
−
0
View file @
0c0f339e
...
...
@@ -10,6 +10,11 @@ This version is known to compile with:
-
Coq 8.7.1 / 8.7.2 / 8.8.0
-
A development version of
[
std++
](
https://gitlab.mpi-sws.org/robbertkrebbers/coq-stdpp
)
For a version compatible with Coq 8.6, have a look at the
[
iris-3.1 branch
](
https://gitlab.mpi-sws.org/FP/iris-coq/tree/iris-3.1
)
.
If you need to work with Coq 8.5, please check out the
[
iris-3.0 branch
](
https://gitlab.mpi-sws.org/FP/iris-coq/tree/iris-3.0
)
.
## Installing via opam
To obtain the latest stable release via opam (1.2.2 or newer), you have to add
...
...
This diff is collapsed.
Click to expand it.
_CoqProject
+
1
−
0
View file @
0c0f339e
...
...
@@ -22,6 +22,7 @@ theories/algebra/vector.v
theories/algebra/updates.v
theories/algebra/local_updates.v
theories/algebra/gset.v
theories/algebra/gmultiset.v
theories/algebra/coPset.v
theories/algebra/deprecated.v
theories/algebra/proofmode_classes.v
...
...
This diff is collapsed.
Click to expand it.
opam
+
1
−
1
View file @
0c0f339e
...
...
@@ -10,6 +10,6 @@ build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-rf" "%{lib}%/coq/user-contrib/iris"]
depends: [
"coq" { >= "8.7.1" & < "8.9~" | (= "dev") }
"coq" {
(
>= "8.7.1" & < "8.9~"
)
| (= "dev") }
"coq-stdpp" { (= "dev.2018-04-06.0") | (= "dev") }
]
This diff is collapsed.
Click to expand it.
theories/algebra/gmultiset.v
0 → 100644
+
79
−
0
View file @
0c0f339e
From
iris
.
algebra
Require
Export
cmra
.
From
iris
.
algebra
Require
Import
updates
local_updates
.
From
stdpp
Require
Export
collections
gmultiset
countable
.
Set
Default
Proof
Using
"Type"
.
(* The multiset union CMRA *)
Section
gmultiset
.
Context
`{
Countable
K
}
.
Implicit
Types
X
Y
:
gmultiset
K
.
Canonical
Structure
gmultisetC
:=
discreteC
(
gmultiset
K
)
.
Instance
gmultiset_valid
:
Valid
(
gmultiset
K
)
:=
λ
_,
True
.
Instance
gmultiset_validN
:
ValidN
(
gmultiset
K
)
:=
λ
_
_,
True
.
Instance
gmultiset_unit
:
Unit
(
gmultiset
K
)
:=
(
∅
:
gmultiset
K
)
.
Instance
gmultiset_op
:
Op
(
gmultiset
K
)
:=
union
.
Instance
gmultiset_pcore
:
PCore
(
gmultiset
K
)
:=
λ
X
,
Some
∅.
Lemma
gmultiset_op_union
X
Y
:
X
⋅
Y
=
X
∪
Y
.
Proof
.
done
.
Qed
.
Lemma
gmultiset_core_empty
X
:
core
X
=
∅.
Proof
.
done
.
Qed
.
Lemma
gmultiset_included
X
Y
:
X
≼
Y
↔
X
⊆
Y
.
Proof
.
split
.
-
intros
[
Z
->%
leibniz_equiv
]
.
rewrite
gmultiset_op_union
.
apply
gmultiset_union_subseteq_l
.
-
intros
->%
gmultiset_union_difference
.
by
exists
(
Y
∖
X
)
.
Qed
.
Lemma
gmultiset_ra_mixin
:
RAMixin
(
gmultiset
K
)
.
Proof
.
apply
ra_total_mixin
;
eauto
.
-
by
intros
X
Y
Z
->%
leibniz_equiv
.
-
by
intros
X
Y
->%
leibniz_equiv
.
-
solve_proper
.
-
intros
X1
X2
X3
.
by
rewrite
!
gmultiset_op_union
assoc_L
.
-
intros
X1
X2
.
by
rewrite
!
gmultiset_op_union
comm_L
.
-
intros
X
.
by
rewrite
gmultiset_core_empty
left_id
.
-
intros
X1
X2
HX
.
rewrite
!
gmultiset_core_empty
.
exists
∅.
by
rewrite
left_id
.
Qed
.
Canonical
Structure
gmultisetR
:=
discreteR
(
gmultiset
K
)
gmultiset_ra_mixin
.
Global
Instance
gmultiset_cmra_discrete
:
CmraDiscrete
gmultisetR
.
Proof
.
apply
discrete_cmra_discrete
.
Qed
.
Lemma
gmultiset_ucmra_mixin
:
UcmraMixin
(
gmultiset
K
)
.
Proof
.
split
.
done
.
intros
X
.
by
rewrite
gmultiset_op_union
left_id_L
.
done
.
Qed
.
Canonical
Structure
gmultisetUR
:=
UcmraT
(
gmultiset
K
)
gmultiset_ucmra_mixin
.
Lemma
gmultiset_opM
X
mY
:
X
⋅
?
mY
=
X
∪
from_option
id
∅
mY
.
Proof
.
destruct
mY
;
by
rewrite
/=
?right_id_L
.
Qed
.
Lemma
gmultiset_update
X
Y
:
X
~~>
Y
.
Proof
.
done
.
Qed
.
Lemma
gmultiset_local_update_alloc
X
Y
X'
:
(
X
,
Y
)
~l
~>
(
X
∪
X'
,
Y
∪
X'
)
.
Proof
.
rewrite
local_update_unital_discrete
=>
Z'
_
/
leibniz_equiv_iff
->
.
split
.
done
.
rewrite
!
gmultiset_op_union
.
by
rewrite
-!
assoc
(
comm
_
Z'
X'
)
.
Qed
.
Lemma
gmultiset_local_update_dealloc
X
Y
X'
:
X'
⊆
X
→
X'
⊆
Y
→
(
X
,
Y
)
~l
~>
(
X
∖
X'
,
Y
∖
X'
)
.
Proof
.
intros
->%
gmultiset_union_difference
->%
gmultiset_union_difference
.
rewrite
local_update_unital_discrete
=>
Z'
_
/
leibniz_equiv_iff
->
.
split
.
done
.
rewrite
!
gmultiset_op_union
=>
x
.
repeat
(
rewrite
multiplicity_difference
||
rewrite
multiplicity_union
)
.
omega
.
Qed
.
End
gmultiset
.
Arguments
gmultisetC
_
{_
_}
.
Arguments
gmultisetR
_
{_
_}
.
Arguments
gmultisetUR
_
{_
_}
.
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