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
a05d1085
Commit
a05d1085
authored
6 years ago
by
Janno
Browse files
Options
Downloads
Patches
Plain Diff
Add `Countable` instance for `mapset`.
parent
25bdb78f
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/mapset.v
+4
-1
4 additions, 1 deletion
theories/mapset.v
with
4 additions
and
1 deletion
theories/mapset.v
+
4
−
1
View file @
a05d1085
...
...
@@ -3,7 +3,7 @@
(** This files gives an implementation of finite sets using finite maps with
elements of the unit type. Since maps enjoy extensional equality, the
constructed finite sets do so as well. *)
From
stdpp
Require
Export
fin_map_dom
.
From
stdpp
Require
Export
countable
fin_map_dom
.
(* FIXME: This file needs a 'Proof Using' hint. *)
Record
mapset
(
M
:
Type
→
Type
)
:
Type
:=
...
...
@@ -76,6 +76,9 @@ Section deciders.
match
X1
,
X2
with
Mapset
m1
,
Mapset
m2
=>
cast_if
(
decide
(
m1
=
m2
))
end
);
abstract
congruence
.
Defined
.
Program
Instance
mapset_countable
`{
Countable
(
M
())}
:
Countable
(
mapset
M
)
:=
inj_countable
mapset_car
(
Some
∘
Mapset
)
_
.
Next
Obligation
.
by
intros
?
?
[]
.
Qed
.
Global
Instance
mapset_equiv_dec
:
RelDecision
(
≡@
{
mapset
M
})
|
1
.
Proof
.
refine
(
λ
X1
X2
,
cast_if
(
decide
(
X1
=
X2
)));
abstract
(
by
fold_leibniz
)
.
Defined
.
Global
Instance
mapset_elem_of_dec
:
RelDecision
(
∈@
{
mapset
M
})
|
1
.
...
...
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