Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
George Pirlea
Iris
Commits
4e0e29eb
Commit
4e0e29eb
authored
Nov 20, 2016
by
Robbert Krebbers
Browse files
Prove to_gmap y (dom _ m) = const y <$> m.
parent
65c53d1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
prelude/gmap.v
View file @
4e0e29eb
...
...
@@ -159,6 +159,15 @@ Proof.
elem_of_singleton
;
destruct
(
decide
(
i
=
j
))
;
intuition
.
Qed
.
Lemma
to_gmap_dom
`
{
Countable
K
}
{
A
B
}
(
m
:
gmap
K
A
)
(
y
:
B
)
:
to_gmap
y
(
dom
_
m
)
=
const
y
<$>
m
.
Proof
.
apply
map_eq
;
intros
j
.
rewrite
lookup_fmap
,
lookup_to_gmap
.
destruct
(
m
!!
j
)
as
[
x
|]
eqn
:
?.
-
by
rewrite
option_guard_True
by
(
rewrite
elem_of_dom
;
eauto
).
-
by
rewrite
option_guard_False
by
(
rewrite
not_elem_of_dom
;
eauto
).
Qed
.
(** * Fresh elements *)
(* This is pretty ad-hoc and just for the case of [gset positive]. We need a
notion of countable non-finite types to generalize this. *)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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