Suggestion on Document: Explicit Declaration for Multiple Universe Level Variable
@david-christiansen is already working on this.
Since May 10, 2024.
- Dominant language
- Lean
- Stars
- 9.2k
- Forks
- 990
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 175
Description
Hello Lean Developer,
I was writing universe-lifting function due to lack of cumulative universe
inductive liftU.{u v} (X: Type u) : Type (max v (u + 1)) :=
| inh : X → liftU X
It doesn't work, and I was stuck on the document for a while, not sure if explicit universe-level variable declaration can be done.
Then my friend told me I have to add a comma between u and v for multiple variables. Problem solved.
I think document it would be of great help.
When I was trying all sorts of syntax, I bump into the following seemingly working.
inductive LiftU {u : Type x} {v : Type y} (X : Type u) : Type (max v (u + 1)) :=
| inh : X → LiftU X
I wonder if this is an intended behaviour (i.e. universe level type is some Type _). Also wonder if the above level x y for the level u v would impact anything.
I believe documenting these would be of great help for the Lean beginner, great thanks!
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.
Assessment
This issue has not been assessed yet.