Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Iris
stdpp
Commits
291532bb
Commit
291532bb
authored
Jan 14, 2016
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some properties about fmap on fin_maps.
parent
147b2022
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
theories/fin_maps.v
theories/fin_maps.v
+6
-0
No files found.
theories/fin_maps.v
View file @
291532bb
...
...
@@ -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
Markdown
is supported
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