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
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Jakob Botsch Nielsen
stdpp
Commits
c1c25def
Commit
c1c25def
authored
6 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
More results about filter on map.
- Interaction with delete - Make name about map interacting with insert consistent.
parent
1f91278f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/fin_maps.v
+11
-2
11 additions, 2 deletions
theories/fin_maps.v
with
11 additions
and
2 deletions
theories/fin_maps.v
+
11
−
2
View file @
c1c25def
...
...
@@ -1064,8 +1064,8 @@ Section map_Filter.
rewrite
!
map_filter_lookup_Some
.
naive_solver
.
Qed
.
Lemma
map_filter_
lookup_
insert
m
i
x
:
P
(
i
,
x
)
→
<
[
i
:=
x
]
>
(
filter
P
m
)
=
filter
P
(
<
[
i
:=
x
]
>
m
)
.
Lemma
map_filter_insert
m
i
x
:
P
(
i
,
x
)
→
filter
P
(
<
[
i
:=
x
]
>
m
)
=
<
[
i
:=
x
]
>
(
filter
P
m
)
.
Proof
.
intros
HP
.
apply
map_eq
.
intros
j
.
apply
option_eq
;
intros
y
.
destruct
(
decide
(
j
=
i
))
as
[
->
|?]
.
...
...
@@ -1074,6 +1074,15 @@ Section map_Filter.
naive_solver
.
Qed
.
Lemma
map_filter_delete
m
i
:
filter
P
(
delete
i
m
)
=
delete
i
(
filter
P
m
)
.
Proof
.
apply
map_eq
.
intros
j
.
apply
option_eq
;
intros
y
.
destruct
(
decide
(
j
=
i
))
as
[
->
|?]
.
-
rewrite
map_filter_lookup_Some
,
!
lookup_delete
.
naive_solver
.
-
rewrite
lookup_delete_ne
,
!
map_filter_lookup_Some
,
lookup_delete_ne
by
done
.
naive_solver
.
Qed
.
Lemma
map_filter_empty
:
filter
P
(
∅
:
M
A
)
=
∅.
Proof
.
apply
map_fold_empty
.
Qed
.
End
map_Filter
.
...
...
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