Zulip Chat Archive
Stream: mathlib4
Topic: to_additive documentation not rendered
Emilie (Shad Amethyst) (Jan 15 2024 at 23:13):
It took me a while to realize that there is an extensive documentation for how to_additive
works at the bottom of its source file, but that same documentation is nowhere to be found on https://leanprover-community.github.io/mathlib4_docs/Mathlib/Tactic/ToAdditive.html#to_additive
Is there another place where that docstring is rendered?
Jireh Loreaux (Jan 15 2024 at 23:17):
In VS Code you can do #help attr to_additive
to see that docstring.
Jireh Loreaux (Jan 15 2024 at 23:18):
@Floris van Doorn do we think this is the best place to put this documentation? I can't think of another place off-hand, but maybe it could just be copied into the module docstring so it appears in the docs?
Jireh Loreaux (Jan 15 2024 at 23:19):
@Emilie (Shad Amethyst) #help
can give you lots of information like this.
Emilie (Shad Amethyst) (Jan 15 2024 at 23:21):
That's a nice thing to keep in mind. I usually jump straight to the online documentation, as similarly-useful theorems tend to float around what I was looking for
Eric Wieser (Jan 15 2024 at 23:50):
This sounds like something that should be fixed in doc-gen
Kim Morrison (Jan 16 2024 at 00:05):
In the meantime reproducing the text in the module docstring sounds like the best immediate plan. If doc-gen ever gets fixed it will be easy to deduplicate. @Emilie (Shad Amethyst), if you wanted to make a PR to that effect?
Emilie (Shad Amethyst) (Jan 16 2024 at 00:06):
I unfortunately won't be able to do that until wednesday. I'll certainly get to it then if I don't see a PR for it in the meantime :)
Yury G. Kudryashov (Jan 16 2024 at 00:25):
I think that we can definitely wait until Wednesday.
Eric Wieser (Jan 16 2024 at 00:44):
I suspect this is an easy fix in doc-gen4, and amounts to just not throwing away the declaration as auto-generated
Jireh Loreaux (Jan 16 2024 at 01:42):
Is it a declaration though? It's initializing an attribute.
Last updated: May 02 2025 at 03:31 UTC