Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Iris
stdpp
Commits
42a87a40
Commit
42a87a40
authored
Apr 09, 2018
by
Robbert Krebbers
2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
`Equiv` instance for multisets.
This fixes issue #12.
parent
6d37f451
Pipeline
#7880
passed with stage
in 14 minutes and 23 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
theories/gmultiset.v
theories/gmultiset.v
+4
-0
No files found.
theories/gmultiset.v
View file @
42a87a40
...
...
@@ -25,6 +25,8 @@ Section definitions.
0
<
multiplicity
x
X
.
Global
Instance
gmultiset_subseteq
:
SubsetEq
(
gmultiset
A
)
:
=
λ
X
Y
,
∀
x
,
multiplicity
x
X
≤
multiplicity
x
Y
.
Global
Instance
gmultiset_equiv
:
Equiv
(
gmultiset
A
)
:
=
λ
X
Y
,
∀
x
,
multiplicity
x
X
=
multiplicity
x
Y
.
Global
Instance
gmultiset_elements
:
Elements
A
(
gmultiset
A
)
:
=
λ
X
,
let
(
X
)
:
=
X
in
''
(
x
,
n
)
←
map_to_list
X
;
replicate
(
S
n
)
x
.
...
...
@@ -62,6 +64,8 @@ Proof.
specialize
(
HXY
x
)
;
unfold
multiplicity
in
*
;
simpl
in
*.
repeat
case_match
;
naive_solver
.
Qed
.
Global
Instance
gmultiset_leibniz
:
LeibnizEquiv
(
gmultiset
A
).
Proof
.
intros
X
Y
.
by
rewrite
gmultiset_eq
.
Qed
.
(* Multiplicity *)
Lemma
multiplicity_empty
x
:
multiplicity
x
∅
=
0
.
...
...
Robbert Krebbers
@robbertkrebbers
mentioned in issue
#12 (closed)
·
Apr 10, 2018
mentioned in issue
#12 (closed)
mentioned in issue #12
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment