Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Rodolphe Lepigre
stdpp
Commits
425c0d18
Commit
425c0d18
authored
Feb 21, 2019
by
Robbert Krebbers
Browse files
Lemma for `x ∈ _ ⊎ _` on multisets.
parent
5eabf109
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/gmultiset.v
View file @
425c0d18
...
...
@@ -126,12 +126,14 @@ Qed.
Global
Instance
gmultiset_elem_of_dec
:
RelDecision
(
∈
@{
gmultiset
A
}).
Proof
.
refine
(
λ
x
X
,
cast_if
(
decide
(
0
<
multiplicity
x
X
)))
;
done
.
Defined
.
Lemma
gmultiset_elem_of_disj_union
X
Y
x
:
x
∈
X
⊎
Y
↔
x
∈
X
∨
x
∈
Y
.
Proof
.
rewrite
!
elem_of_multiplicity
,
multiplicity_disj_union
.
lia
.
Qed
.
Global
Instance
set_unfold_gmultiset_disj_union
x
X
Y
P
Q
:
SetUnfold
(
x
∈
X
)
P
→
SetUnfold
(
x
∈
Y
)
Q
→
SetUnfold
(
x
∈
X
⊎
Y
)
(
P
∨
Q
).
Proof
.
intros
??
;
constructor
.
rewrite
<-(
set_unfold
(
x
∈
X
)
P
),
<-(
set_unfold
(
x
∈
Y
)
Q
).
rewrite
!
elem_of_multiplicity
,
multiplicity_disj_union
.
lia
.
intros
??
;
constructor
.
rewrite
gmultiset_elem_of_disj_union
.
by
rewrite
<-(
set_unfold
(
x
∈
X
)
P
),
<-(
set_unfold
(
x
∈
Y
)
Q
).
Qed
.
(* Algebraic laws *)
...
...
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