leanprover / leanprover/fp-lean

Section 1.6: Polymorphism - `: Type`

Open
#146 1 comment 1 reaction 0 assignees View on GitHub

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:

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.