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
c53cefcd
Commit
c53cefcd
authored
Oct 27, 2017
by
Robbert Krebbers
Browse files
Simplify `gmap_uncurry_non_empty` as suggested by JH in !9.
parent
532a9ed0
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/gmap.v
View file @
c53cefcd
...
...
@@ -190,11 +190,9 @@ Section curry_uncurry.
Lemma
gmap_uncurry_non_empty
(
m
:
gmap
(
K1
*
K2
)
A
)
i
x
:
gmap_uncurry
m
!!
i
=
Some
x
→
x
≠
∅
.
Proof
.
intros
Hm
->.
revert
m
Hm
.
apply
(
map_fold_ind
(
λ
mr
_
,
mr
!!
i
=
Some
∅
→
False
))
;
[
done
|].
intros
[
i'
j
]
x
m
mr
??.
destruct
(
decide
(
i
=
i'
))
as
[->|].
-
rewrite
lookup_partial_alter
.
intros
[=
[]%
insert_non_empty
].
-
by
rewrite
lookup_partial_alter_ne
by
done
.
intros
Hm
->.
eapply
eq_None_not_Some
;
[|
by
eexists
].
eapply
lookup_gmap_uncurry_None
;
intros
j
.
by
rewrite
<-
lookup_gmap_uncurry
,
Hm
.
Qed
.
Lemma
gmap_uncurry_curry_non_empty
(
m
:
gmap
K1
(
gmap
K2
A
))
:
...
...
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