Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stdpp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glen Mével
stdpp
Commits
4a5056da
Commit
4a5056da
authored
8 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Prove to_gmap y (dom _ m) = const y <$> m.
parent
64cafa57
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/gmap.v
+9
-0
9 additions, 0 deletions
theories/gmap.v
with
9 additions
and
0 deletions
theories/gmap.v
+
9
−
0
View file @
4a5056da
...
...
@@ -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. *)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment