Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
David Swasey
coq-stdpp
Commits
8389dcbf
Commit
8389dcbf
authored
Oct 31, 2017
by
Johannes Kloos
Browse files
Provide a type class for infinite types.
Infinity is described by having an injection from nat.
parent
88c82d21
Changes
1
Show whitespace changes
Inline
Side-by-side
theories/base.v
View file @
8389dcbf
...
...
@@ -1125,6 +1125,13 @@ Class FreshSpec A C `{ElemOf A C,
is_fresh
(
X
:
C
)
:
fresh
X
∉
X
}.
(** The class [Infinite] axiomatizes types with infinitely many elements
by giving an injection from the natural numbers into the type. It is mostly
used to provide a generic [fresh] algorithm. *)
Class
Infinite
A
:
=
{
inject
:
nat
→
A
;
inject_injective
:
>
Inj
(=)
(=)
inject
}.
(** * Miscellaneous *)
Class
Half
A
:
=
half
:
A
→
A
.
Hint
Mode
Half
!
:
typeclass_instances
.
...
...
Write
Preview
Supports
Markdown
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