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
Terraform modules
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
Adam
stdpp
Commits
e80f1433
Commit
e80f1433
authored
4 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Add lemma `omap_insert_None`.
parent
8b054d9f
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/fin_maps.v
+8
-0
8 additions, 0 deletions
theories/fin_maps.v
with
8 additions
and
0 deletions
theories/fin_maps.v
+
8
−
0
View file @
e80f1433
...
@@ -677,6 +677,14 @@ Proof.
...
@@ -677,6 +677,14 @@ Proof.
-
by
rewrite
lookup_omap
,
!
lookup_insert
.
-
by
rewrite
lookup_omap
,
!
lookup_insert
.
-
by
rewrite
lookup_omap
,
!
lookup_insert_ne
,
lookup_omap
by
done
.
-
by
rewrite
lookup_omap
,
!
lookup_insert_ne
,
lookup_omap
by
done
.
Qed
.
Qed
.
Lemma
omap_insert_None
{
A
B
}
(
f
:
A
→
option
B
)
m
i
x
:
f
x
=
None
→
omap
f
(
<
[
i
:=
x
]
>
m
)
=
delete
i
(
omap
f
m
)
.
Proof
.
intros
;
apply
map_eq
;
intros
i'
;
destruct
(
decide
(
i'
=
i
))
as
[
->
|]
.
-
by
rewrite
lookup_omap
,
lookup_insert
,
lookup_delete
.
-
by
rewrite
lookup_omap
,
lookup_insert_ne
,
lookup_delete_ne
,
lookup_omap
by
done
.
Qed
.
Lemma
map_fmap_singleton
{
A
B
}
(
f
:
A
→
B
)
i
x
:
f
<$>
{[
i
:=
x
]}
=
{[
i
:=
f
x
]}
.
Lemma
map_fmap_singleton
{
A
B
}
(
f
:
A
→
B
)
i
x
:
f
<$>
{[
i
:=
x
]}
=
{[
i
:=
f
x
]}
.
Proof
.
Proof
.
by
unfold
singletonM
,
map_singleton
;
rewrite
fmap_insert
,
map_fmap_empty
.
by
unfold
singletonM
,
map_singleton
;
rewrite
fmap_insert
,
map_fmap_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