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
Snippets
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
Arthur Azevedo de Amorim
stdpp
Commits
809e0d1d
Commit
809e0d1d
authored
5 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Generalize `gset_to_propset` to `set_to_propset` for any SemiSet.
This closes issue #25.
parent
ff302761
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
theories/gmap.v
+0
-5
0 additions, 5 deletions
theories/gmap.v
theories/propset.v
+6
-0
6 additions, 0 deletions
theories/propset.v
with
6 additions
and
5 deletions
theories/gmap.v
+
0
−
5
View file @
809e0d1d
...
...
@@ -237,11 +237,6 @@ Section gset.
Global
Instance
gset_dom
{
A
}
:
Dom
(
gmap
K
A
)
(
gset
K
)
:=
mapset_dom
.
Global
Instance
gset_dom_spec
:
FinMapDom
K
(
gmap
K
)
(
gset
K
)
:=
mapset_dom_spec
.
Definition
gset_to_propset
(
X
:
gset
K
)
:
propset
K
:=
{[
x
|
x
∈
X
]}
.
Lemma
elem_of_gset_to_propset
(
X
:
gset
K
)
x
:
x
∈
gset_to_propset
X
↔
x
∈
X
.
Proof
.
done
.
Qed
.
Definition
gset_to_gmap
{
A
}
(
x
:
A
)
(
X
:
gset
K
)
:
gmap
K
A
:=
(
λ
_,
x
)
<$>
mapset_car
X
.
...
...
This diff is collapsed.
Click to expand it.
theories/propset.v
+
6
−
0
View file @
809e0d1d
...
...
@@ -34,6 +34,12 @@ Lemma top_subseteq {A} (X : propset A) : X ⊆ ⊤.
Proof
.
done
.
Qed
.
Hint
Resolve
top_subseteq
:
core
.
Definition
set_to_propset
`{
ElemOf
A
C
}
(
X
:
C
)
:
propset
A
:=
{[
x
|
x
∈
X
]}
.
Lemma
elem_of_set_to_propset
`{
SemiSet
A
C
}
x
(
X
:
C
)
:
x
∈
set_to_propset
X
↔
x
∈
X
.
Proof
.
done
.
Qed
.
Instance
propset_ret
:
MRet
propset
:=
λ
A
(
x
:
A
),
{[
x
]}
.
Instance
propset_bind
:
MBind
propset
:=
λ
A
B
(
f
:
A
→
propset
B
)
(
X
:
propset
A
),
PropSet
(
λ
b
,
∃
a
,
b
∈
f
a
∧
a
∈
X
)
.
...
...
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