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
Joshua Yanovski
iris-coq
Commits
1aac61c4
Commit
1aac61c4
authored
Sep 23, 2016
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Insert and singleton maps are non-empty.
parent
01904806
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
prelude/fin_maps.v
prelude/fin_maps.v
+6
-0
No files found.
prelude/fin_maps.v
View file @
1aac61c4
...
@@ -475,6 +475,10 @@ Proof.
...
@@ -475,6 +475,10 @@ Proof.
Qed
.
Qed
.
Lemma
insert_empty
{
A
}
i
(
x
:
A
)
:
<
[
i
:=
x
]
>
∅
=
{
[
i
:=
x
]
}
.
Lemma
insert_empty
{
A
}
i
(
x
:
A
)
:
<
[
i
:=
x
]
>
∅
=
{
[
i
:=
x
]
}
.
Proof
.
done
.
Qed
.
Proof
.
done
.
Qed
.
Lemma
insert_non_empty
{
A
}
(
m
:
M
A
)
i
x
:
<
[
i
:=
x
]
>
m
≠
∅
.
Proof
.
intros
Hi
%
(
f_equal
(
!!
i
)).
by
rewrite
lookup_insert
,
lookup_empty
in
Hi
.
Qed
.
(
**
**
Properties
of
the
singleton
maps
*
)
(
**
**
Properties
of
the
singleton
maps
*
)
Lemma
lookup_singleton_Some
{
A
}
i
j
(
x
y
:
A
)
:
Lemma
lookup_singleton_Some
{
A
}
i
j
(
x
y
:
A
)
:
...
@@ -510,6 +514,8 @@ Proof.
...
@@ -510,6 +514,8 @@ Proof.
intros
.
apply
map_eq
;
intros
i
'
.
by
destruct
(
decide
(
i
=
i
'
))
as
[
->|?
];
intros
.
apply
map_eq
;
intros
i
'
.
by
destruct
(
decide
(
i
=
i
'
))
as
[
->|?
];
rewrite
?
lookup_alter
,
?
lookup_singleton_ne
,
?
lookup_alter_ne
by
done
.
rewrite
?
lookup_alter
,
?
lookup_singleton_ne
,
?
lookup_alter_ne
by
done
.
Qed
.
Qed
.
Lemma
singleton_non_empty
{
A
}
i
(
x
:
A
)
:
{
[
i
:=
x
]
}
≠
∅
.
Proof
.
apply
insert_non_empty
.
Qed
.
(
**
**
Properties
of
the
map
operations
*
)
(
**
**
Properties
of
the
map
operations
*
)
Lemma
fmap_empty
{
A
B
}
(
f
:
A
→
B
)
:
f
<
$
>
∅
=
∅
.
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