Zulip Chat Archive
Stream: mathlib4
Topic: deprecated lemma from rw?
Bhavik Mehta (Sep 07 2023 at 10:24):
Should we disallow deprecated lemmas from appearing in the output of rw? (or deprioritise them?) As a beginner-friendly tactic and searching tactic, it's slightly unfortunate for the suggestion to immediately throw a warning (this came up in lftcm)
Bhavik Mehta (Sep 07 2023 at 10:26):
(cc @Linus Sommer) This came up since rw? suggested docs4#List.count_cons'
Mario Carneiro (Sep 08 2023 at 18:34):
Hm, I notice some other issues as well:
count_cons'is not displayed as@[deprecated]in doc-gen- There is no target for the deprecation warning, nor a comment explaining what to do. Presumably the intended replacement is
List.count_cons?
Henrik Böving (Sep 08 2023 at 18:36):
Is deprecated a lean built-in attribute? If so I can add it to the list of attributes that doc-gen knows about.
Mario Carneiro (Sep 08 2023 at 19:52):
yes
Mario Carneiro (Sep 08 2023 at 19:52):
it would be nice if we found some solution to user attributes though... I need to brush off AttrDelab again
Henrik Böving (Sep 08 2023 at 21:07):
implemented.
Malvin Gattinger (Nov 06 2025 at 14:39):
Sorry to revive this old topic, but I keep getting the deprecated docs#Eq.rec_eq_cast recommened by rw?. Did "implemented" here refer to a filter for rw? not to do this? Or only to making doc-gen know about it?
Example:
import Mathlib.Logic.Basic
example (h : A = B) (x : A) (y : B) : x = h ▸ y := by
rw? -- Try this: rw [Eq.rec_eq_cast]
sorry
example (h : A = B) (x : A) (y : B) : x = h ▸ y := by
rw [Eq.rec_eq_cast] -- `Eq.rec_eq_cast` has been deprecated: Use `eqRec_eq_cast` instead
sorry
example (h : A = B) (x : A) (y : B) : x = h ▸ y := by
rw [eqRec_eq_cast]
sorry
Henrik Böving (Nov 06 2025 at 14:40):
Making doc-gen know about the deprecation attribute
Last updated: Dec 20 2025 at 21:32 UTC