Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stdpp
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
Environments
Terraform modules
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
Glen Mével
stdpp
Commits
8f4fe3de
Commit
8f4fe3de
authored
8 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
More multiset stuff.
parent
ed15664a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/gmultiset.v
+15
-7
15 additions, 7 deletions
theories/gmultiset.v
with
15 additions
and
7 deletions
theories/gmultiset.v
+
15
−
7
View file @
8f4fe3de
...
...
@@ -301,20 +301,28 @@ Qed.
Lemma
gmultiset_union_subset_r
X
Y
:
X
≠
∅
→
Y
⊂
X
∪
Y
.
Proof
.
rewrite
(
comm_L
(
∪
))
.
apply
gmultiset_union_subset_l
.
Qed
.
Lemma
gmultiset_elem_of_subseteq
x
X
:
x
∈
X
→
{[
x
]}
⊆
X
.
Lemma
gmultiset_elem_of_
singleton_
subseteq
x
X
:
x
∈
X
↔
{[
x
]}
⊆
X
.
Proof
.
rewrite
elem_of_multiplicity
.
intros
Hx
y
;
destruct
(
decide
(
x
=
y
))
as
[
->
|]
.
-
rewrite
multiplicity_singleton
;
omega
.
-
rewrite
multiplicity_singleton_ne
by
done
;
omega
.
rewrite
elem_of_multiplicity
.
split
.
-
intros
Hx
y
;
destruct
(
decide
(
x
=
y
))
as
[
->
|]
.
+
rewrite
multiplicity_singleton
;
omega
.
+
rewrite
multiplicity_singleton_ne
by
done
;
omega
.
-
intros
Hx
.
generalize
(
Hx
x
)
.
rewrite
multiplicity_singleton
.
omega
.
Qed
.
Lemma
gmultiset_elem_of_subseteq
X1
X2
x
:
x
∈
X1
→
X1
⊆
X2
→
x
∈
X2
.
Proof
.
rewrite
!
gmultiset_elem_of_singleton_subseteq
.
by
intros
->
.
Qed
.
Lemma
gmultiset_union_difference
X
Y
:
X
⊆
Y
→
Y
=
X
∪
Y
∖
X
.
Proof
.
intros
HXY
.
apply
gmultiset_eq
;
intros
x
;
specialize
(
HXY
x
)
.
rewrite
multiplicity_union
,
multiplicity_difference
;
omega
.
Qed
.
Lemma
gmultiset_union_difference'
x
Y
:
x
∈
Y
→
Y
=
{[
x
]}
∪
Y
∖
{[
x
]}
.
Proof
.
auto
using
gmultiset_union_difference
,
gmultiset_elem_of_subseteq
.
Qed
.
Proof
.
intros
.
by
apply
gmultiset_union_difference
,
gmultiset_elem_of_singleton_subseteq
.
Qed
.
Lemma
gmultiset_size_difference
X
Y
:
Y
⊆
X
→
size
(
X
∖
Y
)
=
size
X
-
size
Y
.
Proof
.
...
...
@@ -364,7 +372,7 @@ Proof.
intros
Hemp
Hinsert
X
.
induction
(
gmultiset_wf
X
)
as
[
X
_
IH
]
.
destruct
(
gmultiset_choose_or_empty
X
)
as
[[
x
Hx
]|
->
];
auto
.
rewrite
(
gmultiset_union_difference'
x
X
)
by
done
.
apply
Hinsert
,
IH
,
gmultiset_difference_subset
;
auto
using
gmultiset_elem_of_s
ubseteq
,
gmultiset_non_empty_singleton
.
apply
Hinsert
,
IH
,
gmultiset_difference_subset
,
gmultiset_elem_of_s
ingleton_subseteq
;
auto
using
gmultiset_non_empty_singleton
.
Qed
.
End
lemmas
.
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