Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Iris
stdpp
Commits
12f823c0
Commit
12f823c0
authored
Nov 21, 2016
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show that ⊆ on multisets is decidable.
parent
4a5056da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
theories/gmultiset.v
theories/gmultiset.v
+14
-0
No files found.
theories/gmultiset.v
View file @
12f823c0
...
...
@@ -239,6 +239,20 @@ Proof.
-
intros
X
Y
HXY
HYX
;
apply
gmultiset_eq
;
intros
x
.
by
apply
(
anti_symm
(
≤
)).
Qed
.
Lemma
gmultiset_subseteq_alt
X
Y
:
X
⊆
Y
↔
map_relation
(
≤
)
(
λ
_
,
False
)
(
λ
_
,
True
)
(
gmultiset_car
X
)
(
gmultiset_car
Y
).
Proof
.
apply
forall_proper
;
intros
x
.
unfold
multiplicity
.
destruct
(
gmultiset_car
X
!!
x
),
(
gmultiset_car
Y
!!
x
)
;
naive_solver
omega
.
Qed
.
Global
Instance
gmultiset_subseteq_dec
X
Y
:
Decision
(
X
⊆
Y
).
Proof
.
refine
(
cast_if
(
decide
(
map_relation
(
≤
)
(
λ
_
,
False
)
(
λ
_
,
True
)
(
gmultiset_car
X
)
(
gmultiset_car
Y
))))
;
by
rewrite
gmultiset_subseteq_alt
.
Defined
.
Lemma
gmultiset_subset_subseteq
X
Y
:
X
⊂
Y
→
X
⊆
Y
.
Proof
.
apply
strict_include
.
Qed
.
Hint
Resolve
gmultiset_subset_subseteq
.
...
...
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