leanprover-community.github.io icon indicating copy to clipboard operation
leanprover-community.github.io copied to clipboard

Style: Add Deprecation sub-section

Open vlad902 opened this issue 11 months ago • 5 comments

Zulip thread here: https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/Style.20guide.3A.20deprecation

vlad902 avatar Mar 10 '25 21:03 vlad902

I wonder: would this be a good place to explain mathlib's deprecation policy? (After six months, deprecated declarations may be removed.) Yes, that is scope creep - but that is also not explained yet outside of zulip.

grunweg avatar Apr 08 '25 18:04 grunweg

Another idea for scope creep:

  • do you think it's useful to say that named instances need not be deprecated? (That question also came up occasionally.)

grunweg avatar Apr 08 '25 18:04 grunweg

There was also https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/Deprecation.20policy, trying to gather consensus on a mathlib policy. I never followed through on documenting that... and some aspects are outdated now (for the better). The thread highlighted two more details

  • for declarations generated by to_additive, please ensure the generated declaration is also tagged with this attribute. For declarations generated by simps, this is not strictly required.
  • "Cyclic renamings", here's a possible snippet: We allow but discourage contributors to rename declaration X to Y and at the same time renaming W to X. In this case, no deprecation attribute is required for X (but it is for W).

Do you mind adding these as well? Sorry for aiming for really comprehensive docs here - but while we're at it, this is a good opportunity.

grunweg avatar Apr 08 '25 19:04 grunweg

I hadn't seen that thread, thanks for the feedback! I tried to integrate all of your changes, with some minor modifications of my own to wording where I thought appropriate. Please give it a look and see if you'd like any further changes.

vlad902 avatar Apr 14 '25 18:04 vlad902

Thanks; I like your new version. There might always be ways to word-smith, but what's here looks good enough to me. I'll cross-post on zulip to get some more eyes on this; let's get this merged!

grunweg avatar Apr 14 '25 21:04 grunweg