Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 of 3 tasks
eric-wieser opened this issue Nov 14, 2022 · 3 comments
Open
1 of 3 tasks

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

eric-wieser opened this issue Nov 14, 2022 · 3 comments

Comments

@eric-wieser
Copy link
Contributor

eric-wieser commented Nov 14, 2022

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
Copy link
Collaborator

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
Copy link
Contributor Author

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:

  • finding somewhere to emit "Instances for" for these special builtin types. If you don't want to write any prose, don't bother. Headings alone is enough for now.
  • modifying the scraping component to detect typeclasses on pi and Prop etc (you might already have code that does this if you copied it from doc-gen 3)
  • Modifying the Lean4 equivalent of pp.links to attach links to these builtin types

@hargoniX
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants