Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
David Swasey
coq-stdpp
Commits
2e2351cd
Commit
2e2351cd
authored
Jan 07, 2017
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make instances EqDecision and Countable of gmultiset less eager.
Fix fixes issue #63.
parent
3ebeaca2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
theories/gmultiset.v
theories/gmultiset.v
+6
-2
No files found.
theories/gmultiset.v
View file @
2e2351cd
...
...
@@ -7,14 +7,18 @@ Record gmultiset A `{Countable A} := GMultiSet { gmultiset_car : gmap A nat }.
Arguments
GMultiSet
{
_
_
_
}
_
.
Arguments
gmultiset_car
{
_
_
_
}
_
.
Instance
gmultiset_eq_dec
`
{
Countable
A
}
:
EqDecision
(
gmultiset
A
).
Lemma
gmultiset_eq_dec
`
{
Countable
A
}
:
EqDecision
(
gmultiset
A
).
Proof
.
solve_decision
.
Defined
.
Hint
Extern
1
(
Decision
(@
eq
(
gmultiset
_
)
_
_
))
=>
eapply
@
gmultiset_eq_dec
:
typeclass_instances
.
Program
Instance
gmultiset_countable
`
{
Countable
A
}
:
Program
Definition
gmultiset_countable
`
{
Countable
A
}
:
Countable
(
gmultiset
A
)
:
=
{|
encode
X
:
=
encode
(
gmultiset_car
X
)
;
decode
p
:
=
GMultiSet
<$>
decode
p
|}.
Next
Obligation
.
intros
A
??
[
X
]
;
simpl
.
by
rewrite
decode_encode
.
Qed
.
Hint
Extern
1
(
Countable
(
gmultiset
_
))
=>
eapply
@
gmultiset_countable
:
typeclass_instances
.
Section
definitions
.
Context
`
{
Countable
A
}.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment