Zulip Chat Archive
Stream: mathlib4
Topic: Discussion: Mathlib documentation overview
Anne Baanen (Nov 17 2025 at 17:21):
Discussion thread for the #announce > Mathlib documentation overview
If you have written new documentation, you can add it to documentation.yaml in the website repository. If you are missing documentation on a given topic, please request it on Zulip.
In this thread I'm especially curious to hear what you think of the design of the page. Do you have suggestions for the layout or interactivity?
Chris Henson (Nov 17 2025 at 17:51):
It's great to start collecting these resources! Regarding the design: I think it would be helpful if the h2 headers were collapsible and closed by default. Then you could place the description you have of each quadrant next to the header more easily and not start with such a long list to scroll. Something like:
image.png
Kim Morrison (Nov 17 2025 at 23:14):
I think it's important to have a (curated) order within each category. e.g. the Lean Language Reference should be the first item in the reference section!
Kim Morrison (Nov 17 2025 at 23:15):
I think we also already need subcategories. There are many examples here, but e.g. all of Bhavik's lecture notes should be under a collapsible subheading too.
Lawrence Wu (llllvvuu) (Nov 18 2025 at 13:23):
“library note [implicit instance arguments]” links to AlgebraicHierarchy.lean
EDIT: sorry, I just noticed they are all in the same file. I guess this was just GitHub’s jump to line not working.
Aaron Liu (Nov 18 2025 at 16:50):
Those links aren't permalinks so I'm worried that when mathlib changes the links will start pointing to something else since the line number the library notes start at jumps around as the file has stuff added or moved or refactored
Bryan Gin-ge Chen (Nov 18 2025 at 16:57):
We can probably use doc-gen's source-finding feature: https://leanprover-community.github.io/mathlib4_docs/find/?pattern={decl}#src (this is what powers the src#xxx linkifier)
Bryan Gin-ge Chen (Nov 18 2025 at 16:59):
Hmm, this links to the docs and not the GitHub source, but maybe that's fine: https://leanprover-community.github.io/mathlib4_docs/find/?pattern=Mathlib.LibraryNote.«implicit instance arguments»#src (Zulip doesn't seem to like the URL)
Chris Henson (Nov 18 2025 at 18:35):
Maybe even slightly preferable, as the docs are a little nicer to read? I've opened https://github.com/leanprover-community/leanprover-community.github.io/pull/745 for consideration doing this.
Bryan Gin-ge Chen (Nov 18 2025 at 18:40):
Thanks for making the PR! If we prefer going staying on the docs page rather than GitHub, I think you can replace the #src in the URLs with #doc. (I'm not sure why #src doesn't work, maybe doc-gen isn't able to get the data for that command or something yet.)
I think @Anne Baanen was planning some improvements to doc-gen where library notes, tactics, attributes, commands, etc. would get their own pages, so I don't know if they eventually want to change these URLs to point there, but otherwise this PR looks good to me.
Chris Henson (Nov 18 2025 at 18:48):
That makes sense, I've updated to #doc links.
Chris Henson (Nov 18 2025 at 18:49):
And those changes to doc-gen sound great, I'll be looking forward to it!
Anne Baanen (Nov 27 2025 at 18:08):
Chris Henson said:
It's great to start collecting these resources! Regarding the design: I think it would be helpful if the h2 headers were collapsible and closed by default. Then you could place the description you have of each quadrant next to the header more easily and not start with such a long list to scroll. Something like:
image.png
Thanks for your feedback! I've implemented this in leanprover-community.github.io#750
Last updated: Dec 20 2025 at 21:32 UTC