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
Tej Chajed
stdpp
Commits
29e2f606
Commit
29e2f606
authored
Jun 30, 2018
by
Robbert Krebbers
Browse files
Lemma list_fmap_insert.
parent
02a107a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/list.v
View file @
29e2f606
...
...
@@ -2961,6 +2961,8 @@ Section fmap.
intros
Hi
.
rewrite
list_lookup_fmap
in
Hi
.
destruct
(
l
!!
i
)
eqn
:
?
;
simplify_eq
/=
;
eauto
.
Qed
.
Lemma
list_fmap_insert
l
i
x
:
f
<$>
<[
i
:
=
x
]>
l
=
<[
i
:
=
f
x
]>(
f
<$>
l
).
Proof
.
revert
i
.
by
induction
l
;
intros
[|
i
]
;
f_equal
/=.
Qed
.
Lemma
list_alter_fmap
(
g
:
A
→
A
)
(
h
:
B
→
B
)
l
i
:
Forall
(
λ
x
,
f
(
g
x
)
=
h
(
f
x
))
l
→
f
<$>
alter
g
i
l
=
alter
h
i
(
f
<$>
l
).
Proof
.
intros
Hl
.
revert
i
.
by
induction
Hl
;
intros
[|
i
]
;
f_equal
/=.
Qed
.
...
...
Write
Preview
Supports
Markdown
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