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
13c7d213
Commit
13c7d213
authored
Oct 13, 2017
by
Jacques-Henri Jourdan
Browse files
Add lemma lookup_gmap_uncurry_empty
parent
8ff30e0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/gmap.v
View file @
13c7d213
...
...
@@ -168,6 +168,19 @@ Section curry_uncurry.
-
by
rewrite
lookup_partial_alter_ne
,
lookup_insert_ne
by
congruence
.
Qed
.
Lemma
lookup_gmap_uncurry_None
(
m
:
gmap
(
K1
*
K2
)
A
)
i
:
gmap_uncurry
m
!!
i
=
None
↔
(
∀
j
,
m
!!
(
i
,
j
)
=
None
).
Proof
.
apply
(
map_fold_ind
(
λ
mr
m
,
mr
!!
i
=
None
↔
(
∀
j
,
m
!!
(
i
,
j
)
=
None
)))
;
[
done
|].
clear
m
;
intros
[
i'
j'
]
x
m12
mr
Hij'
IH
.
destruct
(
decide
(
i
=
i'
))
as
[->|].
-
split
;
[
by
rewrite
lookup_partial_alter
|].
intros
Hi
.
specialize
(
Hi
j'
).
by
rewrite
lookup_insert
in
Hi
.
-
rewrite
lookup_partial_alter_ne
,
IH
;
[|
done
].
apply
forall_proper
.
intros
j
.
rewrite
lookup_insert_ne
;
[
done
|
congruence
].
Qed
.
Lemma
gmap_curry_uncurry
(
m
:
gmap
(
K1
*
K2
)
A
)
:
gmap_curry
(
gmap_uncurry
m
)
=
m
.
Proof
.
...
...
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