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
a5d1f16c
Commit
a5d1f16c
authored
2 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Plain Diff
Merge branch 'ralf/size_list_to_map' into 'master'
add size_list_to_map See merge request
!431
parents
e0657da4
3471c0eb
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!431
add size_list_to_map
Pipeline
#75446
passed
2 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
stdpp/fin_maps.v
+9
-0
9 additions, 0 deletions
stdpp/fin_maps.v
with
9 additions
and
0 deletions
stdpp/fin_maps.v
+
9
−
0
View file @
a5d1f16c
...
@@ -1141,6 +1141,15 @@ Proof. intros Hi. by rewrite map_size_delete, Hi. Qed.
...
@@ -1141,6 +1141,15 @@ Proof. intros Hi. by rewrite map_size_delete, Hi. Qed.
Lemma
map_size_fmap
{
A
B
}
(
f
:
A
->
B
)
(
m
:
M
A
)
:
size
(
f
<$>
m
)
=
size
m
.
Lemma
map_size_fmap
{
A
B
}
(
f
:
A
->
B
)
(
m
:
M
A
)
:
size
(
f
<$>
m
)
=
size
m
.
Proof
.
intros
.
unfold
size
,
map_size
.
by
rewrite
map_to_list_fmap
,
fmap_length
.
Qed
.
Proof
.
intros
.
unfold
size
,
map_size
.
by
rewrite
map_to_list_fmap
,
fmap_length
.
Qed
.
Lemma
map_size_list_to_map
{
A
}
(
l
:
list
(
K
*
A
))
:
NoDup
l
.
*
1
→
size
(
list_to_map
l
:
M
A
)
=
length
l
.
Proof
.
induction
l
;
csimpl
;
inversion
1
;
simplify_eq
/=
;
[
by
rewrite
map_size_empty
|]
.
rewrite
map_size_insert_None
by
eauto
using
not_elem_of_list_to_map_1
.
eauto
with
f_equal
.
Qed
.
(** ** Properties of conversion from sets *)
(** ** Properties of conversion from sets *)
Section
set_to_map
.
Section
set_to_map
.
Context
{
A
:
Type
}
`{
FinSet
B
C
}
.
Context
{
A
:
Type
}
`{
FinSet
B
C
}
.
...
...
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