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
Terraform modules
Monitor
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
Adam
stdpp
Commits
476491f4
Commit
476491f4
authored
9 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Conversion of gset to set.
parent
1e489d19
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/gmap.v
+5
-1
5 additions, 1 deletion
theories/gmap.v
with
5 additions
and
1 deletion
theories/gmap.v
+
5
−
1
View file @
476491f4
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
(** This file implements finite maps and finite sets with keys of any countable
(** This file implements finite maps and finite sets with keys of any countable
type. The implementation is based on [Pmap]s, radix-2 search trees. *)
type. The implementation is based on [Pmap]s, radix-2 search trees. *)
From
stdpp
Require
Export
countable
fin_maps
fin_map_dom
.
From
stdpp
Require
Export
countable
fin_maps
fin_map_dom
.
From
stdpp
Require
Import
pmap
mapset
.
From
stdpp
Require
Import
pmap
mapset
sets
.
(** * The data structure *)
(** * The data structure *)
(** We pack a [Pmap] together with a proof that ensures that all keys correspond
(** We pack a [Pmap] together with a proof that ensures that all keys correspond
...
@@ -118,6 +118,10 @@ Instance gset_dom `{Countable K} {A} : Dom (gmap K A) (gset K) := mapset_dom.
...
@@ -118,6 +118,10 @@ Instance gset_dom `{Countable K} {A} : Dom (gmap K A) (gset K) := mapset_dom.
Instance
gset_dom_spec
`{
Countable
K
}
:
Instance
gset_dom_spec
`{
Countable
K
}
:
FinMapDom
K
(
gmap
K
)
(
gset
K
)
:=
mapset_dom_spec
.
FinMapDom
K
(
gmap
K
)
(
gset
K
)
:=
mapset_dom_spec
.
Definition
of_gset
`{
Countable
A
}
(
X
:
gset
A
)
:
set
A
:=
mkSet
(
λ
x
,
x
∈
X
)
.
Lemma
elem_of_of_gset
`{
Countable
A
}
(
X
:
gset
A
)
x
:
x
∈
of_gset
X
↔
x
∈
X
.
Proof
.
done
.
Qed
.
(** * Fresh elements *)
(** * Fresh elements *)
(* This is pretty ad-hoc and just for the case of [gset positive]. We need a
(* 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. *)
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