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
Iris
stdpp
Commits
f64de20e
Commit
f64de20e
authored
May 30, 2022
by
Robbert Krebbers
Browse files
Rename `lookup_preimage_Some_empty` into `lookup_preimage_Some_non_empty` and add comment.
parent
bb2262ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/fin_maps.v
View file @
f64de20e
...
...
@@ -3299,7 +3299,9 @@ Section preimage.
-
by
apply
partial_alter_commute
.
Qed
.
Lemma
lookup_preimage_Some_empty
m
x
:
(** The [preimage] function never returns an empty set (we represent that case
via [None]). *)
Lemma
lookup_preimage_Some_non_empty
m
x
:
map_preimage
m
!!
x
≠
Some
∅
.
Proof
.
induction
m
as
[|
i
x'
m
?
IH
]
using
map_ind
.
...
...
@@ -3339,7 +3341,7 @@ Section preimage.
split
;
[
by
eauto
using
lookup_preimage_None_1
|].
intros
Hm
.
apply
eq_None_not_Some
;
intros
[
X
?].
destruct
(
set_choose_L
X
)
as
[
i
?].
{
intros
->.
by
eapply
lookup_preimage_Some_empty
.
}
{
intros
->.
by
eapply
lookup_preimage_Some_
non_
empty
.
}
by
eapply
(
Hm
i
),
lookup_preimage_Some_1
.
Qed
.
...
...
@@ -3347,7 +3349,7 @@ Section preimage.
map_preimage
m
!!
x
=
Some
X
↔
X
≠
∅
∧
∀
i
,
i
∈
X
↔
m
!!
i
=
Some
x
.
Proof
.
split
.
-
intros
HxX
.
split
;
[
intros
->
;
by
eapply
lookup_preimage_Some_empty
|].
-
intros
HxX
.
split
;
[
intros
->
;
by
eapply
lookup_preimage_Some_
non_
empty
|].
intros
j
.
by
apply
lookup_preimage_Some_1
.
-
intros
[
HXne
HX
].
destruct
(
map_preimage
m
!!
x
)
as
[
X'
|]
eqn
:
HX'
.
+
f_equal
;
apply
set_eq
;
intros
i
.
rewrite
HX
.
...
...
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