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
Model registry
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
Iris
stdpp
Commits
3b269ef3
Commit
3b269ef3
authored
2 months ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
improve comment
parent
b38cea43
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!587
gen_tree: add comment explaining intended usage
Pipeline
#116917
passed
2 months ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
stdpp/countable.v
+5
-2
5 additions, 2 deletions
stdpp/countable.v
with
5 additions
and
2 deletions
stdpp/countable.v
+
5
−
2
View file @
3b269ef3
...
...
@@ -315,13 +315,16 @@ Local Close Scope positive.
(** This type can help you construct a [Countable] instance for an arbitrary
(even recursive) inductive datatype. The idea is tht you make [T] something like
`
T1 + T2 + ...
`
, covering all the data types that can be contained inside your
[
T1 + T2 + ...
]
, covering all the data types that can be contained inside your
type.
- Each non-recursive constructor to a [GenLeaf]. Different constructors must use
different variants of [T] to ensure they remain distinguishable!
- Each recursive constructor to a [GenNode] where the [nat] is a (typically
small) constant representing the constructor itself, and then all the data in
the constructor (recursive or otherwise) is put into child nodes. *)
the constructor (recursive or otherwise) is put into child nodes.
This data type is the same as `GenTree.tree` in mathcomp, see
https://github.com/math-comp/math-comp/blob/master/ssreflect/choice.v *)
Inductive
gen_tree
(
T
:
Type
)
:
Type
:=
|
GenLeaf
:
T
→
gen_tree
T
|
GenNode
:
nat
→
list
(
gen_tree
T
)
→
gen_tree
T
.
...
...
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