Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iris-coq
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Janno
iris-coq
Commits
9c4b7e80
Commit
9c4b7e80
authored
9 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Tidy up
c02ea520
.
parent
b936a5ca
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
prelude/gmap.v
+9
-12
9 additions, 12 deletions
prelude/gmap.v
with
9 additions
and
12 deletions
prelude/gmap.v
+
9
−
12
View file @
9c4b7e80
...
...
@@ -118,19 +118,16 @@ Instance gset_dom `{Countable K} {A} : Dom (gmap K A) (gset K) := mapset_dom.
Instance
gset_dom_spec
`{
Countable
K
}
:
FinMapDom
K
(
gmap
K
)
(
gset
K
)
:=
mapset_dom_spec
.
(** * Fresh positive *)
Definition
Gfresh
{
A
}
(
m
:
gmap
positive
A
)
:
positive
:=
Pfresh
$
gmap_car
m
.
Lemma
Gfresh_fresh
{
A
}
(
m
:
gmap
positive
A
)
:
m
!!
Gfresh
m
=
None
.
Proof
.
destruct
m
as
[[]]
.
apply
Pfresh_fresh
;
done
.
Qed
.
Instance
Gset_fresh
:
Fresh
positive
(
gset
positive
)
:=
λ
X
,
let
(
m
)
:=
X
in
Gfresh
m
.
Instance
Gset_fresh_spec
:
FreshSpec
positive
(
gset
positive
)
.
(** * 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. *)
Instance
gset_positive_fresh
:
Fresh
positive
(
gset
positive
)
:=
λ
X
,
let
'
Mapset
(
GMap
m
_)
:=
X
in
fresh
(
dom
_
m
)
.
Instance
gset_positive_fresh_spec
:
FreshSpec
positive
(
gset
positive
)
.
Proof
.
split
.
*
apply
_
.
*
intros
X
Y
;
rewrite
<-
elem_of_equiv_L
.
by
intros
->
.
*
unfold
elem_of
,
mapset_elem_of
,
fresh
;
intros
[
m
]
;
simpl
.
by
rewrite
Gfresh_fresh
.
*
by
intros
X
Y
;
rewrite
<-
elem_of_equiv_L
;
intros
->
.
*
intros
[[
m
Hm
]];
unfold
fresh
;
simpl
.
by
intros
?;
apply
(
is_fresh
(
dom
Pset
m
)),
elem_of_dom_2
with
()
.
Qed
.
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