leanprover / leanprover/fp-lean
Section 1.6: Polymorphism - `: Type`
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 192
- Forks
- 73
- PR merge metrics
- No merged PRs in 30d
Description
Option
At this point in the text, reading linearly, universes have not yet been introduced and I could not figure out what this syntax meant (the : Type) and what its purpose is.
inductive Option (α : Type) : Type where
| none : Option α
| some (val : α) : Option α
I briefly thought a was a lean3 vs lean4 thing because of the difference here:
- https://leanprover.github.io/theorem_proving_in_lean4/inductive_types.html (does not have
: Type) - https://leanprover.github.io/theorem_proving_in_lean/inductive_types.html (has
: Type)
I wondered if it could be left out, but the 'Messages You May Meet' example no longer produces a message if I remove : Type.
I understand it has something today with the different levels of types ( https://lakesare.brick.do/on-universes-in-lean-vByqZWpNnrEJ )
Not sure if there is a way to uncover this linearly better?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Section 1.6 and compare the two linked inductive-types pages plus the linked universe explanation. Clarify why : Type appears at this point and how it relates to the later material, while keeping the “Messages You May Meet” example accurate after the explanation is added.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100