Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Rice Wine
Iris
Commits
a198e45b
Commit
a198e45b
authored
Jan 14, 2016
by
Robbert Krebbers
Browse files
Some properties about fmap on fin_maps.
parent
9df894ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
prelude/fin_maps.v
View file @
a198e45b
...
...
@@ -234,6 +234,8 @@ Lemma map_subset_empty {A} (m : M A) : m ⊄ ∅.
Proof
.
intros
[
_
[]].
rewrite
map_subseteq_spec
.
intros
??.
by
rewrite
lookup_empty
.
Qed
.
Lemma
map_fmap_empty
{
A
B
}
(
f
:
A
→
B
)
:
f
<$>
(
∅
:
M
A
)
=
∅
.
Proof
.
by
apply
map_eq
;
intros
i
;
rewrite
lookup_fmap
,
!
lookup_empty
.
Qed
.
(** ** Properties of the [partial_alter] operation *)
Lemma
partial_alter_ext
{
A
}
(
f
g
:
option
A
→
option
A
)
(
m
:
M
A
)
i
:
...
...
@@ -516,6 +518,10 @@ Proof.
intros
.
apply
map_eq
;
intros
i'
.
by
destruct
(
decide
(
i
=
i'
))
as
[->|?]
;
rewrite
?lookup_alter
,
?lookup_singleton_ne
,
?lookup_alter_ne
by
done
.
Qed
.
Lemma
map_fmap_singleton
{
A
B
}
(
f
:
A
→
B
)
i
x
:
f
<$>
{[
i
↦
x
]}
=
{[
i
↦
f
x
]}.
Proof
.
by
unfold
singletonM
,
map_singleton
;
rewrite
fmap_insert
,
map_fmap_empty
.
Qed
.
(** ** Properties of the map operations *)
Lemma
fmap_empty
{
A
B
}
(
f
:
A
→
B
)
:
f
<$>
∅
=
∅
.
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment