leanprover / doc-gen4

Document Generator for Lean 4
Apache License 2.0
57 stars 36 forks source link

Linkify builtin types like `Sort`, `Prop`, and `Pi` #90

Open eric-wieser opened 1 year ago

eric-wieser commented 1 year ago

It would be good to forward-port the features from:

The PRs above are all centered around this page: https://leanprover-community.github.io/mathlib_docs/foundational_types.html

hargoniX commented 1 year ago

In general it is unclear right now what thing we want to use for documentation that is not directly related to code. Despite building doc-gen4 I have in fact basically no clue about web development at all :D so implementing this type of prose documentation is something I don't want to invest too much time on when I can instead be helping at the code generator front.

There have also been a few people that want to integrate existing documentation tools better with the Lean stuff like LeanInk so maybe this would be the place for documentation like this to live? I'm unsure, where to put what documentation is still an open question :/

eric-wieser commented 1 year ago

The prose itself isn't really what matters here; it's primarily about being able to ask "what instances does mathlib put on pi types", which is very much directly related to code. The components of doing so are roughly:

hargoniX commented 1 year ago

I do have an implementation in #93 for sort variants. I am not yet sure how to do pi types in the current framework. It might be that this requires a patch similar to the one we had for function applications with constants in the compiler.