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
Model registry
Monitor
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
Iris
stdpp
Commits
e4e6c36d
Commit
e4e6c36d
authored
6 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Some properties of `list_to_set_disj`.
parent
37762bb8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#14974
passed
6 years ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/gmultiset.v
+24
-2
24 additions, 2 deletions
theories/gmultiset.v
with
24 additions
and
2 deletions
theories/gmultiset.v
+
24
−
2
View file @
e4e6c36d
...
...
@@ -12,7 +12,7 @@ Proof. solve_decision. Defined.
Program
Instance
gmultiset_countable
`{
Countable
A
}
:
Countable
(
gmultiset
A
)
:=
{|
encode
X
:=
encode
(
gmultiset_car
X
);
decode
p
:=
GMultiSet
<$>
decode
p
encode
X
:=
encode
(
gmultiset_car
X
);
decode
p
:=
GMultiSet
<$>
decode
p
|}
.
Next
Obligation
.
intros
A
??
[
X
];
simpl
.
by
rewrite
decode_encode
.
Qed
.
...
...
@@ -250,7 +250,29 @@ Proof.
by
rewrite
multiplicity_singleton
,
multiplicity_empty
.
Qed
.
(* Properties of the elements operation *)
(** Conversion from lists *)
Lemma
list_to_set_disj_nil
:
list_to_set_disj
[]
=@
{
gmultiset
A
}
∅.
Proof
.
done
.
Qed
.
Lemma
list_to_set_disj_cons
x
l
:
list_to_set_disj
(
x
::
l
)
=@
{
gmultiset
A
}
{[
x
]}
⊎
list_to_set_disj
l
.
Proof
.
done
.
Qed
.
Lemma
list_to_set_disj_app
l1
l2
:
list_to_set_disj
(
l1
++
l2
)
=@
{
gmultiset
A
}
list_to_set_disj
l1
⊎
list_to_set_disj
l2
.
Proof
.
induction
l1
as
[|
x
l1
IH
];
simpl
.
-
by
rewrite
(
left_id_L
_
_)
.
-
by
rewrite
IH
,
(
assoc_L
_)
.
Qed
.
Global
Instance
list_to_set_disj_perm
:
Proper
((
≡
ₚ
)
==>
(
=
))
(
list_to_set_disj
(
C
:=
gmultiset
A
))
.
Proof
.
induction
1
as
[|
x
l
l'
_
IH
|
x
y
l
|
l
l'
l''
_
IH1
_
IH2
];
simpl
;
auto
.
-
by
rewrite
IH
.
-
by
rewrite
!
(
assoc_L
_),
(
comm_L
_
{[
x
]})
.
-
by
rewrite
IH1
.
Qed
.
(** Properties of the elements operation *)
Lemma
gmultiset_elements_empty
:
elements
(
∅
:
gmultiset
A
)
=
[]
.
Proof
.
unfold
elements
,
gmultiset_elements
;
simpl
.
by
rewrite
map_to_list_empty
.
...
...
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